[Issue 824] New: "mov EAX, func; " and "lea EAX, func; " generate incorrect code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 9 07:16:30 PST 2007


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

           Summary: "mov EAX, func;" and "lea EAX, func;" generate incorrect
                    code
           Product: D
           Version: 1.00
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn


# void foo(){}
# 
# void bar(){
#    asm{
#       mov ECX, foo;
#       lea EDX, foo;
#    }
# }

DMD-1.00 generates the following code for bar:

804a0c4:        55      push    ebp
804a0c5:        8b ec   mov     ebp,esp
804a0c7:        8b 00   mov     eax,DWORD PTR [eax]
804a0c9:        8b c0   mov     eax,eax
804a0cb:        5d      pop     ebp
804a0cc:        c3      ret


-- 



More information about the Digitalmars-d-bugs mailing list