Skip to content

Any register allowed in X86_64 inline asm address. #2463

@srkkov

Description

@srkkov

Any combination of registers of different sizes are allowed when they shouldn't be.

    asm
    {
        movl $eax, [$ax+$ecx];
    }
error: <inline asm>:1:8: invalid 16-bit base register
        movl (%ax,%ecx,1), %eax

All registers in an address must be the same size.

  • In 64-bit mode, they must be either all 64 bit or 32 bit.
  • In 32-bit mode, they must be either all 32 bit or 16 bit.
  • In 16-bit mode, they must be either all 16 bit or 32 bit.

Metadata

Metadata

Assignees

Labels

AsmBugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions