File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
crates/core_arch/src/riscv_shared Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ pub fn sm3p1(x: u32) -> u32 {
685
685
/// According to RISC-V Cryptography Extensions, Volume I, the execution latency of
686
686
/// this instruction must always be independent from the data it operates on.
687
687
pub fn sm4ed < const BS : u8 > ( x : u32 , a : u32 ) -> u32 {
688
- static_assert_imm2 ! ( BS ) ; // `bs` immediate value must be within [0, 3]
688
+ static_assert ! ( BS : u8 where BS <= 3 ) ;
689
689
let ans: u32 ;
690
690
match BS {
691
691
0 => unsafe {
@@ -750,7 +750,7 @@ pub fn sm4ed<const BS: u8>(x: u32, a: u32) -> u32 {
750
750
/// According to RISC-V Cryptography Extensions, Volume I, the execution latency of
751
751
/// this instruction must always be independent from the data it operates on.
752
752
pub fn sm4ks < const BS : u8 > ( x : u32 , k : u32 ) -> u32 {
753
- static_assert_imm2 ! ( BS ) ; // `bs` immediate value must be within [0, 3]
753
+ static_assert ! ( BS : u8 where BS <= 3 ) ;
754
754
let ans: u32 ;
755
755
match BS {
756
756
0 => unsafe {
You can’t perform that action at this time.
0 commit comments