aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2014-06-18 13:42:44 +0000
committerCharles Baylis <cbaylis@gcc.gnu.org>2014-06-18 13:42:44 +0000
commit7b5b78b16b55c498cb1b0279ea8d139a0266b497 (patch)
tree594513d49a35cc7cae3cebbe58d204f0f5302fef
parent54ed41ea0ccd13171c572c7465524022117f5dcb (diff)
downloadgcc-7b5b78b16b55c498cb1b0279ea8d139a0266b497.zip
gcc-7b5b78b16b55c498cb1b0279ea8d139a0266b497.tar.gz
gcc-7b5b78b16b55c498cb1b0279ea8d139a0266b497.tar.bz2
arm.c (neon_vector_mem_operand): Allow register POST_MODIFY for neon loads and stores.
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. From-SVN: r211783
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/arm/arm.c14
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3e6d53..114240b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2014-06-18 Richard Biener <rguenther@suse.de>
* tree-ssa-dce.c (perform_tree_ssa_dce): Fixup bogus commit.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 463707e..ffe8e21 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12792,7 +12792,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)
@@ -21824,6 +21828,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));
@@ -21833,6 +21838,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
@@ -21858,6 +21868,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;