1. Dario Bertini
  2. another-pypy

Commits

David Schneider  committed f8185b0

Around calls save only registers that are going to be used afterwards

  • Participants
  • Parent commits 331ea1f
  • Branches arm-backed-float

Comments (0)

Files changed (1)

File pypy/jit/backend/arm/helper/assembler.py

View file
  • Ignore whitespace
     def _filter_regs(self, regs_to_save, vfp_regs_to_save):
         regs = []
         for box, reg in self.regalloc.rm.reg_bindings.iteritems():
-            if reg in regs_to_save or reg is r.ip:
+            if reg is r.ip or (reg in regs_to_save and self.regalloc.stays_alive(box)):
                 regs.append(reg)
         self.regs = regs
         regs = []
         for box, reg in self.regalloc.vfprm.reg_bindings.iteritems():
-            if reg in vfp_regs_to_save:
+            if reg in vfp_regs_to_save and self.regalloc.stays_alive(box):
                 regs.append(reg)
         self.vfp_regs = regs