Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r81536:cbc9bc98efec
Date: 2016-01-04 09:15 +0100
http://bitbucket.org/pypy/pypy/changeset/cbc9bc98efec/
Log: missing files
diff --git a/rpython/jit/backend/zarch/test/test_basic.py
b/rpython/jit/backend/zarch/test/test_basic.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/zarch/test/test_basic.py
@@ -0,0 +1,40 @@
+import py
+from rpython.jit.codewriter.policy import StopAtXPolicy
+from rpython.rlib.jit import JitDriver
+from rpython.jit.metainterp.test import test_ajit
+from rpython.jit.backend.zarch.test.support import JitZARCHMixin
+from rpython.jit.backend.detect_cpu import getcpuclass
+
+CPU = getcpuclass()
+
+class TestBasic(JitZARCHMixin, test_ajit.BaseLLtypeTests):
+ # for the individual tests see
+ # ====> ../../../metainterp/test/test_ajit.py
+ def test_bug(self):
+ jitdriver = JitDriver(greens = [], reds = ['n'])
+ class X(object):
+ pass
+ def f(n):
+ while n > -100:
+ jitdriver.can_enter_jit(n=n)
+ jitdriver.jit_merge_point(n=n)
+ x = X()
+ x.arg = 5
+ if n <= 0: break
+ n -= x.arg
+ x.arg = 6 # prevents 'x.arg' from being annotated as constant
+ return n
+ res = self.meta_interp(f, [31], enable_opts='')
+ assert res == -4
+
+ def test_r_dict(self):
+ # a Struct that belongs to the hash table is not seen as being
+ # included in the larger Array
+ py.test.skip("issue with ll2ctypes")
+
+ def test_free_object(self):
+ py.test.skip("issue of freeing, probably with ll2ctypes")
+
+ if not CPU.supports_longlong:
+ def test_read_timestamp(self):
+ py.test.skip('requires longlong')
diff --git a/rpython/jit/backend/zarch/test/test_calling_convention.py
b/rpython/jit/backend/zarch/test/test_calling_convention.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/zarch/test/test_calling_convention.py
@@ -0,0 +1,18 @@
+from rpython.jit.backend.test.calling_convention_test import CallingConvTests
+from rpython.jit.backend.zarch.codebuilder import InstrBuilder
+from rpython.rtyper.lltypesystem import lltype, rffi
+import rpython.jit.backend.zarch.registers as r
+import rpython.jit.backend.zarch.conditions as c
+
+
+class TestPPCCallingConvention(CallingConvTests):
+ # ../../test/calling_convention_test.py
+
+ def make_function_returning_stack_pointer(self):
+ mc = InstrBuilder()
+ mc.LGR(r.r2, r.SP)
+ mc.BCR(c.ANY, r.r14)
+ return rffi.cast(lltype.Signed, mc.get_assembler_function())
+
+ def get_alignment_requirements(self):
+ return 2 # two byte alignment
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit