Author: Remi Meier <remi.me...@gmail.com>
Branch: stmgc-c4
Changeset: r66211:c2953cb28b82
Date: 2013-08-19 14:40 +0200
http://bitbucket.org/pypy/pypy/changeset/c2953cb28b82/

Log:    fix for ptr_eq because a function returning _Bool only sets the
        lower 8 bits of the return value

diff --git a/rpython/jit/backend/x86/assembler.py 
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -2337,8 +2337,9 @@
         mc.CALL(imm(func))
         # result still on stack
         mc.POP_r(X86_64_SCRATCH_REG.value)
-        # set flags:
-        mc.TEST_rr(X86_64_SCRATCH_REG.value, X86_64_SCRATCH_REG.value)
+        # _Bool return type only sets lower 8 bits of return value
+        sl = X86_64_SCRATCH_REG.lowest8bits()
+        mc.CMP8_ri(sl.value, 0)
         #
         # END SLOWPATH
         #
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to