Thread overview | |||||
---|---|---|---|---|---|
|
March 06, 2007 [Issue 1027] New: "fadd real ptr [EAX];" does not compile | ||||
---|---|---|---|---|
| ||||
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@digitalmars.com ReportedBy: clugdbug@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); } -- |
March 06, 2007 [Issue 1027] "fadd real ptr [EAX];" does not compile | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1027 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from bugzilla@digitalmars.com 2007-03-06 05:14 ------- It shouldn't compile, as there is no such instruction! Adding (etc.) for 80 bit operands can only be done with ST registers. -- |
March 06, 2007 Re: [Issue 1027] "fadd real ptr [EAX];" does not compile | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | d-bugmail@puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=1027
>
>
> bugzilla@digitalmars.com changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution| |INVALID
>
>
>
>
> ------- Comment #1 from bugzilla@digitalmars.com 2007-03-06 05:14 -------
> It shouldn't compile, as there is no such instruction! Adding (etc.) for 80 bit
> operands can only be done with ST registers.
>
>
Aargh! You're right. I'm a goose!
But on the other, minor point -- what operand size does
fadd [EAX];
use?
|
Copyright © 1999-2021 by the D Language Foundation