This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RS6000] strict alignment for little-endian
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: gcc at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Mon, 10 Jun 2013 15:14:04 -0400
- Subject: Re: [RS6000] strict alignment for little-endian
- References: <20130607012439 dot GH6878 at bubble dot grove dot modra dot org>
On Fri, Jun 07, 2013 at 10:54:39AM +0930, Alan Modra wrote:
> I'd like to remove -mstrict-align for little-endian powerpc, because
> the assumption that mis-aligned accesses are massively slow isn't true
> for current powerpc processors. However I also don't want to break
> old machines, so probably should add -mstrict-align back for some set
> of cpus. Can anyone tell me the set?
I don't know the set. I recall the original PPC's (604, 603, etc.) had the
strict alignment rule in little endian rule, and the 750 relaxed it for GPRs
(but not FPRs), but I don't know about later machines.
> Index: gcc/config/rs6000/sysv4.h
> ===================================================================
> --- gcc/config/rs6000/sysv4.h (revision 199718)
> +++ gcc/config/rs6000/sysv4.h (working copy)
> @@ -538,12 +538,7 @@
>
> #define CC1_ENDIAN_BIG_SPEC ""
>
> -#define CC1_ENDIAN_LITTLE_SPEC "\
> -%{!mstrict-align: %{!mno-strict-align: \
> - %{!mcall-i960-old: \
> - -mstrict-align \
> - } \
> -}}"
> +#define CC1_ENDIAN_LITTLE_SPEC ""
>
> #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
>
>
> --
> Alan Modra
> Australia Development Lab, IBM
>
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797