This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, PPC] extend TARGET_NO_LWSYNC to cover 440 and 603 processors.
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Iain Sandoe <iain at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Sat, 21 Jul 2012 09:43:18 -0700
- Subject: Re: [Patch, PPC] extend TARGET_NO_LWSYNC to cover 440 and 603 processors.
- References: <05CA9A8A-0229-465E-B098-A5C0FB876F43@codesourcery.com>
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.
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. */
>
>