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

Powerpc IRQ handling breaks strict EABI compliance



Joel Sherrill wrote:
> 
> Valette Eric wrote:
> 
>>Till Straumann wrote:
>>
>>>OK, I fixed the motorola/shared BSP to not clobber R2/R13 anymore.
>>
>>Thanks a lot.
>>
>>
>>>However, the question remains:
>>>
>>> - who is responsible for the setup (calling __eabi()) ?
>>>   RTEMS or application code?
>>
> 
> I just looked at gcc/config/rs6000/eabi.asm and I can't figure out why
> I would want to run it. :)  What is it doing anyway?
> 

Well - for sure, it sets up R2 and R13.

I guess the answer to my question is that is is the application's 
responsibility to call 'main()' (who ends up calling __eabi()) very
much like when you want to have C++ static Ctors called...

-- Till.

> 
>>I'm not sure we need to have to have all BSP being fully EABI compliant
>>and thus frozing two registers. At least I'm not sure it was done on
>>old-execption-handling compliant BSP. I think that what is important is
>>that IRQ code does not prevent a specific BSP, or via a compilation
>>option to be fully EABI compliant.
>>
>>Now, if for some reason fully EABI compliant code is more efficient
>>because the compiler optimize something that is worth having two
>>register less,
>>
>>My two cents,
>>
>>-- eric
> 
>