Commits

David Schneider committed 8c20c87

use d15 as vfp scratch register and use it instead of temporarily pushing some register

  • Participants
  • Parent commits 49abee2
  • Branches arm-backed-float

Comments (0)

Files changed (2)

pypy/jit/backend/arm/assembler.py

             if loc.is_vfp_reg():
                 self.mc.VLDR(loc.value, r.ip.value)
             else:
-                tmpreg = r.d0
-                with saved_registers(self.mc, [], [tmpreg]):
-                    self.mc.VLDR(tmpreg.value, r.ip.value)
-                    self.mov_loc_loc(tmpreg, loc)
+                self.mc.VLDR(r.vfp_ip.value, r.ip.value)
+                self.mov_loc_loc(r.vfp_ip, loc)
 
     def _count_reg_args(self, args):
         reg_args = 0
                 self.mc.VLDR(loc.value, r.fp.value, stack_position)
             elif loc.is_stack():
                 if loc.type == FLOAT:
-                    with saved_registers(self.mc, [], [r.d0]):
-                        self.mc.VLDR(r.d0.value, r.fp.value, stack_position)
-                        self.mov_loc_loc(r.d0, loc)
+                    self.mc.VLDR(r.vfp_ip.value, r.fp.value, stack_position)
+                    self.mov_loc_loc(r.vfp_ip, loc)
                 elif loc.type == INT or loc.type == REF:
                     self.mc.LDR_ri(r.ip.value, r.fp.value, stack_position)
                     self.mov_loc_loc(r.ip, loc)

pypy/jit/backend/arm/registers.py

 sp = r13
 lr = r14
 pc = r15
+vfp_ip = d15
 
 all_regs = [r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10]
-all_vfp_regs = vfpregisters
+all_vfp_regs = vfpregisters[:-1]
 
 caller_resp = [r0, r1, r2, r3]
 callee_resp = [r4, r5, r6, r7, r8, r9, r10, fp]