digitalmars.D.bugs - [Issue 1027] New: "fadd real ptr [EAX];" does not compile
- d-bugmail puremagic.com (42/42) Mar 06 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1027
- d-bugmail puremagic.com (10/10) Mar 06 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1027
- Don Clugston (5/23) Mar 06 2007 Aargh! You're right. I'm a goose!
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); } --
Mar 06 2007
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. --
Mar 06 2007
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?
Mar 06 2007