2015-01-14 Yvan Roux <yvan.roux@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jan 2015 12:41:31 +0000 (12:41 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jan 2015 12:41:31 +0000 (12:41 +0000)
Backport from trunk r211783.
2014-06-18  Charles Baylis  <charles.baylis@linaro.org>

* config/arm/arm.c (neon_vector_mem_operand): Allow register
POST_MODIFY for neon loads and stores.
(arm_print_operand): Output post-index register for neon loads and
stores.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@219596 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/config/arm/arm.c

index 672848b..0657fd4 100644 (file)
@@ -1,5 +1,15 @@
 2015-01-14  Yvan Roux  <yvan.roux@linaro.org>
 
+       Backport from trunk r211783.
+       2014-06-18  Charles Baylis  <charles.baylis@linaro.org>
+
+       * config/arm/arm.c (neon_vector_mem_operand): Allow register
+       POST_MODIFY for neon loads and stores.
+       (arm_print_operand): Output post-index register for neon loads and
+       stores.
+
+2015-01-14  Yvan Roux  <yvan.roux@linaro.org>
+
        Backport from trunk r218451.
        2014-12-06  James Greenhalgh  <james.greenhalgh@arm.com>
                    Sebastian Pop  <s.pop@samsung.com>
index 9bfee0a..145fb27 100644 (file)
@@ -12895,7 +12895,11 @@ neon_vector_mem_operand (rtx op, int type, bool strict)
       || (type == 0 && GET_CODE (ind) == PRE_DEC))
     return arm_address_register_rtx_p (XEXP (ind, 0), 0);
 
-  /* FIXME: vld1 allows register post-modify.  */
+  /* Allow post-increment by register for VLDn */
+  if (type == 2 && GET_CODE (ind) == POST_MODIFY
+      && GET_CODE (XEXP (ind, 1)) == PLUS
+      && REG_P (XEXP (XEXP (ind, 1), 1)))
+     return true;
 
   /* Match:
      (plus (reg)
@@ -21937,6 +21941,7 @@ arm_print_operand (FILE *stream, rtx x, int code)
       {
        rtx addr;
        bool postinc = FALSE;
+       rtx postinc_reg = NULL;
        unsigned align, memsize, align_bits;
 
        gcc_assert (MEM_P (x));
@@ -21946,6 +21951,11 @@ arm_print_operand (FILE *stream, rtx x, int code)
            postinc = 1;
            addr = XEXP (addr, 0);
          }
+       if (GET_CODE (addr) == POST_MODIFY)
+         {
+           postinc_reg = XEXP( XEXP (addr, 1), 1);
+           addr = XEXP (addr, 0);
+         }
        asm_fprintf (stream, "[%r", REGNO (addr));
 
        /* We know the alignment of this access, so we can emit a hint in the
@@ -21971,6 +21981,8 @@ arm_print_operand (FILE *stream, rtx x, int code)
 
        if (postinc)
          fputs("!", stream);
+       if (postinc_reg)
+         asm_fprintf (stream, ", %r", REGNO (postinc_reg));
       }
       return;