[pypy-svn] pypy arm-backend-2: tests and test fixes
bivab
commits-noreply at bitbucket.org
Wed Feb 23 18:56:16 CET 2011
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r42240:405092e4e2e3
Date: 2011-02-23 18:54 +0100
http://bitbucket.org/pypy/pypy/changeset/405092e4e2e3/
Log: tests and test fixes
diff --git a/pypy/jit/backend/arm/test/test_regalloc.py b/pypy/jit/backend/arm/test/test_regalloc.py
--- a/pypy/jit/backend/arm/test/test_regalloc.py
+++ b/pypy/jit/backend/arm/test/test_regalloc.py
@@ -665,6 +665,20 @@
bridge = self.attach_bridge(ops, loop, -2)
+ self.cpu.set_future_value_int(0, 4)
+ self.cpu.set_future_value_int(1, 7)
+ self.run(loop)
+ assert self.getint(0) == 29
+
+ def test_jump_with_consts(self):
+ loop = """
+ [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14]
+ jump(i1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
+ """
+ large = self.interpret(loop, range(15), run=False)
+ # ensure compiling this loop works
+ assert 1
+
def test_from_loop_to_loop(self):
def assembler_helper(failindex, virtualizable):
return 1
@@ -726,17 +740,3 @@
"""
self.interpret(ops, range(11))
assert self.getint(0) == 2 # and not segfault()
-
- self.cpu.set_future_value_int(0, 4)
- self.cpu.set_future_value_int(1, 7)
- self.run(loop)
- assert self.getint(0) == 29
-
- def test_jump_with_consts(self):
- loop = """
- [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14]
- jump(i1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
- """
- large = self.interpret(loop, range(15), run=False)
- # ensure compiling this loop works
- assert 1
diff --git a/pypy/jit/backend/arm/test/test_assembler.py b/pypy/jit/backend/arm/test/test_assembler.py
--- a/pypy/jit/backend/arm/test/test_assembler.py
+++ b/pypy/jit/backend/arm/test/test_assembler.py
@@ -163,7 +163,7 @@
# call to div
self.a.mc.PUSH(range(2, 12))
- div_addr = rffi.cast(lltype.Signed, llhelper(arm_int_div_sign, arm_int_div))
+ div_addr = rffi.cast(lltype.Signed, arm_int_div)
self.a.mc.BL(div_addr)
self.a.mc.POP(range(2, 12))
self.a.gen_func_epilog()
@@ -217,8 +217,16 @@
self.a.mov_loc_loc(imm(2478), r.r0)
self.a.gen_func_epilog()
assert run_asm(self.a) == 2478
-
+ def test_load_store(self):
+ x = 0x60002224
+ self.a.gen_func_prolog()
+ self.a.mc.gen_load_int(r.r1.value, x)
+ self.a.mc.MOV_ri(r.r3.value, 8)
+ self.a.mc.STR_rr(r.r1.value, r.fp.value, r.r3.value)
+ self.a.mc.LDR_ri(r.r0.value, r.fp.value, 8)
+ self.a.gen_func_epilog()
+ assert run_asm(self.a) == x
def callme(inp):
i = inp + 10
More information about the Pypy-commit
mailing list