Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r46481:678a28dd058f Date: 2011-08-13 18:58 +0200 http://bitbucket.org/pypy/pypy/changeset/678a28dd058f/
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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit