This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/1] sparc: support for -mmisalign in the SPARC M8
- From: David Miller <davem at davemloft dot net>
- To: qing dot zhao at oracle dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 02 Aug 2017 09:42:55 -0700 (PDT)
- Subject: Re: [PATCH 1/1] sparc: support for -mmisalign in the SPARC M8
- Authentication-results: sourceware.org; auth=none
- References: <SPARC_MISALIGN_PATCH> <1501687671-143345-1-git-send-email-qing.zhao@oracle.com>
From: qinzhao <qing.zhao@oracle.com>
Date: Wed, 2 Aug 2017 10:27:51 -0500
> This patch adds support to GCC for the misaligned load/store
> instructions introduced in the Oracle SPARC Architecture 2017 and
> implemented by the SPARC M8 processor.
>
> A new command line option -mmisaligned is added, that activates the
> usage of the new instructions.
>
> The SPARC backend is modified to use the misaligned load/store
> instructions when loading/storing data from/to addresses that are
> known to be misaligned at compile time (such as in packed structs).
>
> New tests are added to check that the proper instructions are used
> when loading and storing from/to packed structs.
>
> The GCC manual is expanded to cover the new command-line option.
STRICT_ALIGNMENT has a lot of implications.
I think just because we happen to have misaligned loads and stores
available doesn't mean we want all of the side effects associated
with STRICT_ALIGNMENT being true.