David Schneider avatar David Schneider committed a46161c

revert change using stm/ldm for now

Comments (0)

Files changed (1)

rpython/jit/backend/arm/assembler.py

             regs = CoreRegisterManager.save_around_call_regs
         else:
             regs = CoreRegisterManager.all_regs
-        mc.ADD_ri(r.ip.value, r.fp.value, base_ofs)
-        mc.STM(r.ip.value, [reg.value for reg in regs
-                                    if reg not in ignored_regs])
+        # XXX use STMDB ops here
+        for i, gpr in enumerate(regs):
+            if gpr in ignored_regs:
+                continue
+            self.store_reg(mc, gpr, r.fp, base_ofs + i * WORD)
         if withfloats:
             if callee_only:
                 regs = VFPRegisterManager.save_around_call_regs
             else:
                 regs = VFPRegisterManager.all_regs
-            ofs = len(CoreRegisterManager.all_regs) * WORD
-            mc.ADD_ri(r.ip.value, r.ip.value, ofs)
-            mc.VSTM(r.ip.value, [vfpr.value for vfpr in regs
-                                    if vfpr not in ignored_regs])
+            for i, vfpr in enumerate(regs):
+                if vfpr in ignored_regs:
+                    continue
+                ofs = len(CoreRegisterManager.all_regs) * WORD
+                ofs += i * DOUBLE_WORD + base_ofs
+                self.store_reg(mc, vfpr, r.fp, ofs)
 
     def _pop_all_regs_from_jitframe(self, mc, ignored_regs, withfloats,
                                  callee_only=False):
             regs = CoreRegisterManager.save_around_call_regs
         else:
             regs = CoreRegisterManager.all_regs
-        mc.ADD_ri(r.ip.value, r.fp.value, base_ofs)
-        mc.LDM(r.ip.value, [reg.value for reg in regs
-                                    if reg not in ignored_regs])
+        # XXX use LDMDB ops here
+        for i, gpr in enumerate(regs):
+            if gpr in ignored_regs:
+                continue
+            ofs = i * WORD + base_ofs
+            self.load_reg(mc, gpr, r.fp, ofs)
         if withfloats:
             # Pop all XMM regs
             if callee_only:
                 regs = VFPRegisterManager.save_around_call_regs
             else:
                 regs = VFPRegisterManager.all_regs
-            ofs = len(CoreRegisterManager.all_regs) * WORD
-            mc.ADD_ri(r.ip.value, r.ip.value, ofs)
-            mc.VLDM(r.ip.value, [vfpr.value for vfpr in regs
-                                    if vfpr not in ignored_regs])
+            for i, vfpr in enumerate(regs):
+                if vfpr in ignored_regs:
+                    continue
+                ofs = len(CoreRegisterManager.all_regs) * WORD
+                ofs += i * DOUBLE_WORD + base_ofs
+                self.load_reg(mc, vfpr, r.fp, ofs)
 
     def _build_failure_recovery(self, exc, withfloats=False):
         mc = InstrBuilder(self.cpu.cpuinfo.arch_version)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.