Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79527:0b28396f0b27
Date: 2015-09-08 11:06 +0200
http://bitbucket.org/pypy/pypy/changeset/0b28396f0b27/

Log:    fix fork-before=pyjitpl

diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py
--- a/pypy/module/__pypy__/__init__.py
+++ b/pypy/module/__pypy__/__init__.py
@@ -111,13 +111,6 @@
                                      'interp_magic.mapdict_cache_counter')
         PYC_MAGIC = get_pyc_magic(self.space)
         self.extra_interpdef('PYC_MAGIC', 'space.wrap(%d)' % PYC_MAGIC)
-        # XXX
-        # the following code prevents --fork-before=pyjitpl from working,
-        # proper fix would be to use some llop that is only rendered by the
-        # JIT
-        #
-        if self.space.config.translation.fork_before == 'pyjitpl':
-            return
         try:
             from rpython.jit.backend import detect_cpu
             model = detect_cpu.autodetect()
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
@@ -122,11 +122,13 @@
 
 
 def getcpufeatures(backend_name="auto"):
-    """NOT_RPYTHON"""
-    cpucls = getcpuclass(backend_name)
-    return [attr[len('supports_'):] for attr in dir(cpucls)
-                            if attr.startswith('supports_')
-                                and getattr(cpucls, attr)]
+    return {
+        MODEL_X86: ['floats', 'singlefloats', 'longlong'],
+        MODEL_X86_NO_SSE2: ['longlong'],
+        MODEL_X86_64: ['floats', 'singlefloats'],
+        MODEL_ARM: ['floats', 'singlefloats', 'longlong'],
+        MODEL_PPC_64: [], # we don't even have PPC directory, so no
+    }[backend_name]
 
 if __name__ == '__main__':
     if len(sys.argv) > 1:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to