diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-14 20:59:44 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-14 20:59:44 +0000 |
commit | 36ed44068db8a11c50e1494c752b07599e877eeb (patch) | |
tree | 9c02115a5fab37fecb33b292a41ee8321de14ddc /gcc/config/mn10300/mn10300.md | |
parent | d3c451dde186316692e666f3131d302c4f9cbce4 (diff) | |
download | gcc-36ed44068db8a11c50e1494c752b07599e877eeb.tar.gz |
* mn10300.c (can_use_return_insn): Include outgoing argument
area in size computation.
(expand_prologue): Likewise. No longer diddle with sequences.
Put register saves just before outgoing argument area.
(expand_epilogue): Similarly.
(impossible_plus_operand): New function.
* mn10300.h (FRAME_POINTER_REQUIRED): Never require a frame pointer.
(ACCUMULATE_OUTGOING_ARGS, OUTGOING_REG_PARM_STACK_SPACE): Define.
(impossible_plus_operand): Declare.
* mn10300.md (reload_insi): New expander to handle pathological
reload cases.
(addsi3): Fix CC status.
* mn10300.h (FUNCTION_VALUE): Return addresses in $a0.
(FUNCTION_VALUE_REGNO_P): Corresponding changes.
* mn10300.md (call_value_internal): Allow output to be in an
address register.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mn10300/mn10300.md')
-rw-r--r-- | gcc/config/mn10300/mn10300.md | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 13628ecf1f3..d936a02df12 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -156,6 +156,22 @@ ;; movsi and helpers +;; We use this to handle addition of two values when one operand is the +;; stack pointer and the other is a memory reference of some kind. Reload +;; does not handle them correctly without this expander. +(define_expand "reload_insi" + [(set (match_operand:SI 0 "register_operand" "=a") + (match_operand:SI 1 "impossible_plus_operand" "")) + (clobber (match_operand:SI 2 "register_operand" "=&a"))] + "" + " +{ + emit_move_insn (operands[0], XEXP (operands[1], 0)); + emit_move_insn (operands[2], XEXP (operands[1], 1)); + emit_insn (gen_addsi3 (operands[0], operands[0], operands[2])); + DONE; +}") + (define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] @@ -646,7 +662,7 @@ }") (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=d,a,a,da,x,!&da") + [(set (match_operand:SI 0 "register_operand" "=d,a,a,da,x,&!da") (plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,da") (match_operand:SI 2 "nonmemory_operand" "J,J,L,dai,i,da")))] "" @@ -657,7 +673,7 @@ add %2,%0 add %2,%0 mov %2,%0\;add %1,%0" - [(set_attr "cc" "set_zn_c0,none_0hit,none_0hit,set_zn_c0,none_0hit,none_0hit")]) + [(set_attr "cc" "set_zn_c0,none_0hit,none_0hit,set_zn_c0,none_0hit,set_zn_c0")]) (define_expand "adddi3" [(set (reg:DI 0) (match_operand:DI 1 "register_operand" "")) @@ -1211,7 +1227,7 @@ }") (define_insn "call_value_internal" - [(set (match_operand 0 "" "=d") + [(set (match_operand 0 "" "=da") (call (mem:QI (match_operand:SI 1 "call_address_operand" "aS")) (match_operand:SI 2 "general_operand" "g")))] "" @@ -1424,3 +1440,4 @@ "dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])" "add %0,%0\;bcc %1" [(set_attr "cc" "clobber")]) + |