shithub: mc

ref: e54af86927ced66fb7fa8ad744cfb609390f04d8
dir: /lib/thread/atomic-impl+plan9-x64.s/

View raw version
TEXT thread$xget32+0(SB),1,$0
	MOVL	(DI), AX
	RET
TEXT thread$xget64+0(SB),1,$0
	MOVQ	(DI), AX
	RET
TEXT thread$xgetp+0(SB),1,$0
	MOVQ	(DI), AX
	RET

TEXT thread$xset32+0(SB),1,$0
	MOVL	SI, (DI)
	RET
TEXT thread$xset64+0(SB),1,$0
	MOVQ	SI, (DI)
	RET
TEXT thread$xsetp+0(SB),1,$0
	MOVQ	SI, (DI)
	RET

TEXT thread$xadd32+0(SB),1,$0
	LOCK; XADDL	SI, (DI)
	MOVL	SI, AX
	RET
TEXT thread$xadd64+0(SB),1,$0
	LOCK; XADDQ	SI, (DI)
	MOVQ	SI, AX
	RET
TEXT thread$xaddp+0(SB),1,$0
	LOCK; XADDQ	SI, (DI)
	MOVQ	SI, AX
	RET

TEXT thread$xcas32+0(SB),1,$0
	MOVL	SI, AX
	LOCK; CMPXCHGL	DX, (DI)
	RET
TEXT thread$xcas64+0(SB),1,$0
	MOVQ	SI, AX
	LOCK; CMPXCHGQ	DX, (DI)
	RET
TEXT thread$xcasp+0(SB),1,$0
	MOVQ	SI, AX
	LOCK; CMPXCHGQ	DX, (DI)
	RET

TEXT thread$xchg32+0(SB),1,$0
	MOVL	SI, AX
	LOCK; XCHGL	(DI), AX
	RET
TEXT thread$xchg64+0(SB),1,$0
	MOVQ	SI, AX
	LOCK; XCHGQ	(DI), AX
	RET
TEXT thread$xchgp+0(SB),1,$0
	MOVQ	SI, AX
	LOCK; XCHGQ	(DI), AX
	RET