summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 22:57:22 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 22:57:22 +0000
commit2324fa129e50f47e7a2afe04431acb12e1dd9b47 (patch)
treea4e798ba3f10202a8a1504f6b63b3e67bf4dd6fc /gcc/config
parent0af408f7e9f70d6d9130127f7cc3472bfec50bae (diff)
downloadgcc-2324fa129e50f47e7a2afe04431acb12e1dd9b47.tar.gz
PR target/34888
* config/avr/avr.md: New splitter for REG_ARGS_SIZE 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/avr/avr.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index b8560df60d4..b5aa73c55f2 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -235,6 +235,17 @@
DONE;
})
+;; Notice a special-case when adding N to SP where N results in a
+;; zero REG_ARGS_SIZE. This is equivalent to a move from FP.
+(define_split
+ [(set (reg:HI REG_SP) (match_operand:HI 0 "register_operand" ""))]
+ "reload_completed
+ && frame_pointer_needed
+ && !cfun->calls_alloca
+ && find_reg_note (insn, REG_ARGS_SIZE, const0_rtx)"
+ [(set (reg:HI REG_SP) (reg:HI REG_Y))]
+ "")
+
;;========================================================================
;; move byte
;; The last alternative (any immediate constant to any register) is