What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Comment #2 from  2009-04-08 05:05 -------
Actually, DMD is correct. Here's the output from the old DOS DEBUG.
-u 0100 0102
13A9:0100 DCF9                  FDIV    ST(1),ST
13A9:0102 DCF1                  FDIVR   ST(1),ST

The bug is in majority of *nix assemblers. Here's a link.
   The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
   ix86 Unix assemblers, generate floating point instructions with
   reversed source and destination registers in certain cases.
   Unfortunately, gcc and possibly many other programs use this
   reversed syntax, so we're stuck with it.

   eg. `fsub %st(3),%st' results in st = st - st(3) as expected, but
   `fsub %st,%st(3)' results in st(3) = st - st(3), rather than
   the expected st(3) = st(3) - st

   This happens with all the non-commutative arithmetic floating point
   operations with two register operands, where the source register is
   %st, and destination register is %st(i).  See FloatDR below.


Reply via email to