shithub: riscv

ref: bae3ac29fc39bc36329abf1823004c0d79b2f6f0
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