[pypy-commit] pypy default: oops, this is also RPython code
arigo
pypy.commits at gmail.com
Tue Mar 28 11:56:56 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r90846:f564555ae003
Date: 2017-03-28 17:56 +0200
http://bitbucket.org/pypy/pypy/changeset/f564555ae003/
Log: oops, this is also RPython code
diff --git a/rpython/jit/backend/x86/detect_feature.py b/rpython/jit/backend/x86/detect_feature.py
--- a/rpython/jit/backend/x86/detect_feature.py
+++ b/rpython/jit/backend/x86/detect_feature.py
@@ -21,7 +21,11 @@
return bool(code & (1<<25)) and bool(code & (1<<26))
def cpu_id(eax = 1, ret_edx = True, ret_ecx = False):
- asm = ["\xB8", struct.pack("<I", eax), # MOV EAX, $eax
+ asm = ["\xB8", # MOV EAX, $eax
+ chr(eax & 0xff),
+ chr((eax >> 8) & 0xff),
+ chr((eax >> 16) & 0xff),
+ chr((eax >> 24) & 0xff),
"\x53", # PUSH EBX
"\x0F\xA2", # CPUID
"\x5B", # POP EBX
More information about the pypy-commit
mailing list