Commits

Anonymous committed 21bd23b

Support push and pop of floating point registers.

Comments (0)

Files changed (1)

pypy/jit/backend/ppc/ppc_assembler.py

             self.mc.addi(r.SP.value, r.SP.value, -WORD) # decrease stack pointer
             # push value
             self.mc.store(loc.value, r.SP.value, 0)
+        elif loc.is_fp_reg():
+            self.mc.addi(r.SP.value, r.SP.value, -WORD) # decrease stack pointer
+            # push value
+            self.mc.stfd(loc.value, r.SP.value, 0)
         elif loc.is_imm():
             assert 0, "not implemented yet"
         elif loc.is_imm_float():
             else:
                 self.mc.ld(loc.value, r.SP.value, 0)
             self.mc.addi(r.SP.value, r.SP.value, WORD) # increase stack pointer
+        elif loc.is_fp_reg():
+            self.mc.lfd(loc.value, r.SP.value, 0)
+            self.mc.addi(r.SP.value, r.SP.value, WORD) # increase stack pointer
         else:
             raise AssertionError('Trying to pop to an invalid location')