The comment explaining the reason to clear CAUSE does not make any
sense: it says the next "CTC" instruction would raise the FP exception
of which both the CAUSE and ENABLE bits are set, but LoongArch does not
have the CTC instruction. LoongArch has the movgr2fcsr instruction but
movgr2fcsr never raises any FP exception, different from the MIPS CTC
instruction.
So we don't really need to care CAUSE at all.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
/* Read the complete control word. */
_FPU_GETCW (cw);
- /* Clear exception flag bits and cause bits. If the cause bit is not
- cleared, the next CTC instruction (just below) will re-generate the
- exception. */
-
- cw &= ~(excepts | (excepts << CAUSE_SHIFT));
+ /* Clear exception flag bits. */
+ cw &= ~excepts;
/* Put the new data in effect. */
_FPU_SETCW (cw);