Mail Archives: djgpp/1995/11/15/10:02:42
> A note to everybody:
> It seems that if you don't specify a opcode suffix, GAS will assemble some
> instructions with the wrong opperand size and not produce any warnings or
> error messages! It gleefully assembled "out %al, %dx" into *outw %ax,
Always review code generated by GAS with a debugger. It's one of the
buggiest pieces of code I have ever seen. It does a great job with GCC
output, anything non-C generated (segment overrides, I/O, etc) will
very likely generate the wrong code. And typically, if you resorted to
using GAS you needed the constructs it will most frequently mess up.
> who just spent 3 days debugging before he solved the above problem
Ignored segment overrides and incorrect sizes have cost me at least
200 hours of V2 development time. Even worse, sometimes segment
overrides would be generated properly (and sometimes ignored) if you changed
the *COMMENTS* in the GAS code. Scary. Much of V2's GAS code has
the numeric opcodes added for overrides to work around the bugs.
- Raw text -