Mail Archives: djgpp/1996/05/06/08:56:11
I haven't verified this particular example but in general
gas is buggy on two accounts:
1. Prefixes. Use separate instructions like "fs".
2. Guessing operand sizes. Always specify suffixes yourself.
It's in the FAQ, I believe. I has been reported to the right
places, but if anyone feels like repeating that maybe it would
help.
Morten
fmarcos AT jet DOT es (Fernando Marcos) writes:
>I have found something "curious" in as. For example, assembling:
> movw $1234,%fs:wops
>or
> incl %fs:wops
>goes ok, but replacing the constant with a register:
> movw %ax,%fs:wops
>just generates
> movw %ax,wops
>which is not, preciselly, what we wanted, as it drops the segment
>prefix.
>Writing
> fs
> movw %ax,wops
>generates the correct code.
>Can someone else test it and tell me something? My as is dated Feb 02
>1996, 2:08a.
>Fernando Marcos
improvement. Otherwise, use the appropriately sized integer (short,
long, or long long) explicitly.
(I had a program that stored 2097152 integers in an array. I used "int". I
expected this to be four megabytes... what to my wondering eyes should
appear but
LSCAPE DAT 8388608 11.07.95 9:50 LSCAPE.DAT
)
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -