Skip to content

Commit

Permalink
Fix SM3 and SM4 test programs
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Feb 13, 2022
1 parent 296258d commit 5baf6c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions TestPrograms/test_arm_sm3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ int main(int argc, char* argv[])
{
// SM3 hash
// https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=SM3
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
uint32x4_t x={1}, y={2}, z={3};
y=vsm3ss1q_u32(x,y,z);
y=vsm3tt1aq_u32(x,y,z,3);
y=vsm3tt1bq_u32(x,y,z,1);
y=vsm3tt2aq_u32(x,y,z,2);
y=vsm3tt2bq_u32(x,y,z,3);
y=vsm3partw1q_u32(x,y,z);
y=vsm3partw2q_u32(x,y,z);
return 0;
}
2 changes: 1 addition & 1 deletion TestPrograms/test_arm_sm4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int main(int argc, char* argv[])
{
// SM4 block cipher
// https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=SM4
uint32x4_t x, y={1}, z={2};
uint32x4_t x={0}, y={1}, z={2};
x=vsm4ekeyq_u32(y,z);
x=vsm4eq_u32(y,z);

Expand Down

0 comments on commit 5baf6c5

Please sign in to comment.