shithub: riscv

ref: 9e09742e9b5789a94b7676ff5f4e01468d2f2d88
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