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


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: mips-elf/rtems and binutils 2.13.1pre1



Ralf Corsepius wrote:
> 
> Am Mit, 2002-11-06 um 22.28 schrieb Ralf Corsepius:
> > Am Mit, 2002-11-06 um 21.05 schrieb Daniel Jacobowitz:
> > > On Wed, Nov 06, 2002 at 01:54:47PM -0600, Joel Sherrill wrote:
> > > >
> 
> > > > I am trying to compile all the RTEMS source for all targets using
> > > > binutils 2.13.1 pre1 and got this new error:
> > > >
> > > > mips-rtems-gcc --pipe -isystem ../../../../../p4600/lib/include
> > > > -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC
> > > > -DBOOTP_COMPAT      -O4 -fomit-frame-pointer -g -Wall -mips3 -G0  -o
> > > > o-optimize/in_pcb.o -c
> > > > ../../../../../../../current/c/src/../../cpukit/libnetworking/netinet/in_pcb.c
> > > > {standard input}: Assembler messages:
> > > > {standard input}:1884: Error: illegal operands `sd 0,112($sp)'
> I am able to reproduce the bug with the code fragment below (reduced
> from the original code which produced the error above):
> 
> # cat in_pcb.c
> struct in_addr {
>         unsigned long s_addr  __attribute__((packed)) ;
> };
> 
> void
> in_pcbnotify( struct in_addr laddr )
> {
>                 laddr.s_addr = 0;
> }
> 
> With binutils-2.13/gcc-3.2, the error occurs if compiling this fragment
> for mips-rtems with -O >= 1 and -mips3
> 
> # mips-rtems-gcc -O1 -mips3 -o o-optimize/in_pcb.o in_pcb.c
> /tmp/ccfoPmP7.s: Assembler messages:
> /tmp/ccfoPmP7.s:13: Error: illegal operands `sd 0,0($sp)'
> 
> The error does not occur if not using -mips3 or using -O0, or if having
> removed the __attribute__((packed)) from of the code fragment above.

Since Daniel has stated that gas is correctly rejecting invalid
assembly,
then the conclusion must be that it is a code generation problem in
gcc.  

Ralf, unless Daniel disagrees, this is a gcc bug which needs to be 
filed as a GCC GNATS PR.  Please file it and add me as an interested
party.

> Ralf

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985


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