diff mbox

arm: emit neon alignment hints for 32/16-bit loads/stores

Message ID 1383165061-32108-1-git-send-email-mans@mansr.com
State New
Headers show

Commit Message

Måns Rullgård Oct. 30, 2013, 8:31 p.m. UTC
---
 gcc/config/arm/arm.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ramana Radhakrishnan Oct. 30, 2013, 11:31 p.m. UTC | #1
Mans,

Can you please follow the guidelines as in
http://gcc.gnu.org/contribute.html ? Notably what's missing in your
submission here is

1. A changelog entry - well I'll create one for you . (see below)
2. A note on how this was tested and what impact this has on any
testcase that you have.
3. A covering note describing the change.

This is a small enough patch that we should be able to take this under
the 10 line rule, however if you intend to contribute to GCC regularly
we need to check that your contributions are covered by a copyright
assignment with the FSF. If you aren't covered by this please start
this process soon.

regards
Ramana


<DATE>  Mans Rullgard  <mans@mansr.com>

        PR target/58847
        * config/arm/arm.c (arm_print_operand): Handle alignment for 2
and 4 byte sizes.


On Wed, Oct 30, 2013 at 8:31 PM, Mans Rullgard <mans@mansr.com> wrote:
> ---
>  gcc/config/arm/arm.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
> index 8c9897e..8183a8e 100644
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -21247,6 +21247,10 @@ arm_print_operand (FILE *stream, rtx x, int code)
>           align_bits = 128;
>         else if (memsize >= 8 && (align % 8) == 0)
>           align_bits = 64;
> +       else if (memsize == 4 && (align % 4) == 0)
> +         align_bits = 32;
> +       else if (memsize == 2 && (align % 2) == 0)
> +         align_bits = 16;
>         else
>           align_bits = 0;
>
> --
> 1.8.4
>
diff mbox

Patch

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 8c9897e..8183a8e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -21247,6 +21247,10 @@  arm_print_operand (FILE *stream, rtx x, int code)
 	  align_bits = 128;
 	else if (memsize >= 8 && (align % 8) == 0)
 	  align_bits = 64;
+	else if (memsize == 4 && (align % 4) == 0)
+	  align_bits = 32;
+	else if (memsize == 2 && (align % 2) == 0)
+	  align_bits = 16;
 	else
 	  align_bits = 0;