Commit 825527e8 by Edgar E. Iglesias Committed by Michael Eager

Free variable local allocs at block ends.

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

From-SVN: r196110
parent 162ceab4
2013-02-17 Edgar E. Iglesias <edgar.iglesias@gmail.com>
* config/microblaze/microblaze.md (save_stack_block): Define.
(restore_stack_block): Likewise.
2013-02-16 Edgar E. Iglesias <edgar.iglesias@gmail.com>
* config/microblaze/linux.h (TARGET_SUPPORTS_PIC): Define as 1.
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment