mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix frame pointer is clobbered before saving vet issue on BP register
BP should be callee-save. It will be saved automatically if there is nonzero frame size. $ go vet -framepointer ./pkg/atomicbitops pkg/atomicbitops/atomicbitops_amd64.s:27:1: frame pointer is clobbered before saving pkg/atomicbitops/atomicbitops_amd64.s:34:1: frame pointer is clobbered before saving pkg/atomicbitops/atomicbitops_amd64.s:50:1: frame pointer is clobbered before saving pkg/atomicbitops/atomicbitops_amd64.s:57:1: frame pointer is clobbered before saving pkg/atomicbitops/atomicbitops_amd64.s:64:1: frame pointer is clobbered before saving Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
This commit is contained in:
@@ -16,21 +16,21 @@
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·AndUint32(SB),$0-12
|
||||
TEXT ·AndUint32(SB),$8-12
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVL val+8(FP), AX
|
||||
LOCK
|
||||
ANDL AX, 0(BP)
|
||||
RET
|
||||
|
||||
TEXT ·OrUint32(SB),$0-12
|
||||
TEXT ·OrUint32(SB),$8-12
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVL val+8(FP), AX
|
||||
LOCK
|
||||
ORL AX, 0(BP)
|
||||
RET
|
||||
|
||||
TEXT ·XorUint32(SB),$0-12
|
||||
TEXT ·XorUint32(SB),$8-12
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVL val+8(FP), AX
|
||||
LOCK
|
||||
@@ -46,21 +46,21 @@ TEXT ·CompareAndSwapUint32(SB),$0-20
|
||||
MOVL AX, ret+16(FP)
|
||||
RET
|
||||
|
||||
TEXT ·AndUint64(SB),$0-16
|
||||
TEXT ·AndUint64(SB),$8-16
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVQ val+8(FP), AX
|
||||
LOCK
|
||||
ANDQ AX, 0(BP)
|
||||
RET
|
||||
|
||||
TEXT ·OrUint64(SB),$0-16
|
||||
TEXT ·OrUint64(SB),$8-16
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVQ val+8(FP), AX
|
||||
LOCK
|
||||
ORQ AX, 0(BP)
|
||||
RET
|
||||
|
||||
TEXT ·XorUint64(SB),$0-16
|
||||
TEXT ·XorUint64(SB),$8-16
|
||||
MOVQ addr+0(FP), BP
|
||||
MOVQ val+8(FP), AX
|
||||
LOCK
|
||||
|
||||
Reference in New Issue
Block a user