Skip to content

Commit

Permalink
Fix kuznyechik 32bit build (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanshade committed Feb 12, 2024
1 parent 1206250 commit 46462cc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/kuznyechik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,38 @@ jobs:
with:
working-directory: ${{ github.workflow }}

sse2:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- stable
target:
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
include:
- target: i686-unknown-linux-gnu
deps: sudo apt update && sudo apt install gcc-multilib
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- run: ${{ matrix.deps }}
- env:
RUSTFLAGS: "-Dwarnings -C target-feature=+sse2"
run: |
cargo test --target ${{ matrix.target }}
cargo test --target ${{ matrix.target }} --all-features
- env:
RUSTFLAGS: "-Dwarnings -C target-feature=+sse2 --cfg kuznyechik_force_soft"
run: |
cargo test --target ${{ matrix.target }}
cargo test --target ${{ matrix.target }} --all-features
test:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 4 additions & 0 deletions kuznyechik/src/sse2/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use cipher::{
typenum::Unsigned,
BlockBackend, BlockSizeUser, ParBlocks, ParBlocksSizeUser,
};

#[cfg(target_arch = "x86")]
use core::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;

pub(super) type RoundKeys = [__m128i; 10];
Expand Down

0 comments on commit 46462cc

Please sign in to comment.