Author: hager <[email protected]>
Branch: ppc-jit-backend
Changeset: r52975:287553fbcb22
Date: 2012-02-28 14:06 +0100
http://bitbucket.org/pypy/pypy/changeset/287553fbcb22/
Log: (bivab, hager): the previous jump condition was correct, see comment
in code
diff --git a/pypy/jit/backend/ppc/opassembler.py
b/pypy/jit/backend/ppc/opassembler.py
--- a/pypy/jit/backend/ppc/opassembler.py
+++ b/pypy/jit/backend/ppc/opassembler.py
@@ -938,7 +938,12 @@
# patch the JZ above
offset = self.mc.currpos() - jz_location
pmc = OverwritingBuilder(self.mc, jz_location, 1)
- pmc.bc(12, 2, offset) # jump if the two values are equal
+ # We want to jump if the compared bits are not equal.
+ # This corresponds to the x86 backend, which uses
+ # the TEST operation. Hence, on first sight, it might
+ # seem that we use the wrong condition here. This is
+ # because TEST results in a 1 if the operands are different.
+ pmc.bc(4, 2, offset)
pmc.overwrite()
emit_cond_call_gc_wb_array = emit_cond_call_gc_wb
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit