shithub: riscv

ref: 8a45afd47d2545b2d85aecf9ec5af90cba3905d3
dir: /sys/src/libc/arm/tas.s/

View raw version
TEXT _tas(SB), 1, $-4
	MOVW	$1, R2
_tas1:
	LDREX	(R0), R1
	STREX	R2, (R0), R3
	CMP.S	$0, R3
	BNE	_tas1
	MOVW	R1, R0
	MOVW	_barrier(SB), R4
	B	(R4)

TEXT _dmb(SB), 1, $-4
	WORD $0xf57ff05f
	RET