[Issue 19528] New: asm ptoblem
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Dec 30 20:50:14 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19528
          Issue ID: 19528
           Summary: asm ptoblem
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: steven_kladitis at yahoo.com
the following code compiles in 32 ,but not in 64 bit.
int main()
{
    import std.stdio;
   long i;
   asm
   {
     mov EAX,10;
     add EAX,20;
     mov i,EAX;
   }
   writeln(i," ",i.sizeof);
   return 0;
}
-- in 32 bit I get --> 30 8
in 64 bit it gets length error at lc:\rosetta>dmd -m64 machine_code.d
machine_code.d(14): Error: bad type/size of operands mov
-- commint out the move instruction I get ==> 0 8
the size of 'i' and 'EAX' are the same in both.
This is in -> DMD32 D Compiler v2.084.0-rc.1
--
    
    
More information about the Digitalmars-d-bugs
mailing list