ISACaller: generate FP trap
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 24 May 2023 03:10:18 +0000 (20:10 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Wed, 24 May 2023 03:10:18 +0000 (20:10 -0700)
src/openpower/decoder/isa/caller.py

index 263608c3b524ed333d6c788a02bbe250e897faac..714f274af9910450ce0a885c508ebbe2cc11273d 100644 (file)
@@ -2200,6 +2200,10 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop):
             chk = rc_en or is_cr
             ffirst_hit = (yield from self.check_ffirst(info, chk, srcstep))
 
+        if self.FPSCR.FEX and (self.msr[MSRb.FE0] or self.msr[MSRb.FE1]):
+            self.call_trap(0x700, PIb.FP)
+            return
+
         # any modified return results?
         yield from self.do_outregs_nia(asmop, ins_name, info, outs,
                                        carry_en, rc_en, ffirst_hit, ew_dst)