shithub: riscv

ref: 8a45afd47d2545b2d85aecf9ec5af90cba3905d3
dir: /sys/src/libc/arm64/setjmp.s/

View raw version
TEXT setjmp(SB), 1, $-4
	MOV	LR, 8(R0)
	MOV	SP, R1
	MOV	R1, 0(R0)
	MOV	$0, R0
	RETURN

TEXT longjmp(SB), 1, $-4
	MOV	8(R0), LR
	MOV	0(R0), R1
	MOVW	arg+8(FP), R0
	MOV	R1, SP
	CBZ	R0, _one
	RETURN
_one:
	MOV	$1, R0
	RETURN