www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9965] New: Wrong Assembly For DIL, SIL Registers

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: dsimcha yahoo.com


--- Comment #0 from David Simcha <dsimcha 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 64
        xor    EAX,EAX
        call      printf 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: -------
Apr 19 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9965


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2013-04-20
17:30:41 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1916

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 20 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9965


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code dawg.eu


--- Comment #2 from Martin Nowak <code dawg.eu> 2013-04-21 04:02:07 PDT ---
*** Issue 9972 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9965



--- Comment #3 from github-bugzilla puremagic.com 2013-04-21 04:13:51 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c275b372c3ec3cc58a54a4a7da66736b53932eca
fix Issue 9965 - Wrong Assembly For DIL, SIL Registers

https://github.com/D-Programming-Language/dmd/commit/bddba0574f25ff06917f6ca3b380c2c515e3963b
Merge pull request #1916 from WalterBright/fix9965

fix Issue 9965 - Wrong Assembly For DIL, SIL Registers

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9965



--- Comment #4 from github-bugzilla puremagic.com 2013-04-21 12:27:30 PDT ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0f741f4665959ec5dc1826d1aa3169e173edb559
Merge pull request #1916 from WalterBright/fix9965

fix Issue 9965 - Wrong Assembly For DIL, SIL Registers

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9965


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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