From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in GCC? Date: Mon, 07 Sep 1998 18:36:00 -0300 Organization: NBTel Internet Lines: 27 Message-ID: <35F451C0.717F8D94@unb.ca> References: <35F296C8 DOT EE7B49C7 AT unb DOT ca> <35F2BF67 DOT 5EE4EF08 AT cartsys DOT com> NNTP-Posting-Host: fctnts05c61.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Nate Eldredge wrote: > > The program doesn't compile as I would expect. All it was spose to do is > > show how you could use inline asm to add 2 integers. But, the return value > > was always 4. So I looked at the asm code generated for the function, it > > reads from port 0x83 and does some loops and stuff. All I wanted was 1 add. > > And the debugger (when the asm window is open) can't debug it right. It > > skips lines and weird things happen, registers change values without any > > obvious reason. > That is extraordinarily bizarre. Could you: > > * Find out *exactly* what switches RHIDE invokes GCC with. gcc -g -Wall -m486 -c t2.cc -o t2.o I tried removing "-m486" and it worked perfectly. It appears as though the '-m486' switch sometimes makes programs 'wrong'. > * Post the complete asm produced. I don't know how to do that. I use RHIDE, I tried making the targetname "test.s" and it did not work, stated: "Don't know how to build test.s from (null)". I also tried "test.S" with the same result. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca