Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [Bug target/31786] error: unable to find a register to spill in class 'BASE_POINTER_REGS' [RSS Feed]

#1 May 3, 2007 17:09:16

Ralf C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Bug target/31786] error: unable to find a register to spill in class 'BASE_POINTER_REGS'


On Thu, 2007-05-03 at 06:46 -0600, Eric Weddington wrote:
>
> > -----Original Message-----
> > From: Ralf Corsepius
> > Sent: Thursday, May 03, 2007 3:36 AM
> > To:
> > Cc: ; Joel Sherrill
> > Subject: Re: error: unable to find a
> > register to spill in class 'BASE_POINTER_REGS'
> >
> > On Thu, 2007-05-03 at 09:27 +0000, ralf_corsepius at rtems dot org
> > wrote:
> > > Eric, due to bugzilla's current brokenness, I am sending
> > you the *.i on PM.
> >
> > Please find enclosed.
> >
> > The original failing call is this:
> >
> >
> > /users/rtems/src/rpms/BUILD/rtems-4.8-avr-rtems4.8-gcc-4.2.0/b
> > uild/./gcc/xgcc
> > -B/users/rtems/src/rpms/BUILD/rtems-4.8-avr-rtems4.8-gcc-4.2.0
> > /build/./gcc/ -nostdinc
> > -B/users/rtems/src/rpms/BUILD/rtems-4.8-avr-rtems4.8-gcc-4.2.0
> > /build/avr-rtems4.8/newlib/ -isystem
> > /users/rtems/src/rpms/BUILD/rtems-4.8-avr-rtems4.8-gcc-4.2.0/b
> > uild/avr-rtems4.8/newlib/targ-include -isystem
> > /users/rtems/src/rpms/BUILD/rtems-4.8-avr-rtems4.8-gcc-4.2.0/g
> > cc-4.2.0-20070501/newlib/libc/include
> > -B/opt/rtems-4.8/avr-rtems4.8/bin/
> > -B/opt/rtems-4.8/avr-rtems4.8/lib/ -isystem
> > /opt/rtems-4.8/avr-rtems4.8/include -isystem
> > /opt/rtems-4.8/avr-rtems4.8/sys-include
> > -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
> > -DPACKAGE_VERSION=\"1.15.0\" -DPACKAGE_STRING=\"newlib\
> > 1.15.0\" -DPACKAGE_BUGREPORT=\"\" -I.
> > -I../../../../../../gcc-4.2.0-20070501/newlib/libc/misc -Os
> > -DPREFER_SIZE_OVER_SPEED -mcall-prologues -DMALLOC_PROVIDED
> > -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED
> > -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC
> > -DHAVE_FCNTL -fno-builtin -O2 -g -O2 -mmcu=avr25 -c -o
> > lib_a-init.o `test -f 'init.c' || echo
> > '../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/'`init.c
> > ../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/init.c:
> > In function '__libc_fini_array':
> > ../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/init.c:5
> > 9: error: unable to find a register to spill in class
> > 'BASE_POINTER_REGS'
> > ../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/init.c:5
> > 9: error: this is the insn:
> > (insn 84 55 56 4
> > ../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/init.c:5
> > 6 (set (mem/c:HI (plus:HI (reg/f:HI 28 r28)
> > (const_int 1 )) )
> > (reg:HI 24 r24)) 12 {*movhi} (nil)
> > (nil))
> > ../../../../../../gcc-4.2.0-20070501/newlib/libc/misc/init.c:5
> > 9: confused by earlier errors, bailing out
> >
> > Removing -O2 (and hence picking up -Os) lets it succeed:
>
> Hi Ralf,
>
> I agree with your latest post on the bug report.
> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31786>
> Yes, this is a real bug that does need to get fixed at some point.
c.f. to what I've just added to the PR - The code causing GCC to bomb
out is pretty trivial.

> However, as a workaround only, is there some reason why RTEMS cannot use
> avr-libc for the AVR?
Yes,
* RTEMS shares newlib between many targets
* RTEMS implements parts of the OS in newlib (RTEMS is pretty tied to
newlib)
* Licensing. GPL or LGPL is not acceptable for us (we want a more
liberal license).

> Avr-libc is better maintained then newlib for the AVR
> target.
Well, newlib is largely independent of the target architecture. So the
avr specific part in newlib condenses to very few lines.

I.e. instead of using "highly specialized functions", we are primarily
sharing c-code. This necessarily is not as "small" as a highly
specialized library, but ... that's one trade off to pay for
portability.

Ralf




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Jan. 17, 2017 23:11:54

ClintonCen
Registered: 2017-01-17
Posts: 5
Reputation: +  0  -
Profile   Send e-mail  

[Bug target/31786] error: unable to find a register to spill in class 'BASE_POINTER_REGS'

This post is being moderated

Offline

#3 Jan. 18, 2017 22:36:26

ClintonCen
Registered: 2017-01-17
Posts: 5
Reputation: +  0  -
Profile   Send e-mail  

[Bug target/31786] error: unable to find a register to spill in class 'BASE_POINTER_REGS'

This post is being moderated

Offline

  • Root
  • » AVR-GCC
  • » [Bug target/31786] error: unable to find a register to spill in class 'BASE_POINTER_REGS' [RSS Feed]

Board footer

Moderator control

Enjoy the 22nd of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support