keystone-engine / keystone

Keystone assembler framework: Core (Arm, Arm64, Hexagon, Mips, PowerPC, Sparc, SystemZ & X86) + bindings
http://www.keystone-engine.org
GNU General Public License v2.0
2.3k stars 458 forks source link

under ATT style, it treats decimal numbers as hexadecimal numbers. that is very painful. #569

Open bbqz007 opened 11 months ago

bbqz007 commented 11 months ago

code generated by gcc

    .align 4
_MessageBoxA:
    .long   19089016
LC0:
    .ascii "\0"
    pushl   %ebp
    movl    %esp, %ebp
    subl    $24, %esp
    movl    _MessageBoxA, %eax
    movl    $LC0, %ecx
    movl    $LC0, %edx
    movl    $0, 12(%esp)
    movl    %ecx, 8(%esp)
    movl    %edx, 4(%esp)
    movl    $0, (%esp)
    call    *%eax
    nop
    leave
    ret

movl $0, 12(%esp), keystone assembles to movl $0, 0x12(%esp).

what ?

while as assembles to movl $0, 12(%esp) correctly. 12 not 0x12.

my using keystone is keystone_engine-0.9.2-py2.py3-none-win32 from pypi

fgfxf commented 5 months ago

用c++,python无法正常区分十六进制和十进制。python实在是太蠢了