diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2013-02-17 16:18:09 +0000 |
---|---|---|
committer | Michael Eager <eager@gcc.gnu.org> | 2013-02-17 16:18:09 +0000 |
commit | 825527e8a6992ca4acbcc2f9e33b18f1b1a09725 (patch) | |
tree | 3cbb1337af6c0831d72ee76622febbd3566468cc /gcc/config | |
parent | 162ceab464a66006a52c0e6241a933f5104a58e7 (diff) | |
download | gcc-825527e8a6992ca4acbcc2f9e33b18f1b1a09725.zip gcc-825527e8a6992ca4acbcc2f9e33b18f1b1a09725.tar.gz gcc-825527e8a6992ca4acbcc2f9e33b18f1b1a09725.tar.bz2 |
Free variable local allocs at block ends.
* config/microblaze/microblaze.md (save_stack_block): Define.
(restore_stack_block): Likewise.
From-SVN: r196110
Diffstat (limited to 'gcc/config')
-rw-r--r-- | 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" |