shithub: riscv

ref: a4c6dc1d3d3a2ef3ec4d4ac49b16ec039c353cd7
dir: /sys/src/ape/lib/ap/68020/setjmp.s/

View raw version
TEXT	setjmp(SB), 1, $0
	MOVL	b+0(FP), A0
	MOVL	A7, (A0)+
	MOVL	(A7), (A0)
	CLRL	R0
	RTS

TEXT	sigsetjmp(SB), 1, $0
	MOVL	b+0(FP), A0
	MOVW	savemask+4(FP), R1
	MOVW	R1, (A0)+
	MOVW	$_psigblocked(SB), R1
	MOVW	R1, (A0)+
	MOVL	A7, (A0)+
	MOVL	(A7), (A0)
	CLRL	R0
	RTS

TEXT	longjmp(SB), 1, $0
	MOVL	b+0(FP), A0
	MOVL	r+4(FP), R0
	BNE	ok		/* ansi: "longjmp(0) => longjmp(1)" */
	MOVL	$1, R0		/* bless their pointed heads */
ok:	MOVL	(A0)+, A7
	MOVL	(A0), (A7)
	RTS