summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKoichi Shiraishi <zchee.io@gmail.com>2021-08-12 06:25:19 +0900
committerKoichi Shiraishi <zchee.io@gmail.com>2021-08-12 06:28:30 +0900
commitec8bdfae7f2159758fe8ec0cb9dbe6ea7c14b961 (patch)
tree03ba289f0810f92b6b15d1eb628a479178a98935
parentf13a9e2c13c2680fc53c08d49b659a874e9cc9b1 (diff)
Use BX instead of BP at AX second op
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
-rw-r--r--pkg/atomicbitops/atomicbitops_amd64.s12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/atomicbitops/atomicbitops_amd64.s b/pkg/atomicbitops/atomicbitops_amd64.s
index b6c2eb693..cbaf716bb 100644
--- a/pkg/atomicbitops/atomicbitops_amd64.s
+++ b/pkg/atomicbitops/atomicbitops_amd64.s
@@ -20,21 +20,21 @@ TEXT ·AndUint32(SB),$0-12
MOVQ addr+0(FP), BX
MOVL val+8(FP), AX
LOCK
- ANDL AX, 0(BP)
+ ANDL AX, 0(BX)
RET
TEXT ·OrUint32(SB),$0-12
MOVQ addr+0(FP), BX
MOVL val+8(FP), AX
LOCK
- ORL AX, 0(BP)
+ ORL AX, 0(BX)
RET
TEXT ·XorUint32(SB),$0-12
MOVQ addr+0(FP), BX
MOVL val+8(FP), AX
LOCK
- XORL AX, 0(BP)
+ XORL AX, 0(BX)
RET
TEXT ·CompareAndSwapUint32(SB),$0-20
@@ -50,21 +50,21 @@ TEXT ·AndUint64(SB),$0-16
MOVQ addr+0(FP), BX
MOVQ val+8(FP), AX
LOCK
- ANDQ AX, 0(BP)
+ ANDQ AX, 0(BX)
RET
TEXT ·OrUint64(SB),$0-16
MOVQ addr+0(FP), BX
MOVQ val+8(FP), AX
LOCK
- ORQ AX, 0(BP)
+ ORQ AX, 0(BX)
RET
TEXT ·XorUint64(SB),$0-16
MOVQ addr+0(FP), BX
MOVQ val+8(FP), AX
LOCK
- XORQ AX, 0(BP)
+ XORQ AX, 0(BX)
RET
TEXT ·CompareAndSwapUint64(SB),$0-32