Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r80159:42ca55277fde
Date: 2015-10-13 16:49 +0200
http://bitbucket.org/pypy/pypy/changeset/42ca55277fde/
Log: added minimal cpu setup and created directory structure
diff --git a/rpython/jit/backend/detect_cpu.py
b/rpython/jit/backend/detect_cpu.py
--- a/rpython/jit/backend/detect_cpu.py
+++ b/rpython/jit/backend/detect_cpu.py
@@ -15,6 +15,7 @@
MODEL_X86_64 = 'x86-64'
MODEL_ARM = 'arm'
MODEL_PPC_64 = 'ppc-64'
+MODEL_S390_64 = 's390x'
# don't use '_' in the model strings; they are replaced by '-'
@@ -26,6 +27,7 @@
MODEL_ARM: ['__arm__', '__thumb__','_M_ARM_EP'],
MODEL_X86: ['i386', '__i386', '__i386__', '__i686__','_M_IX86'],
MODEL_PPC_64: ['__powerpc64__'],
+ MODEL_S390_64:['__s390x__'],
}
for k, v in mapping.iteritems():
for macro in v:
@@ -64,6 +66,7 @@
'armv7l': MODEL_ARM,
'armv6l': MODEL_ARM,
'arm': MODEL_ARM, # freebsd
+ 's390x': MODEL_S390_64
}.get(mach)
if result is None:
@@ -111,6 +114,8 @@
return "rpython.jit.backend.x86.runner", "CPU_X86_64"
elif backend_name == MODEL_ARM:
return "rpython.jit.backend.arm.runner", "CPU_ARM"
+ elif backend_name == MODEL_S390_64:
+ return "rpython.jit.backend.zarch.runner", "CPU_ZARCH"
else:
raise ProcessorAutodetectError, (
"we have no JIT backend for this cpu: '%s'" % backend_name)
@@ -130,6 +135,7 @@
MODEL_X86_64: ['floats', 'singlefloats'],
MODEL_ARM: ['floats', 'singlefloats', 'longlong'],
MODEL_PPC_64: [], # we don't even have PPC directory, so no
+ MODEL_S390_64: [],
}[backend_name]
if __name__ == '__main__':
diff --git a/rpython/jit/backend/zarch/__init__.py
b/rpython/jit/backend/zarch/__init__.py
new file mode 100644
diff --git a/rpython/jit/backend/zarch/runner.py
b/rpython/jit/backend/zarch/runner.py
new file mode 100644
--- /dev/null
+++ b/rpython/jit/backend/zarch/runner.py
@@ -0,0 +1,7 @@
+from rpython.jit.backend.llsupport.llmodel import AbstractLLCPU
+
+class AbstractZARCHCPU(AbstractLLCPU):
+ pass
+
+class CPU_S390X(AbstractZARCHCPU):
+ pass
diff --git a/rpython/jit/backend/zarch/test/__init__.py
b/rpython/jit/backend/zarch/test/__init__.py
new file mode 100644
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit