diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32ea391..c20b6d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,21 +14,30 @@ env: jobs: test: - name: Rust ${{matrix.rust}} + name: Test runs-on: ubuntu-latest strategy: fail-fast: false matrix: + target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] rust: [nightly, beta, stable, 1.64] timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{matrix.rust}} + toolchain: ${{ matrix.rust }} + target: ${{ matrix.target }} + - uses: taiki-e/setup-cross-toolchain-action@v1 + with: + target: ${{ matrix.target }} + - name: Enable type layout randomization run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV if: matrix.rust == 'nightly' + + - uses: Swatinem/rust-cache@v2 + - run: cargo build - run: cargo test - run: cargo test --release diff --git a/src/x86.rs b/src/x86.rs index b34ea48..d255450 100644 --- a/src/x86.rs +++ b/src/x86.rs @@ -45,9 +45,8 @@ pub(super) unsafe fn encode(input: &[u8], output: *mut u8) { // Store result into the output buffer. _mm_storeu_si128(output.add(i).cast(), hex_lo); - i += CHUNK_SIZE; - _mm_storeu_si128(output.add(i).cast(), hex_hi); - i += CHUNK_SIZE; + _mm_storeu_si128(output.add(i + CHUNK_SIZE).cast(), hex_hi); + i += CHUNK_SIZE * 2; } if !input_remainder.is_empty() {