This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Omit frame pointer bug in m68k gcc 3.3.1


>I've found a bug in the gcc build on
>http://www.davehylands.com/avi/index.htm that I've been trying.  This isn't
>just an inconvenience thing, but a matter of incorrectly generated code when
>the -fomit-frame-pointer flag is on.  I normally have that flag on, since
>gdb does not need the frame pointer for debugging, and without it the
>compiler saves a few instructions and cycles, and has another free register
>to use.  But with it enabled, the compiler produces incorrect code (example
>below) - it reads function parameters from the wrong place, and it uses
>incorrect addresses for local variables.  I notice (from
>http://www.davehylands.com/avi/compile_instructions_for_gcc.htm ) that this
>build has a patch called gcc-3.3.1-coldfire-frame.patch.txt (available from
>Avi's site) - I don't know if this is a standard or commonly used patch, but
>it seems to provide the "interrupt" attribute (which is essential for my
>program - I am running bare-bones without an OS on one of our own cards, and
>I much prefer the "interrupt" attribute to writing assembly wrappers).  I
>don't know if the patch is related to the problem or not.

Check out the patches at:
http://www.develer.com/uclinux/uclinux-elf-tools.html

One of which is gcc-3.3.1-coldfire-reload.patch which contains a small
patch to gcc/reload1.c which isn't acceptable to the GCC maintainers
since it makes an assumption about how instructions like:

  move.l 4(%sp),-(%sp)

update %sp, before or after the access to 4(%sp).  This patch has been
found to fix problems using -fomit-frame-pointer on ColdFire.  You'd
best pick up the *complete* gcc-3.3.1 patch set...

Good Luck!

-- 
Peter Barada                             Peter.Barada@motorola.com
Wizard                                   781-852-2768 (direct)
WaveMark Solutions(A Motorola Company)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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