[pypy-svn] pypy lltrace: Fix.
arigo
commits-noreply at bitbucket.org
Wed Feb 23 14:54:32 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: lltrace
Changeset: r42222:324614f81b83
Date: 2011-02-22 17:12 +0100
http://bitbucket.org/pypy/pypy/changeset/324614f81b83/
Log: Fix.
diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -1256,6 +1256,7 @@
def generate_ll_trace(self, dest_addr, value_loc):
# XXX for now, we only trace 32-bit pointer-sized writes
+ assert IS_X86_32 # <--- for PUSH_i32 below
self.mc.PUSH_r(eax.value)
self.mc.PUSH_r(ecx.value)
self.mc.PUSH_r(edx.value)
@@ -1264,7 +1265,11 @@
# use the current address as the mark
self.mc.CALL_l(0) # this is equivalent to "PUSH(IP)"
# push the newvalue
- self.mc.PUSH(value_loc)
+ if isinstance(value_loc, RegLoc):
+ self.mc.PUSH_r(value_loc.value)
+ else:
+ assert isinstance(value_loc, ImmedLoc)
+ self.mc.PUSH_i32(value_loc.value)
# push the address in which we are about to write
self.mc.LEA(eax, dest_addr)
self.mc.PUSH_r(eax.value)
More information about the Pypy-commit
mailing list