Using as: i386-Bugs

Next: i386-Notes, Previous: i386-Arch, Up: i386-Dependent [Contents][Index]

#### 9.15.16 AT&T Syntax bugs

The UnixWare assembler, and probably other 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.

For example

            fsub %st,%st(3)

results in ‘`%st(3)`’ being updated to ‘`%st - %st(3)`’ rather than the expected ‘`%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 the destination register is ‘`%st(i)`’.