[pypy-commit] pypy arm-backend-2: avoid creating a large prebuilt constant

bivab noreply at buildbot.pypy.org
Wed Jun 13 16:30:56 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r55646:f1dcbeddbdff
Date: 2012-06-13 16:16 +0200
http://bitbucket.org/pypy/pypy/changeset/f1dcbeddbdff/

Log:	avoid creating a large prebuilt constant

diff --git a/pypy/jit/backend/arm/instruction_builder.py b/pypy/jit/backend/arm/instruction_builder.py
--- a/pypy/jit/backend/arm/instruction_builder.py
+++ b/pypy/jit/backend/arm/instruction_builder.py
@@ -352,7 +352,7 @@
     return f
 
 def define_simd_instructions_3regs_func(name, table):
-    n = 0x79 << 25
+    n = 0
     if 'A' in table:
         n |= (table['A'] & 0xF) << 8
     if 'B' in table:
@@ -362,14 +362,16 @@
     if 'C' in table:
         n |= (table['C'] & 0x3) << 20
     if name == 'VADD_i64' or name == 'VSUB_i64':
-        size = 0x3
-        n |= size << 20
+        size = 0x3 << 20
+        n |= size
     def f(self, dd, dn, dm):
+        base = 0x79
         N = (dn >> 4) & 0x1
         M = (dm >> 4) & 0x1
         D = (dd >> 4) & 0x1
         Q = 0 # we want doubleword regs
         instr = (n
+		| base << 25
                 | D << 22
                 | (dn & 0xf) << 16
                 | (dd & 0xf) << 12


More information about the pypy-commit mailing list