Skip to content

Commit 211b34e

Browse files
authored
sm2_bmi2_bugfix (#961)
1 parent c6bcd23 commit 211b34e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

crypto/ec/asm/ecp_sm2z256-x86_64.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@
12671267
shrx $a_ptr, $acc0, $t4
12681268
mov .Lpoly+8*3(%rip), $t1
12691269
1270+
# set of = 0
1271+
add \$0, $acc2
1272+
12701273
# reduction step 1
12711274
xor $t1, $t1
12721275
adox $acc0, $acc1
@@ -1281,6 +1284,9 @@
12811284
shlx $a_ptr, $acc1, $t0
12821285
shrx $a_ptr, $acc1, $t4
12831286
1287+
# set of = 0
1288+
add \$0, $acc2
1289+
12841290
# reduction step 2
12851291
adox $acc1, $acc2
12861292
adox $t1, $acc3
@@ -1294,6 +1300,9 @@
12941300
shlx $a_ptr, $acc2, $t0
12951301
shrx $a_ptr, $acc2, $t4
12961302
1303+
# set of = 0
1304+
add \$0, $acc2
1305+
12971306
# reduction step 3
12981307
adox $acc2, $acc3
12991308
adox $t1, $acc0
@@ -1307,6 +1316,9 @@
13071316
shlx $a_ptr, $acc3, $t0
13081317
shrx $a_ptr, $acc3, $t4
13091318
1319+
# set of = 0
1320+
add \$0, $acc2
1321+
13101322
# reduction step 4
13111323
adox $acc3, $acc0
13121324
adox $t1, $acc1

0 commit comments

Comments
 (0)