Skip to content

Commit

Permalink
fix: invalid offset error, clobbering error
Browse files Browse the repository at this point in the history
fixed errors:

./blamka_amd64.s:203:1: [amd64] mixBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)

./blamka_amd64.s:226:1: [amd64] xorBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)

./blamka_amd64.s:204:1: frame pointer is clobbered before saving

./blamka_amd64.s:227:1: frame pointer is clobbered before saving
  • Loading branch information
pilinux committed Aug 17, 2023
1 parent bbe8f94 commit e374b3d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions blamka_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ TEXT ·blamkaSSE4(SB), 4, $0-8

// func mixBlocksSSE2(out, a, b, c *block)
TEXT ·mixBlocksSSE2(SB), 4, $0-32
// Save the original BP value
MOVQ BP, CX
MOVQ out+0(FP), DX
MOVQ a+8(FP), AX
MOVQ b+16(FP), BX
MOVQ a+24(FP), CX
MOVQ c+24(FP), CX
MOVQ $128, BP

loop:
Expand All @@ -216,14 +218,18 @@ loop:
ADDQ $16, DX
SUBQ $2, BP
JA loop
// Restore the original BP value
MOVQ CX, BP
RET

// func xorBlocksSSE2(out, a, b, c *block)
TEXT ·xorBlocksSSE2(SB), 4, $0-32
// Save the original BP value
MOVQ BP, CX
MOVQ out+0(FP), DX
MOVQ a+8(FP), AX
MOVQ b+16(FP), BX
MOVQ a+24(FP), CX
MOVQ c+24(FP), CX
MOVQ $128, BP

loop:
Expand All @@ -241,4 +247,6 @@ loop:
ADDQ $16, DX
SUBQ $2, BP
JA loop
RET
// Restore the original BP value
MOVQ CX, BP
RET

0 comments on commit e374b3d

Please sign in to comment.