Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r90832:73ea3144f995
Date: 2017-03-28 12:59 +0200
http://bitbucket.org/pypy/pypy/changeset/73ea3144f995/

Log:    Fix for detect_sse4a() (which is not used outside this file)

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,7 @@
     return bool(code & (1<<25)) and bool(code & (1<<26))
 
 def cpu_id(eax = 1, ret_edx = True, ret_ecx = False):
-    asm = ["\xB8", chr(eax), "\x00\x00\x00", # MOV EAX, $eax
+    asm = ["\xB8", struct.pack("<I", eax),     # MOV EAX, $eax
            "\x53",                     # PUSH EBX
            "\x0F\xA2",                 # CPUID
            "\x5B",                     # POP EBX
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to