Xref: news2.mv.net comp.os.msdos.djgpp:3491 From: terra AT diku DOT dk (Morten Welinder) Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in AS? Date: 4 May 1996 12:47:32 GMT Organization: Department of Computer Science, U of Copenhagen Lines: 45 Sender: terra AT tyr DOT diku DOT dk Message-ID: <4mfjl4$7kp@vidar.diku.dk> References: <4mclgn$dsh AT minerva DOT ibernet DOT es> NNTP-Posting-Host: tyr.diku.dk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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