Author: Richard Plangger <planri...@gmail.com>
Branch: ppc-vsx-support
Changeset: r87228:d93cde0eb27e
Date: 2016-09-19 15:21 +0200
http://bitbucket.org/pypy/pypy/changeset/d93cde0eb27e/

Log:    use x86 scratch regs instead

diff --git a/rpython/jit/backend/x86/assembler.py 
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -699,8 +699,8 @@
             else:
                 src_locations2.append(src_loc)
                 dst_locations2.append(dst_loc)
-        remap_frame_layout_mixed(self, src_locations1, dst_locations1, 
r.SCRATCH,
-                                 src_locations2, dst_locations2, r.FP_SCRATCH)
+        remap_frame_layout_mixed(self, src_locations1, dst_locations1, 
X86_64_SCRATCH_REG,
+                                 src_locations2, dst_locations2, 
X86_64_XMM_SCRATCH_REG)
 
         offset = self.mc.get_relative_pos()
         self.mc.JMP_l(0)
diff --git a/rpython/translator/platform/arch/s390x.py 
b/rpython/translator/platform/arch/s390x.py
--- a/rpython/translator/platform/arch/s390x.py
+++ b/rpython/translator/platform/arch/s390x.py
@@ -39,8 +39,14 @@
     return ids
 
 def s390x_detect_vx():
+    contentlist = []
     with open("/proc/cpuinfo", "rb") as fd:
-        content = fd.read()
+        while True:
+            snippet = fd.read(4096)
+            if not snippet:
+                break
+            contentlist.append(snippet)
+        content = ''.join(contentlist)
         start = content.find("features", 0)
         if start >= 0:
             after_colon = content.find(":", start)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to