public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, microblaze]: Added load and store reverse patterns
@ 2013-11-26  9:41 David Holsgrove
       [not found] ` <52F982F9.50407@eagerm.com>
  0 siblings, 1 reply; 2+ messages in thread
From: David Holsgrove @ 2013-11-26  9:41 UTC (permalink / raw)
  To: gcc-patches
  Cc: Michael Eager, Edgar Iglesias, John Williams,
	Vidhumouli Hunsigida, Nagaraju Mekala

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Added the lwr/swr instructions pattern.
lwr and swr instructions will load/store the data with opposite endianness.

Changelog

2013-11-26  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.

[-- Attachment #2: 0011-Patch-microblaze-Added-load-and-store-reverse-patter.patch --]
[-- Type: application/octet-stream, Size: 2054 bytes --]

From 4bd03386bce10d580660bf63731e5a0399e436f8 Mon Sep 17 00:00:00 2001
From: nagaraju <nmekala@xilix.com>
Date: Tue, 8 Oct 2013 11:08:11 +0530
Subject: [PATCH 11/11] [Patch, microblaze]: Added load and store reverse
 patterns

Added the lwr/swr instructions pattern.
lwr and swr instructions will load/store the data with opposite endianness.

Changelog

2013-11-26  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.

Signed-off-by:Nagaraju <nmekala@xilix.com>
Signed-off-by:David Holsgrove <david.holsgrove@xilinx.com>
---
 gcc/config/microblaze/microblaze.md |   12 ++++++++++++
 gcc/config/microblaze/predicates.md |    4 ++++
 2 files changed, 16 insertions(+)

diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 992fe3e..19731ec 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 2c23291..905d46a 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")
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch, microblaze]: Added load and store reverse patterns
       [not found] ` <52F982F9.50407@eagerm.com>
@ 2014-06-17 22:22   ` Michael Eager
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Eager @ 2014-06-17 22:22 UTC (permalink / raw)
  To: gcc-patches
  Cc: David Holsgrove, Nagaraju Mekala, Vidhumouli Hunsigida,
	Edgar Iglesias, rose.garcia-eggl2fk

On 02/10/14 17:55, Michael Eager wrote:
> On 11/25/13 23:54, David Holsgrove wrote:
>> Added the lwr/swr instructions pattern.
>> lwr and swr instructions will load/store the data with opposite endianness.
>>
>> Changelog
>>
>> 2013-11-26  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.
>>
>
> GCC-head: Committed revision 207683.
> GCC-4.8-branch: Committed revision 207684.

Reverted GCC-4.8-branch commit.
Committed revision 211750.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-17 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26  9:41 [Patch, microblaze]: Added load and store reverse patterns David Holsgrove
     [not found] ` <52F982F9.50407@eagerm.com>
2014-06-17 22:22   ` Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).