Commit 70b4231
committed
polyval: add
The `cpufeatures::new!` macro in `avx2.rs` only checks for
`pclmulqdq`, but the functions it guards (`expand_key`,
`proc_block`, `proc_par_blocks`) are annotated with
`#[target_feature(enable = "avx2", enable = "pclmulqdq")]`.
On CPUs that support PCLMULQDQ but lack AVX2 (e.g. Intel Pentium
Gold, Celeron, some Atom processors), the runtime check passes,
VEX-encoded instructions are executed, and the process crashes
with SIGILL.
Adding `"avx2"` to the feature check ensures the intrinsics path
is only used when both features are available. CPUs without AVX2
correctly fall back to the software implementation.
Fixes #315avx2 to runtime CPU feature check1 parent 929ee7a commit 70b4231
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments