[PATCH] Use lwsync in PowerPC sync_* builtins

Joel Sherrill joel.sherrill@oarcorp.com
Thu Sep 4 13:18:00 GMT 2008


David Edelsohn wrote:
> On Thu, Sep 4, 2008 at 8:31 AM, Joel Sherrill <joel.sherrill@oarcorp.com> wrote:
>   
>> Another related issue is that psim in gdb does not currently
>> support the lwsync instruction so any code generated using it
>> would fail there.  Since this is used as the test platform for
>> the embedded gcc targets (at least powerpc-elf and powerpc-rtems)
>> if gcc is going to generate this instruction, the simulator
>> needs to support it or there will be lots of failures.
>>     
>
> Joel,
>
> That is unfortunate, but it is a long-term, known problem with PSIM.  Someone
> maintaining PSIM needs to update it.  At worst, just make lwsync an alias
> for sync.  
Honestly the psim code is very cryptic in this area.  I would
add it if I could figure out how.  :(
> It does not make sense to delay improving performance because
> a simulator is far out of date. 
No I would never say that it did either.
>  You also can make a private change to GCC
> rs6000 port sources to set TARGET_NO_LWSYNC so that sync is generated
> instead of lwsync.
>   
That's what we do now but I would like to not have to do
that.
> David
>   


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




More information about the Gcc mailing list