[pypy-commit] pypy arm64: add some translation tests
fijal
pypy.commits at gmail.com
Thu Jun 27 13:06:57 EDT 2019
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: arm64
Changeset: r96875:143dcb62c9b7
Date: 2019-06-27 17:03 +0000
http://bitbucket.org/pypy/pypy/changeset/143dcb62c9b7/
Log: add some translation tests
diff --git a/rpython/jit/backend/aarch64/test/test_zrpy_gc.py b/rpython/jit/backend/aarch64/test/test_zrpy_gc.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/aarch64/test/test_zrpy_gc.py
@@ -0,0 +1,6 @@
+from rpython.jit.backend.llsupport.test.zrpy_gc_test import CompileFrameworkTests
+
+
+class TestShadowStack(CompileFrameworkTests):
+ gcrootfinder = "shadowstack"
+ gc = "incminimark"
diff --git a/rpython/jit/backend/aarch64/test/test_zrpy_gc_boehm.py b/rpython/jit/backend/aarch64/test/test_zrpy_gc_boehm.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/aarch64/test/test_zrpy_gc_boehm.py
@@ -0,0 +1,1 @@
+from rpython.jit.backend.llsupport.test.zrpy_gc_boehm_test import compile_boehm_test as test_compile_boehm
diff --git a/rpython/jit/backend/aarch64/test/test_ztranslation_call_assembler.py b/rpython/jit/backend/aarch64/test/test_ztranslation_call_assembler.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/aarch64/test/test_ztranslation_call_assembler.py
@@ -0,0 +1,23 @@
+from rpython.jit.backend.llsupport.test.ztranslation_test import TranslationTestCallAssembler
+from rpython.translator.translator import TranslationContext
+from rpython.config.translationoption import DEFL_GC
+from rpython.jit.backend.x86.arch import WORD
+import sys
+
+
+# On Windows, this test crashes obscurely, but only if compiled with
+# Boehm, not if run with no GC at all. So for now we'll assume it is
+# really a Boehm bug, or maybe a Boehm-on-Windows-specific issue, and
+# skip.
+if sys.platform == 'win32':
+ import py
+ py.test.skip("crashes on Windows (Boehm issue?)")
+
+
+class TestTranslationCallAssemblerX86(TranslationTestCallAssembler):
+ def _check_cbuilder(self, cbuilder):
+ #We assume here that we have sse2. If not, the CPUClass
+ # needs to be changed to CPU386_NO_SSE2, but well.
+ if WORD == 4 and sys.platform != 'win32':
+ assert '-msse2' in cbuilder.eci.compile_extra
+ assert '-mfpmath=sse' in cbuilder.eci.compile_extra
diff --git a/rpython/jit/backend/aarch64/test/test_ztranslation_external_exception.py b/rpython/jit/backend/aarch64/test/test_ztranslation_external_exception.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/aarch64/test/test_ztranslation_external_exception.py
@@ -0,0 +1,19 @@
+from rpython.jit.backend.llsupport.test.ztranslation_test import TranslationRemoveTypePtrTest
+from rpython.translator.translator import TranslationContext
+from rpython.config.translationoption import DEFL_GC
+from rpython.translator.platform import platform as compiler
+
+if compiler.name == 'msvc':
+ _MSVC = True
+else:
+ _MSVC = False
+
+class TestTranslationRemoveTypePtrX86(TranslationRemoveTypePtrTest):
+ def _get_TranslationContext(self):
+ t = TranslationContext()
+ t.config.translation.gc = DEFL_GC # 'hybrid' or 'minimark'
+ if not _MSVC:
+ t.config.translation.gcrootfinder = 'asmgcc'
+ t.config.translation.list_comprehension_operations = True
+ t.config.translation.gcremovetypeptr = True
+ return t
diff --git a/rpython/jit/backend/aarch64/test/test_ztranslation_jit_stats.py b/rpython/jit/backend/aarch64/test/test_ztranslation_jit_stats.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/aarch64/test/test_ztranslation_jit_stats.py
@@ -0,0 +1,14 @@
+from rpython.jit.backend.llsupport.test.ztranslation_test import TranslationTestJITStats
+from rpython.translator.translator import TranslationContext
+from rpython.config.translationoption import DEFL_GC
+from rpython.jit.backend.x86.arch import WORD
+import sys
+
+
+class TestTranslationJITStatsX86(TranslationTestJITStats):
+ def _check_cbuilder(self, cbuilder):
+ #We assume here that we have sse2. If not, the CPUClass
+ # needs to be changed to CPU386_NO_SSE2, but well.
+ if WORD == 4 and sys.platform != 'win32':
+ assert '-msse2' in cbuilder.eci.compile_extra
+ assert '-mfpmath=sse' in cbuilder.eci.compile_extra
More information about the pypy-commit
mailing list