Skip to content

x86: assemble can accept invalid memory addressing modes. #25

@i509VCB

Description

@i509VCB

Issuing the command !a x86 fld xword ptr [ax] (yes this is invalid) emits the following:

fld xword ptr [ax]  ; +0 = 67 db 28 

But then disassembling this sequence using !d x86 67 db 28 produces the following:

fld xword ptr [bx + si]  ; +0 = 67 db 28 

The assembler should be failing to assemble since [ax] is an invalid memory addressing mode in x86.

Similarly with an invalid mov ax, [ax] the following is generated:

mov ax, [ax]  ; +0 = 67 66 8b 00 

And disassembly shows:

mov ax, word ptr [bx + si]  ; +0 = 67 66 8b 00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions