[pypy-commit] pypy emit-call-x86: Improve testing: any access to ebp between the GIL release and require will give nonsense results
arigo
noreply at buildbot.pypy.org
Sun May 19 20:42:53 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: emit-call-x86
Changeset: r64342:81c1063efbe4
Date: 2013-05-19 20:42 +0200
http://bitbucket.org/pypy/pypy/changeset/81c1063efbe4/
Log: Improve testing: any access to ebp between the GIL release and
require will give nonsense results
diff --git a/rpython/jit/backend/x86/callbuilder.py b/rpython/jit/backend/x86/callbuilder.py
--- a/rpython/jit/backend/x86/callbuilder.py
+++ b/rpython/jit/backend/x86/callbuilder.py
@@ -192,6 +192,9 @@
#
self.mc.CALL(imm(self.asm.releasegil_addr))
#
+ if not we_are_translated(): # for testing: we should not access
+ self.mc.ADD(ebp, imm(1)) # ebp any more
+ #
self.restore_register_arguments()
self.restore_esp(initial_esp)
@@ -220,6 +223,9 @@
#
self.mc.CALL(imm(self.asm.reacqgil_addr))
#
+ if not we_are_translated(): # for testing: now we can accesss
+ self.mc.SUB(ebp, imm(1)) # ebp again
+ #
# Now that we required the GIL, we can reload a possibly modified ebp
if self.asm._is_asmgcc():
# special-case: reload ebp from the css
More information about the pypy-commit
mailing list