[pypy-svn] r72271 - in pypy/trunk/pypy/jit/backend: . x86/test
arigo at codespeak.net
arigo at codespeak.net
Tue Mar 16 10:51:51 CET 2010
Author: arigo
Date: Tue Mar 16 10:51:50 2010
New Revision: 72271
Modified:
pypy/trunk/pypy/jit/backend/detect_cpu.py
pypy/trunk/pypy/jit/backend/x86/test/conftest.py
Log:
Always return 'x86' instead of sometimes 'i386' and sometimes 'x86'.
Modified: pypy/trunk/pypy/jit/backend/detect_cpu.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/detect_cpu.py (original)
+++ pypy/trunk/pypy/jit/backend/detect_cpu.py Tue Mar 16 10:51:50 2010
@@ -18,7 +18,7 @@
if not mach:
platform = sys.platform.lower()
if platform.startswith('win'): # assume an Intel Windows
- return 'i386'
+ return 'x86'
# assume we have 'uname'
mach = os.popen('uname -m', 'r').read().strip()
if not mach:
@@ -29,12 +29,12 @@
else:
assert sys.maxint == 2 ** 63 - 1
try:
- return {'i386': 'i386',
- 'i486': 'i386',
- 'i586': 'i386',
- 'i686': 'i386',
- 'i86pc': 'i386', # Solaris/Intel
- 'x86': 'i386', # Apple
+ return {'i386': 'x86',
+ 'i486': 'x86',
+ 'i586': 'x86',
+ 'i686': 'x86',
+ 'i86pc': 'x86', # Solaris/Intel
+ 'x86': 'x86', # Apple
'Power Macintosh': 'ppc',
'x86_64': 'x86_64',
}[mach]
@@ -43,7 +43,7 @@
def autodetect():
model = autodetect_main_model()
- if model in ('i386', 'x86'):
+ if model == 'x86':
from pypy.jit.backend.x86.detect_sse2 import detect_sse2
if not detect_sse2():
model = 'x86-without-sse2'
@@ -52,7 +52,7 @@
def getcpuclassname(backend_name="auto"):
if backend_name == "auto":
backend_name = autodetect()
- if backend_name in ('i386', 'x86'):
+ if backend_name == 'x86':
return "pypy.jit.backend.x86.runner", "CPU"
elif backend_name == 'x86-without-sse2':
return "pypy.jit.backend.x86.runner", "CPU386_NO_SSE2"
Modified: pypy/trunk/pypy/jit/backend/x86/test/conftest.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/test/conftest.py (original)
+++ pypy/trunk/pypy/jit/backend/x86/test/conftest.py Tue Mar 16 10:51:50 2010
@@ -4,6 +4,6 @@
class Directory(py.test.collect.Directory):
def collect(self):
cpu = detect_cpu.autodetect()
- if cpu != 'i386':
+ if cpu != 'x86':
py.test.skip("x86 directory skipped: cpu is %r" % (cpu,))
return super(Directory, self).collect()
More information about the Pypy-commit
mailing list