[PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

Daniel Cederman cederman@gaisler.com
Tue Jun 30 12:46:00 GMT 2015


On 2015-06-30 11:24, Eric Botcazou wrote:
>> The UT699 is a leon3r0 system which does not support CASA. However, to
>> enable the errata fixes for UT699 with -mfix-ut699 requires the CPU
>> target to be leon3.
>
> -mfix-ut699 itself is independent of the processor and doesn't require leon3.
>
>> The instruction timing also differs between leon and leon3 and they are
>> represented by different targets in binutils.
>
> Yes, there is only one optimization trick for the scheduler that requires
> leon3, but it doesn't affect correctness.  We could easily change that, i.e.
> enable the trick for leon too if -mfix-ut699 is passed.
>

Thank you for the patch in your other mail that changes this!

We were also thinking of the instruction timing information found in the 
leon_costs and leon3_costs. We took a look at the values in leon_costs 
and they seem to fit well with the UT699, except for division. We got a 
bit unsure as to what leon system they are based on, as the division 
cost was wrong also for the AT697F, which is the most common leon2 
system. Would it be ok to update the division cost values of leon_costs 
so that they match UT699 and AT697F?

In general, depending on how one instantiate a leon system and which FPU 
is selected, you will get different timing. Is there a recommended way 
of adding support for this without adding additional CPU targets?
We are considering to add support for GRFPU-lite, which only differs in 
the timing.

> As for binutils, they don't even know about leon3, eveything is leon for them.
>

Yes, that was a misunderstanding from my part.

-- 
Daniel Cederman



More information about the Gcc-patches mailing list