[Issue 22658] New: Inline asm rejects [RIP+RAX] but not [RAX+RIP]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 8 03:12:51 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22658
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 at puremagic.com
Reporter: maxhaton at gmail.com
```
extern(C)
void bdasm()
{
asm {
naked;
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
```
--
More information about the Digitalmars-d-bugs
mailing list