shithub: riscv

ref: 02dce7a2e4fd74d918cf7cd1f23fc99279365eb9
dir: /sys/src/ape/lib/ap/alpha/getfcr.s/

View raw version
TEXT	getfsr(SB), $8
	TRAPB
	MOVT	FPCR, F0
	TRAPB
	MOVT	F0, tmp-8(SP)
	MOVL	tmp-4(SP), R0
	RET

TEXT	setfsr(SB), $8
	SLLQ		$32, R0
	MOVQ	R0, tmp-8(SP)
	MOVT	tmp-8(SP), F0
	TRAPB
	MOVT	F0, FPCR
	TRAPB
	RET

TEXT	getfcr(SB), $8
	TRAPB
	MOVT	FPCR, F0
	TRAPB
	MOVT	F0, tmp-8(SP)
	MOVL	tmp-4(SP), R0
	RET

TEXT	setfcr(SB), $8
	SLLQ		$32, R0
	MOVQ	R0, tmp-8(SP)
	MOVT	tmp-8(SP), F0
	TRAPB
	MOVT	F0, FPCR
	TRAPB
	RET