Author: Armin Rigo <[email protected]>
Branch:
Changeset: r88329:71779cad4a61
Date: 2016-11-12 10:08 +0100
http://bitbucket.org/pypy/pypy/changeset/71779cad4a61/
Log: Fix for calls to '__x86.get_pc_thunk'
diff --git a/rpython/translator/c/gcc/trackgcroot.py
b/rpython/translator/c/gcc/trackgcroot.py
--- a/rpython/translator/c/gcc/trackgcroot.py
+++ b/rpython/translator/c/gcc/trackgcroot.py
@@ -926,6 +926,13 @@
assert lineoffset in (1,2)
return [InsnStackAdjust(-4)]
+ if target.startswith('__x86.get_pc_thunk.'):
+ # special case, found on x86-32: these static functions
+ # contain only a simple load of some non-GC pointer to
+ # a specific register (not necessarily EAX)
+ reg = '%e' + target.split('.')[-1]
+ return [InsnSetLocal(reg)]
+
insns = [InsnCall(target, self.currentlineno),
InsnSetLocal(self.EAX)] # the result is there
if self.format in ('mingw32', 'msvc'):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit