shithub: riscv

ref: f88a55e79b5bf656e7f9578d1318a955b9a4963a
dir: /sys/src/ape/lib/ap/riscv64/getfcr.s/

View raw version
#define ARG	8

#define FFLAGS		1
#define FRM		2
#define FCSR		3

TEXT	getfsr(SB), $0
	MOV	CSR(FCSR), R(ARG)
	RET

TEXT	setfsr(SB), $0
	MOV	R(ARG), CSR(FCSR)
	RET

TEXT	getfcr(SB), $0
	MOV	CSR(FCSR), R(ARG)
	RET

TEXT	setfcr(SB), $0
	MOV	R(ARG), CSR(FCSR)
	RET