Author: Armin Rigo <ar...@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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit