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

Shiqi Zhang shiqi@isrc.iscas.ac.cn
Sun Feb 12 06:29:57 GMT 2023


>> +# define _FPU_RM_DYN (7 << 5)
> That is only valid in an insn encoding, not in the fcsr register.
Thank you very much for the tip!
>> +/* 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.

Sorry for my carelessness. I mistakenly assumed that flags in table 11.2
was listed from lower to higher bits. Will send a v2 soon.



More information about the Libc-alpha mailing list