Skip to content

Commit

Permalink
poly1305: fix bug in amd64 assembly
Browse files Browse the repository at this point in the history
Add the conditional subtraction of 3 from 'h2' (register R10).

Change-Id: I75615b0375f050a5cd97b968075c2992ccd1dee7
Reviewed-on: https://go-review.googlesource.com/30101
Reviewed-by: Adam Langley <agl@golang.org>
  • Loading branch information
Andreas Auernhammer authored and agl committed Oct 2, 2016
1 parent 7fb8d38 commit 380809d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions poly1305/poly1305_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ done:
MOVQ R9, BX
SUBQ $0xFFFFFFFFFFFFFFFB, AX
SBBQ $0xFFFFFFFFFFFFFFFF, BX
SBBQ $3, R10
CMOVQCS R8, AX
CMOVQCS R9, BX
ADDQ 16(SP), AX
Expand Down

0 comments on commit 380809d

Please sign in to comment.