aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2010-08-18 12:33:43 +0000
committerYao Qi <qiyao@gcc.gnu.org>2010-08-18 12:33:43 +0000
commit8019fcfb557001db4ef756511b6ff49f21392724 (patch)
treeac089ea9b53f1acf174025fc054bf01f2921e86e /gcc
parent38e3c1e18ef02280cfbb384b3a6375f7dd789519 (diff)
downloadgcc-8019fcfb557001db4ef756511b6ff49f21392724.zip
gcc-8019fcfb557001db4ef756511b6ff49f21392724.tar.gz
gcc-8019fcfb557001db4ef756511b6ff49f21392724.tar.bz2
re PR target/45094 ([arm] wrong instructions for dword move in some cases)
gcc/ PR target/45094 * config/arm/arm.c (output_move_double): Fix typo generating instructions ('ldr'->'str'). gcc/testsuite/ PR target/45094 * gcc.target/arm/pr45094.c: New test. From-SVN: r163338
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c8
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/arm/pr45094.c27
4 files changed, 42 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c16adad..124b3cb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-18 Yao Qi <yao@codesourcery.com>
+
+ PR target/45094
+ * config/arm/arm.c (output_move_double): Fix typo generating
+ instructions ('ldr'->'str').
+
2010-08-18 Maxim Kuvyrkov <maxim@codesourcery.com>
PR rtl-optimization/42575
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 3dd73e8..f6148a7 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12944,13 +12944,13 @@ output_move_double (rtx *operands)
{
if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
{
- output_asm_insn ("ldr%?\t%0, [%1, %2]!", otherops);
- output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
+ output_asm_insn ("str%?\t%0, [%1, %2]!", otherops);
+ output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
}
else
{
- output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
- output_asm_insn ("ldr%?\t%0, [%1], %2", otherops);
+ output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
+ output_asm_insn ("str%?\t%0, [%1], %2", otherops);
}
}
else if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7930183..2e2912e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-18 Yao Qi <yao@codesourcery.com>
+
+ PR target/45094
+ * gcc.target/arm/pr45094.c: New test.
+
2010-08-18 Maxim Kuvyrkov <maxim@codesourcery.com>
* gcc.target/arm/mla-1.c: Use thumb-friendly architecture.
diff --git a/gcc/testsuite/gcc.target/arm/pr45094.c b/gcc/testsuite/gcc.target/arm/pr45094.c
new file mode 100644
index 0000000..05f16d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr45094.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O2 -mcpu=cortex-a8" } */
+/* { dg-add-options arm_neon } */
+
+#include <stdlib.h>
+
+long long buffer[32];
+
+void __attribute__((noinline)) f(long long *p, int n)
+{
+ while (--n >= 0)
+ {
+ *p = 1;
+ p += 32;
+ }
+}
+
+int main(void)
+{
+ f(buffer, 1);
+
+ if (!buffer[0])
+ abort();
+
+ return 0;
+}