[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: FW: [openrisc] GCC problem




I am porting small RTOS to OR1200 platform using gcc-3.2.3.

Selected compiler options are:
    rtos.o: rtos.c    or32-uclinux-gcc -O2 -c -g -o $@ $?

Attached are examples of source code where system crashes,
as well as 2 versions of the assembly code generated by the
compiler when optimization is turned off (nonoptimized.s)
and when optimization is on with level 2 (optimized.s).

zahvaljujem na pomoci
venko baska


>
> -----Original Message-----
> From: owner-openrisc@opencores.org
> [mailto:owner-openrisc@opencores.org]On Behalf Of Matjaz Breskvar
> Sent: Saturday, May 31, 2003 5:36 AM
> To: openrisc@opencores.org
> Subject: Re: FW: [openrisc] GCC problem
>
> >
> > Thank you for your suggestion to use gcc-3.2.3. It helped, and my
problem
> > was
> > solved but only in non-optimized mode (O0). With any optimization
(levels
> 1,
> > 2
> > or 3) turned on, system crashes and SP, FP, LR and PC registers get
> > corrupted.
> > Debugging and analyzing the assembly code for non-optimized and
optimized
> > version
> > of the API where system usually crashes, I noticed that the difference
is
> > how extensively
> > FP register is used for stack store/load operations when optimization is
> > turned off, and is
> > not used at all when optimization is on. I wonder why is this big
> difference
> > how FP is
> > used, and is there a some compiler option that can be used to fix this
> > problem?
>
> it would be helpful if you would provide some more detailed information on
> your setup, what are you trying to achieve and if possible a simple
> testcase.
>
> m.
> --
> To unsubscribe from openrisc mailing list please visit
> http://www.opencores.org/mailinglists.shtml
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.487 / Virus Database: 286 - Release Date: 6/1/2003

optimized.s

SourceCode.c

nonoptimized.s