diff options
author | eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-11 01:52:54 +0000 |
---|---|---|
committer | eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-11 01:52:54 +0000 |
commit | 1b04e24bd8693f2066eb9fb2106609147bc5f56a (patch) | |
tree | 9dfd830478595ed1f0fe14d8b5a5cba0f71ef375 /gcc/config/microblaze | |
parent | 24b9f6cbeb934017a7c6539a98a2ec4ac62a8564 (diff) | |
download | gcc-1b04e24bd8693f2066eb9fb2106609147bc5f56a.tar.gz |
Added the lwr/swr instructions pattern.
lwr and swr instructions will load/store the data with opposite endianness.
Changelog
2014-02-10 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
* gcc/config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
* gcc/config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207683 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/microblaze')
-rw-r--r-- | gcc/config/microblaze/microblaze.md | 12 | ||||
-rw-r--r-- | gcc/config/microblaze/predicates.md | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md index 8431f2de3ab..01c49e00279 100644 --- a/gcc/config/microblaze/microblaze.md +++ b/gcc/config/microblaze/microblaze.md @@ -1119,6 +1119,18 @@ } ) +;;Load and store reverse +(define_insn "movsi4_rev" + [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q") + (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))] + "TARGET_REORDER" + "@ + lwr\t%0,%y1,r0 + swr\t%1,%y0,r0" + [(set_attr "type" "load,store") + (set_attr "mode" "SI") + (set_attr "length" "4,4")]) + ;; 32-bit floating point moves (define_expand "movsf" diff --git a/gcc/config/microblaze/predicates.md b/gcc/config/microblaze/predicates.md index 83e8e79ac46..f34453ca8ee 100644 --- a/gcc/config/microblaze/predicates.md +++ b/gcc/config/microblaze/predicates.md @@ -85,6 +85,10 @@ (ior (match_operand 0 "const_0_operand") (match_operand 0 "register_operand"))) +(define_predicate "reg_or_mem_operand" + (ior (match_operand 0 "memory_operand") + (match_operand 0 "register_operand"))) + ;; Return if the operand is either the PC or a label_ref. (define_special_predicate "pc_or_label_operand" (ior (match_code "pc,label_ref") |