public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, microblaze]: Free variable local allocs at block ends
@ 2013-02-11  6:38 David Holsgrove
  2013-02-17 16:18 ` Michael Eager
  0 siblings, 1 reply; 2+ messages in thread
From: David Holsgrove @ 2013-02-11  6:38 UTC (permalink / raw)
  To: gcc-patches
  Cc: Michael Eager (eager@eagercon.com),
	John Williams, Edgar E. Iglesias (edgar.iglesias@gmail.com),
	Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala, Tom Shui

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

Free variable local allocs at block ends.

Changelog

2013-02-11  Edgar E. Iglesias  <edgar.iglesias@gmail.com>

 * config/microblaze/microblaze.md (save_stack_block):
   Define.
   (restore_stack_block): Likewise.


[-- Attachment #2: 0003-gcc-microblaze-Free-variable-local-allocs-at-block-e.patch --]
[-- Type: application/octet-stream, Size: 1632 bytes --]

From 6c5916d3c79e65415070a75fe17662a49a9d6bf9 Mon Sep 17 00:00:00 2001
From: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Date: Sun, 21 Aug 2011 22:26:46 +0200
Subject: [PATCH] gcc-microblaze: Free variable local allocs at block ends.

Changelog

2013-02-11  Edgar E. Iglesias  <edgar.iglesias@gmail.com>

 * config/microblaze/microblaze.md (save_stack_block):
   Define.
   (restore_stack_block): Likewise.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
---
 gcc/config/microblaze/microblaze.md |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
index 69df592..1d55a16 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -1860,6 +1860,32 @@
   }
 )
 
+(define_expand "save_stack_block"
+  [(match_operand 0 "register_operand" "")
+   (match_operand 1 "register_operand" "")]
+  ""
+  {
+    emit_move_insn (operands[0], operands[1]);
+    DONE;
+  }
+)
+
+(define_expand "restore_stack_block"
+  [(match_operand 0 "register_operand" "")
+   (match_operand 1 "register_operand" "")]
+  ""
+  {
+    rtx retaddr = gen_rtx_MEM (Pmode, stack_pointer_rtx);
+    rtx rtmp    = gen_rtx_REG (SImode, R_TMP);
+
+    /* Move the retaddr.  */
+    emit_move_insn (rtmp, retaddr);
+    emit_move_insn (operands[0], operands[1]);
+    emit_move_insn (gen_rtx_MEM (Pmode, operands[0]), rtmp);
+    DONE;
+  }
+)
+
 ;; Trivial return.  Make it look like a normal return insn as that
 ;; allows jump optimizations to work better .
 (define_expand "return"
-- 
1.7.3.2


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

* Re: [Patch, microblaze]: Free variable local allocs at block ends
  2013-02-11  6:38 [Patch, microblaze]: Free variable local allocs at block ends David Holsgrove
@ 2013-02-17 16:18 ` Michael Eager
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Eager @ 2013-02-17 16:18 UTC (permalink / raw)
  To: David Holsgrove
  Cc: gcc-patches, Michael Eager (eager@eagercon.com),
	John Williams, Edgar E. Iglesias (edgar.iglesias@gmail.com),
	Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala, Tom Shui

On 02/10/2013 10:38 PM, David Holsgrove wrote:
> Free variable local allocs at block ends.
>
> Changelog
>
> 2013-02-11  Edgar E. Iglesias<edgar.iglesias@gmail.com>
>
>   * config/microblaze/microblaze.md (save_stack_block):
>     Define.
>     (restore_stack_block): Likewise.

Committed revision 196110.

-- 
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:[~2013-02-17 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11  6:38 [Patch, microblaze]: Free variable local allocs at block ends David Holsgrove
2013-02-17 16:18 ` 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).