[PATCH] riscv: Add macros for FPUCW in fpu_control.h

Andreas Schwab schwab@linux-m68k.org
Sat Feb 11 20:21:39 GMT 2023


On Feb 12 2023, Shiqi Zhang wrote:

> +# define _FPU_RM_DYN (7 << 5)

That is only valid in an insn encoding, not in the fcsr register.

> +/* FPU accrued exception flags */
> +# define _FPU_EXCEPT_NV (1 << 0)
> +# define _FPU_EXCEPT_NZ (1 << 1)
> +# define _FPU_EXCEPT_OF (1 << 2)
> +# define _FPU_EXCEPT_UF (1 << 3)
> +# define _FPU_EXCEPT_NX (1 << 4)

You got them backwards.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list