[pypy-commit] pypy release-1.6.x: Test and fix.
arigo
noreply at buildbot.pypy.org
Sat Aug 13 19:06:19 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: release-1.6.x
Changeset: r46482:7ceb018da5a6
Date: 2011-08-13 18:58 +0200
http://bitbucket.org/pypy/pypy/changeset/7ceb018da5a6/
Log: Test and fix.
diff --git a/pypy/translator/c/gcc/test/elf64/track_zero_4.s b/pypy/translator/c/gcc/test/elf64/track_zero_4.s
new file mode 100644
--- /dev/null
+++ b/pypy/translator/c/gcc/test/elf64/track_zero_4.s
@@ -0,0 +1,18 @@
+ .type pypy_g_do_call_1, @function
+pypy_g_do_call_1:
+ pushq %rbx
+ pushq %r12
+ movq %rdi, %rbx
+ movq %rsi, %r12
+ call number1
+ ;; expected {16(%rsp) | 8(%rsp), (%rsp), %r13, %r14, %r15, %rbp | %r12}
+ testq %rbx, %rbx
+ movq %r12, %rbx
+ je .L1
+ movq (%rax), %rbx
+.L1:
+ /* GCROOT %rbx */
+ popq %r12
+ popq %rbx
+ ret
+ .size pypy_g_do_call_1, .-pypy_g_do_call_1
diff --git a/pypy/translator/c/gcc/trackgcroot.py b/pypy/translator/c/gcc/trackgcroot.py
--- a/pypy/translator/c/gcc/trackgcroot.py
+++ b/pypy/translator/c/gcc/trackgcroot.py
@@ -163,6 +163,9 @@
# Add the instruction to the list, and link it to the previous one.
previnsn = self.insns[-1]
self.insns.append(insn)
+ if (isinstance(insn, (InsnSetLocal, InsnCopyLocal)) and
+ insn.target == self.tested_for_zero):
+ self.tested_for_zero = None
try:
lst = insn.previous_insns
More information about the pypy-commit
mailing list