[Issue 17617] New: No RIP relative addressing available in x64 inline assembly (iasm)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 7 06:02:51 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17617

          Issue ID: 17617
           Summary: No RIP relative addressing available in x64 inline
                    assembly (iasm)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Keywords: iasm, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: Marco.Leise at gmx.de

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"

--


More information about the Digitalmars-d-bugs mailing list