[pypy-svn] r69819 - pypy/trunk/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Wed Dec 2 10:16:01 CET 2009


Author: fijal
Date: Wed Dec  2 10:16:00 2009
New Revision: 69819

Modified:
   pypy/trunk/pypy/jit/backend/x86/assembler.py
   pypy/trunk/pypy/jit/backend/x86/codebuf.py
Log:
Clean up nonsense even more - there is no way platform can be invoked
at runtime.


Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py	Wed Dec  2 10:16:00 2009
@@ -129,7 +129,7 @@
             if self.cpu.supports_floats:
                 self._build_failure_recovery(False, withfloats=True)
                 self._build_failure_recovery(True, withfloats=True)
-                codebuf.ensure_sse2_floats()
+                assert codebuf.sse2_floats
 
     def assemble_loop(self, inputargs, operations, looptoken):
         """adds the following attributes to looptoken:

Modified: pypy/trunk/pypy/jit/backend/x86/codebuf.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/codebuf.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/codebuf.py	Wed Dec  2 10:16:00 2009
@@ -6,7 +6,7 @@
 from pypy.jit.backend.x86.ri386 import I386CodeBuilder
 from pypy.rlib.rmmap import PTR, alloc, free
 from pypy.rlib.debug import make_sure_not_resized
-
+from pypy.translator.platform import CompilationError
 
 class InMemoryCodeBuilder(I386CodeBuilder):
     _last_dump_start = 0
@@ -149,9 +149,13 @@
 # ____________________________________________________________
 
 if sys.platform == 'win32':
-    ensure_sse2_floats = lambda : None
+    sse2_floats = True
 else:
-    _sse2_eci = ExternalCompilationInfo(
-        compile_extra = ['-msse2', '-mfpmath=sse'])
-    ensure_sse2_floats = lambda : rffi_platform.verify_eci(_sse2_eci)
+    try:
+        _sse2_eci = ExternalCompilationInfo(
+            compile_extra = ['-msse2', '-mfpmath=sse'])
+        rffi_platform.verify_eci(_sse2_eci)
+        sse2_floats = True
+    except CompilationError:
+        sse2_floats = False
 



More information about the Pypy-commit mailing list