aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorAlex Velenko <Alex.Velenko@arm.com>2014-01-23 14:46:31 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2014-01-23 14:46:31 +0000
commit89b4515c8c2a20b743febb65ce3df92ede698222 (patch)
tree99f2af343ccb2a58e398cb739261d67a829469a5 /gcc/config
parentf3eeb82c28c0028b2151ea8ac7ab8f1170b66304 (diff)
downloadgcc-89b4515c8c2a20b743febb65ce3df92ede698222.zip
gcc-89b4515c8c2a20b743febb65ce3df92ede698222.tar.gz
gcc-89b4515c8c2a20b743febb65ce3df92ede698222.tar.bz2
[AArch64_BE 1/4] Big-Endian lane numbering fix
[gcc/] 2014-01-23 Alex Velenko <Alex.Velenko@arm.com> * config/aarch64/aarch64-simd.md (aarch64_be_ld1<mode>): New define_insn. (aarch64_be_st1<mode>): Likewise. (aarch_ld1<VALL:mode>): Define_expand modified. (aarch_st1<VALL:mode>): Likewise. * config/aarch64/aarch64.md (UNSPEC_LD1): New unspec definition. (UNSPEC_ST1): Likewise. [gcc/testsuite/] 2014-01-23 Alex Velenko <Alex.Velenko@arm.com> * gcc.target/aarch64/vld1-vst1_1.c: New test_case. From-SVN: r206968
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64-simd.md30
-rw-r--r--gcc/config/aarch64/aarch64.md2
2 files changed, 30 insertions, 2 deletions
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
index 43a9c5b..1454a7e 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -3544,6 +3544,24 @@
(set (attr "length") (symbol_ref "aarch64_simd_attr_length_move (insn)"))]
)
+(define_insn "aarch64_be_ld1<mode>"
+ [(set (match_operand:VALLDI 0 "register_operand" "=w")
+ (unspec:VALLDI [(match_operand:VALLDI 1 "aarch64_simd_struct_operand" "Utv")]
+ UNSPEC_LD1))]
+ "TARGET_SIMD"
+ "ld1\\t{%0<Vmtype>}, %1"
+ [(set_attr "type" "neon_load1_1reg<q>")]
+)
+
+(define_insn "aarch64_be_st1<mode>"
+ [(set (match_operand:VALLDI 0 "aarch64_simd_struct_operand" "=Utv")
+ (unspec:VALLDI [(match_operand:VALLDI 1 "register_operand" "w")]
+ UNSPEC_ST1))]
+ "TARGET_SIMD"
+ "st1\\t{%1<Vmtype>}, %0"
+ [(set_attr "type" "neon_store1_1reg<q>")]
+)
+
(define_split
[(set (match_operand:OI 0 "register_operand" "")
(match_operand:OI 1 "register_operand" ""))]
@@ -3762,7 +3780,11 @@
{
enum machine_mode mode = <VALL:MODE>mode;
rtx mem = gen_rtx_MEM (mode, operands[1]);
- emit_move_insn (operands[0], mem);
+
+ if (BYTES_BIG_ENDIAN)
+ emit_insn (gen_aarch64_be_ld1<VALL:mode> (operands[0], mem));
+ else
+ emit_move_insn (operands[0], mem);
DONE;
})
@@ -3988,7 +4010,11 @@
{
enum machine_mode mode = <VALL:MODE>mode;
rtx mem = gen_rtx_MEM (mode, operands[0]);
- emit_move_insn (mem, operands[1]);
+
+ if (BYTES_BIG_ENDIAN)
+ emit_insn (gen_aarch64_be_st1<VALL:mode> (mem, operands[1]));
+ else
+ emit_move_insn (mem, operands[1]);
DONE;
})
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 3b5e92e..8657b16 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -81,6 +81,7 @@
UNSPEC_GOTSMALLPIC
UNSPEC_GOTSMALLTLS
UNSPEC_GOTTINYPIC
+ UNSPEC_LD1
UNSPEC_LD2
UNSPEC_LD3
UNSPEC_LD4
@@ -92,6 +93,7 @@
UNSPEC_SISD_SSHL
UNSPEC_SISD_USHL
UNSPEC_SSHL_2S
+ UNSPEC_ST1
UNSPEC_ST2
UNSPEC_ST3
UNSPEC_ST4