Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r63458:5fc401548386
Date: 2013-04-17 19:50 +0200
http://bitbucket.org/pypy/pypy/changeset/5fc401548386/

Log:    Oups, sorry.

diff --git a/rpython/jit/backend/x86/assembler.py 
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -2368,7 +2368,7 @@
 
     def malloc_cond_varsize_frame(self, nursery_free_adr, nursery_top_adr,
                                   sizeloc, gcmap):
-        if not isinstance(sizeloc, RegLoc) or sizeloc is eax:
+        if sizeloc is eax:
             self.mc.MOV(edi, sizeloc)
             sizeloc = edi
         self.mc.MOV(eax, heap(nursery_free_adr))
diff --git a/rpython/jit/backend/x86/regalloc.py 
b/rpython/jit/backend/x86/regalloc.py
--- a/rpython/jit/backend/x86/regalloc.py
+++ b/rpython/jit/backend/x86/regalloc.py
@@ -853,8 +853,9 @@
     def consider_call_malloc_nursery_varsize_frame(self, op):
         size_box = op.getarg(0)
         assert isinstance(size_box, BoxInt) # we cannot have a const here!
-        # size_box can be anywhere (including the stack, or eax, or edi)
-        sizeloc = self.rm.loc(size_box)
+        # sizeloc must be in a register, but we can free it now
+        # (we take care explicitly of conflicts with eax or edi)
+        sizeloc = self.rm.make_sure_var_in_reg(size_box)
         self.rm.possibly_free_var(size_box)
         # the result will be in eax
         self.rm.force_allocate_reg(op.result, selected_reg=eax)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to