www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22658] New: Inline asm rejects [RIP+RAX] but not [RAX+RIP]


          Issue ID: 22658
           Summary: Inline asm rejects [RIP+RAX] but not [RAX+RIP]
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: accepts-invalid, iasm
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: maxhaton gmail.com

void bdasm()
    asm {
        mov EAX, [RAX+RIP];
        //mov EAX, [RIP+RAX];

The error message is also terrible when it the check works.

GNU AS rejects this correctly with the following:
simple.s: Assembler messages:
simple.s:15: Error: `[RIP+RAX]' is not a valid base/index expression

Jan 07 2022