[pypy-svn] r65197 - pypy/branch/pyjitpl5/pypy/jit/backend/x86
arigo at codespeak.net
arigo at codespeak.net
Sun May 10 13:47:24 CEST 2009
Author: arigo
Date: Sun May 10 13:47:22 2009
New Revision: 65197
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
Log:
Yay! With this final hack, a test finally pass.
See next checkin for the test...
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py Sun May 10 13:47:22 2009
@@ -264,17 +264,21 @@
self.make_sure_mc_exists()
addr = self.mc.tell()
self.mc.SUB(esp, imm(framesize * WORD))
+ # This uses XCHG to put zeroes in fail_boxes after reading them,
+ # just in case they are pointers.
for i in range(len(arglocs)):
loc = arglocs[i]
if not isinstance(loc, REG):
- self.mc.MOV(ecx,
- addr_add(imm(self.fail_box_addr), imm(i*WORD)))
+ self.mc.XOR(ecx, ecx)
+ self.mc.XCHG(ecx,
+ addr_add(imm(self.fail_box_addr), imm(i*WORD)))
self.mc.MOV(loc, ecx)
for i in range(len(arglocs)):
loc = arglocs[i]
if isinstance(loc, REG):
- self.mc.MOV(loc,
- addr_add(imm(self.fail_box_addr), imm(i*WORD)))
+ self.mc.XOR(loc, loc)
+ self.mc.XCHG(loc,
+ addr_add(imm(self.fail_box_addr), imm(i*WORD)))
self.mc.JMP(rel32(jumpaddr))
self.mc.done()
return addr
More information about the Pypy-commit
mailing list