Author: Matti Picus <[email protected]>
Branch: release-5.x
Changeset: r84944:b7d93985eb7b
Date: 2016-06-05 22:47 +0300
http://bitbucket.org/pypy/pypy/changeset/b7d93985eb7b/
Log: fix merge
diff --git a/pypy/module/cpyext/include/patchlevel.h
b/pypy/module/cpyext/include/patchlevel.h
--- a/pypy/module/cpyext/include/patchlevel.h
+++ b/pypy/module/cpyext/include/patchlevel.h
@@ -29,8 +29,8 @@
#define PY_VERSION "2.7.10"
/* PyPy version as a string */
-#define PYPY_VERSION "5.1.2"
-#define PYPY_VERSION_NUM 0x05010200
+#define PYPY_VERSION "5.3.0"
+#define PYPY_VERSION_NUM 0x05030000
/* Defined to mean a PyPy where cpyext holds more regular references
to PyObjects, e.g. staying alive as long as the internal PyPy object
diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py
--- a/pypy/module/sys/version.py
+++ b/pypy/module/sys/version.py
@@ -10,7 +10,7 @@
#XXX # sync CPYTHON_VERSION with patchlevel.h, package.py
CPYTHON_API_VERSION = 1013 #XXX # sync with include/modsupport.h
-PYPY_VERSION = (5, 1, 2, "final", 0) #XXX # sync patchlevel.h
+PYPY_VERSION = (5, 3, 0, "final", 0) #XXX # sync patchlevel.h
import pypy
diff --git a/rpython/doc/arch/index.rst b/rpython/doc/arch/index.rst
deleted file mode 100644
--- a/rpython/doc/arch/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-.. _arch_index:
-
-Architecture specific notes
-===========================
-
-Here you can find some architecture specific notes.
-
-.. toctree::
- :maxdepth: 1
-
- s390x
diff --git a/rpython/doc/arch/s390x.rst b/rpython/doc/arch/s390x.rst
deleted file mode 100644
--- a/rpython/doc/arch/s390x.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-.. _s390x:
-
-IBM Mainframe S390X
-===================
-
-Our JIT implements the 64 bit version of the IBM Mainframe called s390x.
-Note that this architecture is big endian.
-
-Currently supported ISAs:
-
-* z13 (released January 2015)
-* zEC12 (released September 2012)
-* z196 (released August 2010)
-* z10 (released February 2008)
-
-To check if all the necessary CPU facilities are installed
-on the subject machine, please run the test using a copy of the pypy
-source code::
-
- $ ./pytest.py rpython/jit/backend/zarch/test/test_assembler -v -k
'test_facility'
-
-In addition you can run the auto encoding test to check if your Linux GCC tool
chain
-is able to compile all instructions used in the JIT backend::
-
- $ ./pytest.py rpython/jit/backend/zarch/test/test_auto_encoding.py -v
-
-Translating
------------
-
-Specifically check for these two dependencies. On old versions of some
-Linux distributions ship older versions.
-
-* libffi (version should do > 3.0.+).
-* CPython 2.7.+.
diff --git a/rpython/doc/index.rst b/rpython/doc/index.rst
--- a/rpython/doc/index.rst
+++ b/rpython/doc/index.rst
@@ -37,6 +37,7 @@
arm
logging
+ s390x
Writing your own interpreter in RPython
@@ -60,7 +61,6 @@
getting-started
dir-reference
jit/index
- arch/index
translation
rtyper
garbage_collection
diff --git a/rpython/jit/backend/zarch/instructions.py
b/rpython/jit/backend/zarch/instructions.py
--- a/rpython/jit/backend/zarch/instructions.py
+++ b/rpython/jit/backend/zarch/instructions.py
@@ -44,6 +44,7 @@
# rotating
'RISBG': ('rie_f', ['\xEC','\x55']),
+ 'RISBGN': ('rie_f', ['\xEC','\x59']),
# invert & negative & absolute
'LPGR': ('rre', ['\xB9','\x00']),
diff --git a/rpython/jit/backend/zarch/test/test_assembler.py
b/rpython/jit/backend/zarch/test/test_assembler.py
--- a/rpython/jit/backend/zarch/test/test_assembler.py
+++ b/rpython/jit/backend/zarch/test/test_assembler.py
@@ -155,15 +155,7 @@
s64 = bin(fac_data[1])[2:]
print(f64)
print(s64)
- for i,c in enumerate(f64):
- print('index: %d is set? %s' % (i,c))
-
- assert f64[1] == '1' # The z/Architecture architectural mode is
installed.
- assert f64[2] == '1' # The z/Architecture architectural mode is active.
assert f64[18] == '1' # long displacement facility
- assert f64[21] == '1' # extended immediate facility
- assert f64[34] == '1' # general instruction facility
- assert f64[41] == '1' # floating-point-support-enhancement
def test_load_byte_zero_extend(self):
adr = self.a.datablockwrapper.malloc_aligned(16, 16)
@@ -197,7 +189,7 @@
@py.test.mark.parametrize('p',
[2**32,2**32+1,2**63-1,2**63-2,0,1,2,3,4,5,6,7,8,10001])
def test_align_withroll(self, p):
self.a.mc.load_imm(r.r2, p & 0xffffFFFFffffFFFF)
- self.a.mc.RISBG(r.r2, r.r2, loc.imm(0), loc.imm(0x80 | 60), loc.imm(0))
+ self.a.mc.RISBGN(r.r2, r.r2, loc.imm(0), loc.imm(0x80 | 60),
loc.imm(0))
self.a.mc.BCR(con.ANY, r.r14)
assert run_asm(self.a) == rffi.cast(rffi.ULONG,p) & ~(7)
@@ -222,7 +214,7 @@
n = 13
l = loc
self.a.mc.load_imm(r.r2, 7<<n)
- self.a.mc.RISBG(r.r2, r.r2, l.imm(61), l.imm(0x80 | 63), l.imm(64-n))
+ self.a.mc.RISBGN(r.r2, r.r2, l.imm(61), l.imm(0x80 | 63), l.imm(64-n))
self.a.mc.BCR(con.ANY, r.r14)
assert run_asm(self.a) == 7
@@ -230,7 +222,7 @@
n = 16
l = loc
self.a.mc.load_imm(r.r2, 0xffFFffFF)
- self.a.mc.RISBG(r.r2, r.r2, l.imm(60), l.imm(0x80 | 63), l.imm(64-n))
+ self.a.mc.RISBGN(r.r2, r.r2, l.imm(60), l.imm(0x80 | 63), l.imm(64-n))
self.a.mc.BCR(con.ANY, r.r14)
assert run_asm(self.a) == 15
diff --git a/rpython/jit/backend/zarch/test/test_auto_encoding.py
b/rpython/jit/backend/zarch/test/test_auto_encoding.py
--- a/rpython/jit/backend/zarch/test/test_auto_encoding.py
+++ b/rpython/jit/backend/zarch/test/test_auto_encoding.py
@@ -204,7 +204,7 @@
g.write('%s\n' % op)
oplist.append(op)
g.write('\t.string "%s"\n' % END_TAG)
- proc = subprocess.Popen(['as', '-m64', '-mzarch', '-march=z196',
+ proc = subprocess.Popen(['as', '-m64', '-mzarch', '-march=zEC12',
inputname, '-o', filename],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
diff --git a/rpython/translator/platform/arch/__init__.py
b/rpython/translator/platform/arch/__init__.py
deleted file mode 100644
diff --git a/rpython/translator/platform/arch/s390x.py
b/rpython/translator/platform/arch/s390x.py
deleted file mode 100644
--- a/rpython/translator/platform/arch/s390x.py
+++ /dev/null
@@ -1,86 +0,0 @@
-import re
-
-def extract_s390x_cpu_ids(lines):
- """ NOT_RPYTHON """
- ids = []
-
- re_number = re.compile("processor (\d+):")
- re_version = re.compile("version = ([0-9A-Fa-f]+)")
- re_id = re.compile("identification = ([0-9A-Fa-f]+)")
- re_machine = re.compile("machine = ([0-9A-Fa-f]+)")
- for line in lines:
- number = -1
- version = None
- ident = None
- machine = 0
-
- match = re_number.match(line)
- if not match:
- continue
- number = int(match.group(1))
-
- match = re_version.search(line)
- if match:
- version = match.group(1)
-
- match = re_version.search(line)
- if match:
- version = match.group(1)
-
- match = re_id.search(line)
- if match:
- ident = match.group(1)
-
- match = re_machine.search(line)
- if match:
- machine = int(match.group(1), 16)
-
- ids.append((number, version, ident, machine))
-
- return ids
-
-
-def s390x_cpu_revision():
- """ NOT_RPYTHON """
- # linux kernel does the same classification
- #
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20131028/193311.html
-
- with open("/proc/cpuinfo", "rb") as fd:
- lines = fd.read().splitlines()
- cpu_ids = extract_s390x_cpu_ids(lines)
- machine = -1
- for number, version, id, m in cpu_ids:
- if machine != -1:
- assert machine == m
- machine = m
-
- if machine == 0x2097 or machine == 0x2098:
- return "z10"
- if machine == 0x2817 or machine == 0x2818:
- return "z196"
- if machine == 0x2827 or machine == 0x2828:
- return "zEC12"
- if machine == 0x2964:
- return "z13"
-
- # well all others are unsupported!
- return "unknown"
-
-def update_cflags(cflags):
- """ NOT_RPYTHON """
- # force the right target arch for s390x
- for cflag in cflags:
- if cflag.startswith('-march='):
- break
- else:
- # the default cpu architecture that is supported
- # older versions are not supported
- revision = s390x_cpu_revision()
- if revision == 'z13':
- # gcc does not recognize z13 as a compiler flag!
- revision = 'zEC12'
-
- assert revision != 'unknown'
- cflags += ('-march='+revision,)
- cflags += ('-m64','-mzarch')
- return cflags
diff --git a/rpython/translator/platform/arch/test/test_s390x.py
b/rpython/translator/platform/arch/test/test_s390x.py
deleted file mode 100644
--- a/rpython/translator/platform/arch/test/test_s390x.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import py
-import platform
-from rpython.translator.platform.arch.s390x import (s390x_cpu_revision,
- extract_s390x_cpu_ids)
-
-if platform.machine() != 's390x':
- py.test.skip("s390x tests only")
-
-def test_cpuid_s390x():
- revision = s390x_cpu_revision()
- assert revision != 'unknown', 'the model you are running on might be too
old'
-
-def test_read_processor_info():
- ids = extract_s390x_cpu_ids("""
-processor 0: machine = 12345
-processor 1: version = FF, identification = AF
- """.splitlines())
- assert ids == [(0, None, None, 12345),
- (1, 'FF', 'AF', 0),
- ]
-
-
diff --git a/rpython/translator/platform/linux.py
b/rpython/translator/platform/linux.py
--- a/rpython/translator/platform/linux.py
+++ b/rpython/translator/platform/linux.py
@@ -22,8 +22,8 @@
so_prefixes = ('lib', '')
if platform.machine() == 's390x':
- from rpython.translator.platform.arch import s390x
- cflags = s390x.update_cflags(cflags)
+ # force the right target arch for s390x
+ cflags = ('-march=zEC12','-m64','-mzarch') + cflags
def _args_for_shared(self, args):
return ['-shared'] + args
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit