Author: David Schneider <david.schnei...@picle.org>
Branch: arm-backend-2
Changeset: r56532:e3830cb63c1a
Date: 2012-08-02 11:42 +0200
http://bitbucket.org/pypy/pypy/changeset/e3830cb63c1a/

Log:    save correct registers around call to assembler_helper function in
        call_assembler

diff --git a/pypy/jit/backend/arm/opassembler.py 
b/pypy/jit/backend/arm/opassembler.py
--- a/pypy/jit/backend/arm/opassembler.py
+++ b/pypy/jit/backend/arm/opassembler.py
@@ -1188,7 +1188,16 @@
             floats = r.caller_vfp_resp
         else:
             floats = []
-        with saved_registers(self.mc, r.caller_resp[1:] + [r.ip], floats):
+        # in case the call has a result we do not need to save the
+        # corresponding result register because it was already allocated for
+        # the result
+        core = r.caller_resp
+        if op.result: 
+            if resloc.is_vfp_reg(): 
+                floats = r.caller_vfp_resp[1:]
+            else:
+                core = r.caller_resp[1:] + [r.ip] # keep alignment
+        with saved_registers(self.mc, core, floats):
             # result of previous call is in r0
             self.mov_loc_loc(arglocs[0], r.r1)
             self.mc.BL(asm_helper_adr)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to