shithub: riscv

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