[pypy-commit] pypy backend-vector-ops: fix test_assembler

fijal noreply at buildbot.pypy.org
Wed Feb 1 14:57:40 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: backend-vector-ops
Changeset: r52017:e64e4871ab14
Date: 2012-02-01 15:57 +0200
http://bitbucket.org/pypy/pypy/changeset/e64e4871ab14/

Log:	fix test_assembler

diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -3,7 +3,7 @@
 from pypy.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
 from pypy.jit.metainterp.history import Const, Box, BoxInt, ConstInt, BoxVector
 from pypy.jit.metainterp.history import AbstractFailDescr, INT, REF, FLOAT
-from pypy.jit.metainterp.history import JitCellToken
+from pypy.jit.metainterp.history import JitCellToken, BoxPtr, BoxFloat
 from pypy.rpython.lltypesystem import lltype, rffi, rstr, llmemory
 from pypy.rpython.lltypesystem.lloperation import llop
 from pypy.rpython.annlowlevel import llhelper
@@ -1802,7 +1802,7 @@
 
     def rebuild_faillocs_from_descr(self, bytecode):
         from pypy.jit.backend.x86.regalloc import X86FrameManager
-        descr_to_box_type = [REF, INT, FLOAT]
+        descr_to_box_type = [BoxPtr(), BoxInt(), BoxFloat()]
         bytecode = rffi.cast(rffi.UCHARP, bytecode)
         arglocs = []
         code_inputarg = False
diff --git a/pypy/jit/backend/x86/test/test_assembler.py b/pypy/jit/backend/x86/test/test_assembler.py
--- a/pypy/jit/backend/x86/test/test_assembler.py
+++ b/pypy/jit/backend/x86/test/test_assembler.py
@@ -33,12 +33,12 @@
     failargs = [BoxInt(), BoxPtr(), BoxFloat()] * 3
     failargs.insert(6, None)
     failargs.insert(7, None)
-    locs = [X86FrameManager.frame_pos(0, INT),
-            X86FrameManager.frame_pos(1, REF),
-            X86FrameManager.frame_pos(10, FLOAT),
-            X86FrameManager.frame_pos(100, INT),
-            X86FrameManager.frame_pos(101, REF),
-            X86FrameManager.frame_pos(110, FLOAT),
+    locs = [X86FrameManager.frame_pos(0, BoxInt()),
+            X86FrameManager.frame_pos(1, BoxPtr()),
+            X86FrameManager.frame_pos(10, BoxFloat()),
+            X86FrameManager.frame_pos(100, BoxInt()),
+            X86FrameManager.frame_pos(101, BoxPtr()),
+            X86FrameManager.frame_pos(110, BoxFloat()),
             None,
             None,
             ebx,
@@ -272,7 +272,7 @@
 
     def test_simple(self):
         def callback(asm):
-            asm.mov(imm(42), edx)
+            asm.mov(BoxInt(), imm(42), edx)
             asm.regalloc_push(edx)
             asm.regalloc_pop(eax)
         res = self.do_test(callback)
@@ -280,9 +280,9 @@
 
     def test_push_stack(self):
         def callback(asm):
-            loc = self.fm.frame_pos(5, INT)
+            loc = self.fm.frame_pos(5, BoxInt())
             asm.mc.SUB_ri(esp.value, 64)
-            asm.mov(imm(42), loc)
+            asm.mov(BoxInt(), imm(42), loc)
             asm.regalloc_push(loc)
             asm.regalloc_pop(eax)
             asm.mc.ADD_ri(esp.value, 64)
@@ -291,12 +291,12 @@
 
     def test_pop_stack(self):
         def callback(asm):
-            loc = self.fm.frame_pos(5, INT)
+            loc = self.fm.frame_pos(5, BoxInt())
             asm.mc.SUB_ri(esp.value, 64)
-            asm.mov(imm(42), edx)
+            asm.mov(BoxInt(), imm(42), edx)
             asm.regalloc_push(edx)
             asm.regalloc_pop(loc)
-            asm.mov(loc, eax)
+            asm.mov(BoxInt(), loc, eax)
             asm.mc.ADD_ri(esp.value, 64)
         res = self.do_test(callback)
         assert res == 42
@@ -305,7 +305,7 @@
         def callback(asm):
             c = ConstFloat(longlong.getfloatstorage(-42.5))
             loc = self.xrm.convert_to_imm(c)
-            asm.mov(loc, xmm5)
+            asm.mov(BoxInt(), loc, xmm5)
             asm.regalloc_push(xmm5)
             asm.regalloc_pop(xmm0)
             asm.mc.CVTTSD2SI(eax, xmm0)
@@ -316,10 +316,10 @@
         def callback(asm):
             c = ConstFloat(longlong.getfloatstorage(-42.5))
             loc = self.xrm.convert_to_imm(c)
-            loc2 = self.fm.frame_pos(4, FLOAT)
+            loc2 = self.fm.frame_pos(4, BoxFloat())
             asm.mc.SUB_ri(esp.value, 64)
-            asm.mov(loc, xmm5)
-            asm.mov(xmm5, loc2)
+            asm.mov(BoxInt(), loc, xmm5)
+            asm.mov(BoxInt(), xmm5, loc2)
             asm.regalloc_push(loc2)
             asm.regalloc_pop(xmm0)
             asm.mc.ADD_ri(esp.value, 64)
@@ -331,12 +331,12 @@
         def callback(asm):
             c = ConstFloat(longlong.getfloatstorage(-42.5))
             loc = self.xrm.convert_to_imm(c)
-            loc2 = self.fm.frame_pos(4, FLOAT)
+            loc2 = self.fm.frame_pos(4, BoxFloat())
             asm.mc.SUB_ri(esp.value, 64)
-            asm.mov(loc, xmm5)
+            asm.mov(BoxInt(), loc, xmm5)
             asm.regalloc_push(xmm5)
             asm.regalloc_pop(loc2)
-            asm.mov(loc2, xmm0)
+            asm.mov(BoxInt(), loc2, xmm0)
             asm.mc.ADD_ri(esp.value, 64)
             asm.mc.CVTTSD2SI(eax, xmm0)
         res = self.do_test(callback)


More information about the pypy-commit mailing list