[Issue 1027] New: "fadd real ptr [EAX];" does not compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 6 03:01:20 PST 2007


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

           Summary: "fadd real ptr [EAX];" does not compile
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


Works OK with  fld and fst, but fails for any two-operand instruction -- fadd,
fsub, fdiv, fmul, fcomp, etc.
They all work correctly with 'double ptr' and 'float ptr'.
(I suspect this is a side-effect of the ancient change from 'extended' to
'real').

This is a show-stopper for 80-bit vector operations :-(.

Also the ambiguous " fadd [EAX];"
compiles, but I'm not sure that it should -- which size does it use?

----------
bug.d(7): bad type/size of operands 'fadd'
----------

void main()
{
    real a = 3.0;
    asm {
        lea EAX, a;
        fld real ptr [EAX];  // ok
        fadd real ptr [EAX]; // bug
        fsub real ptr [EAX]; // bug
        fmul real ptr [EAX]; // bug
        fdiv real ptr [EAX]; // bug
        fcom real ptr [EAX]; // bug
        fucom real ptr [EAX]; // bug
        fstp st(0), st;
        fldz;
        fstp real ptr [EAX];  // ok
    }
    assert(a==0);
}


-- 



More information about the Digitalmars-d-bugs mailing list