[pypy-commit] pypy ppc-jit-backend: Add encode64 for PPC64.
edelsohn
noreply at buildbot.pypy.org
Fri Dec 30 16:15:03 CET 2011
Author: edelsohn
Branch: ppc-jit-backend
Changeset: r50956:6478d3b30785
Date: 2011-12-30 10:13 -0500
http://bitbucket.org/pypy/pypy/changeset/6478d3b30785/
Log: Add encode64 for PPC64.
diff --git a/pypy/jit/backend/ppc/ppcgen/helper/assembler.py b/pypy/jit/backend/ppc/ppcgen/helper/assembler.py
--- a/pypy/jit/backend/ppc/ppcgen/helper/assembler.py
+++ b/pypy/jit/backend/ppc/ppcgen/helper/assembler.py
@@ -64,6 +64,16 @@
| ord(mem[index+1]) << 16
| ord(mem[index]) << 24)
+def encode64(mem, i, n):
+ mem[i+7] = chr(n & 0xFF)
+ mem[i+6] = chr((n >> 8) & 0xFF)
+ mem[i+5] = chr((n >> 16) & 0xFF)
+ mem[i+4] = chr((n >> 24) & 0xFF)
+ mem[i+3] = chr((n >> 32) & 0xFF)
+ mem[i+2] = chr((n >> 40) & 0xFF)
+ mem[i+1] = chr((n >> 48) & 0xFF)
+ mem[i] = chr((n >> 56) & 0xFF)
+
def decode64(mem, index):
value = 0
for x in unrolling_iterable(range(8)):
More information about the pypy-commit
mailing list