This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, PPC] extend TARGET_NO_LWSYNC to cover 440 and 603 processors.


Hi Andrew,

On 21 Jul 2012, at 17:43, Andrew Pinski wrote:

> On Sat, Jul 21, 2012 at 9:12 AM, Iain Sandoe <iain@codesourcery.com> wrote:
>> Hi,
>> 
>> The following patch was been in use internally, for some time, to handle two further cases where the processor does not have lwsync.  Verified on a cross from i686-linux-gnu to powerpc-linux-gnu.
>> 
>> OK for trunk?
> 
> This was only done for e500 and not other proessors as the e500 was
> not fully compatible even with the older spec.  In that lwsync would
> cause an illegal instruction exception.  This is NOT the case for 603
> and the 440 so I don't think this patch should applied.

The original report, for which our change was made, was of an instruction exception caused by lwsync on 440.
I'm not personally familiar with that processor, I'll try and get access to a board/confirm in due course.

thanks
Iain



> 
> Thanks,
> Andrew Pinski
> 
> 
>> thanks,
>> Iain
>> 
>>        gcc/
>>        * config/rs6000/rs6000.h (TARGET_NO_LWSYNC): Extended to cover PPC
>>        440 and 603 processors.
>> 
>> Index: gcc/config/rs6000/rs6000.h
>> ===================================================================
>> --- gcc/config/rs6000/rs6000.h  (revision 189745)
>> +++ gcc/config/rs6000/rs6000.h  (working copy)
>> @@ -501,9 +512,11 @@ extern int rs6000_vector_align[];
>>                                      || TARGET_ALTIVEC                  \
>>                                      || TARGET_VSX)))
>> 
>> -/* E500 cores only support plain "sync", not lwsync.  */
>> +/* E500, 440 and 603 cores only support plain "sync", not lwsync.  */
>> #define TARGET_NO_LWSYNC (rs6000_cpu == PROCESSOR_PPC8540 \
>> -                         || rs6000_cpu == PROCESSOR_PPC8548)
>> +                         || rs6000_cpu == PROCESSOR_PPC8548 \
>> +                         || rs6000_cpu == PROCESSOR_PPC440 \
>> +                         || rs6000_cpu == PROCESSOR_PPC603)
>> 
>> 
>> /* Which machine supports the various reciprocal estimate instructions.  */
>> 
>> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]