This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC bug!


> I've dicovered a bug in gcc. It happens only in some circumstances: I've
> discovered one of these, maybe there are others.

Thanks for your bug report. Please note that egcs 1.1 is not the
current version; I could not reproduce the problem with gcc-2.95.2.

I had some difficulties with understanding your report. If you provide
the full source with the program, it would be nice if you give
instructions on how to run it, so I can see whether it works as
intended or not.

It might be better *not* to give full source code, but only the
preprocessor output of the file that got miscompiled. Run 'gcc
--save-temps <other-flags> copper.c', and send the resulting file
copper.i, together with copper.s (as you did).

Anyway, gcc 2.95.2 generates the following code at -O2 at the
beginning of do_copper:

do_copper:
	movl cop_pc,%eax
	movl chipmem_bank+16,%edx
	subl $12,%esp
	movl $0,jump_latency
	pushl %ebp
	pushl %edi
	pushl %esi
	pushl %ebx
	call *%edx
	movl %eax,%ebx
	movl cop_pc,%eax
	movl chipmem_bank+16,%edx
	movl $4,%ebp
	addl $2,%eax
	movl %eax,cop_pc
	call *%edx

This looks pretty much as what you want to me.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]