[pypy-svn] pypy jit-shadowstack: Fix: call_may_force ended up calling write_new_force_index(), thus
arigo
commits-noreply at bitbucket.org
Thu Mar 31 20:47:46 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: jit-shadowstack
Changeset: r43062:8054ede579d8
Date: 2011-03-31 20:47 +0200
http://bitbucket.org/pypy/pypy/changeset/8054ede579d8/
Log: Fix: call_may_force ended up calling write_new_force_index(), thus
getting two force_indexes for the operation.
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
@@ -1851,6 +1851,10 @@
self.pending_guard_tokens.append(guard_token)
def genop_call(self, op, arglocs, resloc):
+ force_index = self.write_new_force_index()
+ self._genop_call(op, arglocs, resloc, force_index)
+
+ def _genop_call(self, op, arglocs, resloc, force_index):
sizeloc = arglocs[0]
assert isinstance(sizeloc, ImmedLoc)
size = sizeloc.value
@@ -1865,7 +1869,6 @@
else:
tmp = eax
- force_index = self.write_new_force_index()
self._emit_call(force_index, x, arglocs, 3, tmp=tmp)
if IS_X86_32 and isinstance(resloc, StackLoc) and resloc.width == 8:
@@ -1897,7 +1900,7 @@
faildescr = guard_op.getdescr()
fail_index = self.cpu.get_fail_descr_number(faildescr)
self.mc.MOV_bi(FORCE_INDEX_OFS, fail_index)
- self.genop_call(op, arglocs, result_loc)
+ self._genop_call(op, arglocs, result_loc, fail_index)
self.mc.CMP_bi(FORCE_INDEX_OFS, 0)
self.implement_guard(guard_token, 'L')
More information about the Pypy-commit
mailing list