Bug 17617 – No RIP relative addressing available in x64 inline assembly (iasm)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2017-07-07T13:02:51Z
Last change time
2020-08-29T05:42:49Z
Keywords
iasm, pull, rejects-valid
Assigned to
No Owner
Creator
Marco Leise
Comments
Comment #0 by Marco.Leise — 2017-07-07T13:02:51Z
The following should load the code address after the `mov` instruction into EAX.
void main() {
asm @nogc pure {
mov EAX, [RIP];
}
}
But the compiler (dmd 2.074.1) does not recognize RIP as a register and instead prints: "undefined label RIP"
Comment #1 by dlang-bot — 2020-08-23T00:29:10Z
@WalterBright created dlang/dmd pull request #11606 "fix Issue 17617 - No RIP relative addressing available in x64 inline …" fixing this issue:
- fix Issue 17617 - No RIP relative addressing available in x64 inline assembly (iasm)
https://github.com/dlang/dmd/pull/11606
Comment #2 by dlang-bot — 2020-08-29T05:42:49Z
dlang/dmd pull request #11606 "fix Issue 17617 - No RIP relative addressing available in x64 inline …" was merged into master:
- 886172e2554239bce1b597a286d4579a032d7add by Walter Bright:
fix Issue 17617 - No RIP relative addressing available in x64 inline assembly (iasm)
https://github.com/dlang/dmd/pull/11606