[Issue 9965] New: Wrong Assembly For DIL, SIL Registers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 19 12:47:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9965

           Summary: Wrong Assembly For DIL, SIL Registers
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: iasm, wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2013-04-19 12:47:53 PDT ---
D Source:

import core.stdc.stdio;

void main() {
  ulong stuff;
  asm {
    xor RDI, RDI;
    mov DIL, 1;
    mov stuff, RDI;
  }

  printf("%lld\n", stuff);
}

Output:  0

obj2asm disassembly of main():

        push    RBP
        mov    RBP,RSP
        sub    RSP,010h
        mov    qword ptr -8[RBP],0
        xor    RDI,RDI
        mov    BH,1
        mov    -8[RBP],RDI
        mov    RSI,-8[RBP]
        mov    RDI,offset FLAT:.rodata at 64
        xor    EAX,EAX
        call      printf at PC32
        xor    EAX,EAX
        mov    RSP,RBP
        pop    RBP
        ret

The opcode for BH is being generated when the assembly language code says DIL.

Similarly, DH is generated when SIL is in the source code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list