[Issue 2942] New: asm fadd; accepted, but generates code for faddp.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 5 15:32:26 PDT 2009


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

           Summary: asm fadd; accepted, but generates code for faddp.
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


Discovered in LDC/DMD consistency comparisons.
asm {
  fadd;
  fmul;
  fsub;
  fdiv;
  fsubr;
  fdivr;
}
is accepted, but I don't think it should be. The AMD and Intel manuals don't
mention it, they only have 
asm {
  faddp;
  fmulp;
  fsubp;
  fdivp;
  fsubrp;
  fdivrp;
}
DMD's behaviour _is_ what DOS "debug" does, but it's error prone and confusing
-- why isn't fadd; the same as fadd ST, ST(1); How the heck did it become faddp
ST(1), ST;???
The bare forms without 'p' and with no arguments should simply be made illegal.


-- 



More information about the Digitalmars-d-bugs mailing list