www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17617] New: No RIP relative addressing available in x64

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 puremagic.com
          Reporter: Marco.Leise 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"

--
Jul 07