avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Where report ICE in WinAVR?


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Where report ICE in WinAVR?
Date: Sun, 25 Jan 2009 13:51:18 -0700

 

> -----Original Message-----
> From: Georg-Johann Lay [mailto:address@hidden 
> Sent: Sunday, January 25, 2009 1:00 PM
> To: Weddington, Eric
> Cc: address@hidden
> Subject: Re: [avr-gcc-list] Where report ICE in WinAVR?
> 
> Weddington, Eric schrieb:
> >  
> > 
> > 
> >>-----Original Message-----
> >>Hi, I just stumbled over this ICE in WinAVR 20081205:
> >>
> >> > internal compiler error: in propagate_rtx, at fwprop.c:469
> >>
> >>So where shall I send the bug to?
> > 
> > For an internal compiler error you can report it in either 
> place: the GCC bug database, or the WinAVR bug database (at 
> the WinAVR project on SourceForge). If you report it on the 
> GCC bug database, please put my email address on the CC list 
> of the bug.
> > 
> > BTW, that sounds vaguely familiar. What versions are you using?
> 
> It's gcc 4.3.2 aka WinAVR-20081205.
> 
> I think it's not specific to the Win32 distributon.
> 
> As far as I can see it's triggered by -fforward-propagate and a
> register asm ("") within a loop.
> 

Well, no wonder. Your test case shows this function:

void put_sfrac16 (data16_t q)
{
    unsigned char i;
    for (i=0; i < 2; i++)
    {
        register data16_t digit asm ("r24");
        digit.asByte[1] = 0;

        digit.asByte[0] = q.asByte[0]; 
        digit = mac10 (digit);
        q.asByte[0] = digit.asByte[0];
    }
}

The first parameter to any function will be passed in r24, so why are you 
attempting to reserve it for the variable 'digit'?

The avr-libc user manual, FAQ #13, shows the ABI:
<http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage>

There are other more appropriate registers to choose from, if you really think 
you need to put that variable in a register. If you are trying to speed up the 
whole routine, and you chose r24 for 'digit' because it would make it faster to 
call your mac10() function, then you need to change your strategy, and have 
mac10 be an inline function and let GCC decide where to put the 'digit' 
variable. 

If you really want to take over the job of the compiler, then you need to write 
your routine all in assembly.

Unless you have some valid reason for doing this, I'm tempted to close this bug 
as invalid.

Eric Weddington





reply via email to

[Prev in Thread] Current Thread [Next in Thread]