[pypy-svn] r37454 - pypy/dist/pypy/jit/codegen/ppc
mwh at codespeak.net
mwh at codespeak.net
Sun Jan 28 00:56:41 CET 2007
Author: mwh
Date: Sun Jan 28 00:56:22 2007
New Revision: 37454
Modified:
pypy/dist/pypy/jit/codegen/ppc/emit_moves.py
pypy/dist/pypy/jit/codegen/ppc/instruction.py
pypy/dist/pypy/jit/codegen/ppc/rgenop.py
Log:
small fixes, and avoidance of some unnecessary moves.
still crashing on some random functions...
Modified: pypy/dist/pypy/jit/codegen/ppc/emit_moves.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/ppc/emit_moves.py (original)
+++ pypy/dist/pypy/jit/codegen/ppc/emit_moves.py Sun Jan 28 00:56:22 2007
@@ -53,7 +53,8 @@
data.loc2src[loc] = src
for tarvar in tarvars:
- _cycle_walk(gen, tarvar, data)
+ if data.tar2loc[tarvar] != data.src2loc[data.tar2src[tarvar]]:
+ _cycle_walk(gen, tarvar, data)
return data
@@ -68,8 +69,6 @@
#print "srcvar in data.src2loc", srcvar, srcvar in data.src2loc
srcloc = data.src2loc[srcvar]
-
-
# if location we are about to write to is not going to be read
# by anyone, we are safe
if tarloc not in data.loc2src:
Modified: pypy/dist/pypy/jit/codegen/ppc/instruction.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/ppc/instruction.py (original)
+++ pypy/dist/pypy/jit/codegen/ppc/instruction.py Sun Jan 28 00:56:22 2007
@@ -526,7 +526,7 @@
asm.lwz(r, rFP, self.stack.offset)
if not isinstance(self.reg, GPR):
assert isinstance(self.reg, CRF)
- self.reg.move_from_gpr(0).emit(asm)
+ self.reg.move_from_gpr(None, 0).emit(asm)
class Spill(AllocTimeInsn):
""" A special instruction inserted by our register "allocator."
Modified: pypy/dist/pypy/jit/codegen/ppc/rgenop.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/ppc/rgenop.py (original)
+++ pypy/dist/pypy/jit/codegen/ppc/rgenop.py Sun Jan 28 00:56:22 2007
@@ -126,7 +126,8 @@
self.allocator = allocator
def emit_move(self, tarloc, srcloc):
- if tarloc == srcloc: return
+ if tarloc == srcloc:
+ return
emit = self.insns.append
if tarloc.is_register and srcloc.is_register:
assert isinstance(tarloc, insn.GPR)
More information about the Pypy-commit
mailing list