diff options
author | Denis Chertykov <denisc@overta.ru> | 2004-03-19 20:07:54 +0000 |
---|---|---|
committer | Denis Chertykov <denisc@gcc.gnu.org> | 2004-03-19 23:07:54 +0300 |
commit | 829bde683caaddfd6cb4496a846dafe8ffb6340b (patch) | |
tree | 7c5e497149e34008ed9322c348b29c12334db703 /gcc | |
parent | 9d2a492d5d8faee8f8d6b1b07c8b7b328b4dbb04 (diff) | |
download | gcc-829bde683caaddfd6cb4496a846dafe8ffb6340b.zip gcc-829bde683caaddfd6cb4496a846dafe8ffb6340b.tar.gz gcc-829bde683caaddfd6cb4496a846dafe8ffb6340b.tar.bz2 |
avr.md ("call_insn"): Handle explicit integer specially.
* config/avr/avr.md ("call_insn"): Handle explicit integer
specially.
(call_value_insn): Likewise.
From-SVN: r79697
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/avr/avr.md | 35 |
2 files changed, 28 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9fc58b7..e04f07b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-03-19 Denis Chertykov <denisc@overta.ru> + + * config/avr/avr.md ("call_insn"): Handle explicit integer + specially. + (call_value_insn): Likewise. + 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * tree.c (substitute_in_expr): Rewrite to simplify and be more generic. diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 53b879b..22da0b1 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -2086,8 +2086,8 @@ "") (define_insn "call_insn" - [(call (mem:HI (match_operand:HI 0 "nonmemory_operand" "!z,*r,i")) - (match_operand:HI 1 "general_operand" "X,X,X"))] + [(call (mem:HI (match_operand:HI 0 "nonmemory_operand" "!z,*r,s,n")) + (match_operand:HI 1 "general_operand" "X,X,X,X"))] ;; We don't need in saving Z register because r30,r31 is a call used registers ;; Operand 1 not used on the AVR. "(register_operand (operands[0], HImode) || CONSTANT_P (operands[0]))" @@ -2104,9 +2104,13 @@ AS2 (mov, r31, %B0) CR_TAB \"icall\"); } - return AS1(%~call,%c0); + else if (which_alternative==2) + return AS1(%~call,%c0); + return (AS2 (ldi,r30,lo8(%0)) CR_TAB + AS2 (ldi,r31,hi8(%0)) CR_TAB + \"icall\"); }" - [(set_attr "cc" "clobber,clobber,clobber") + [(set_attr "cc" "clobber,clobber,clobber,clobber") (set_attr_alternative "length" [(const_int 1) (if_then_else (eq_attr "mcu_enhanced" "yes") @@ -2114,17 +2118,17 @@ (const_int 3)) (if_then_else (eq_attr "mcu_mega" "yes") (const_int 2) - (const_int 1))])]) + (const_int 1)) + (const_int 3)])]) (define_insn "call_value_insn" - [(set (match_operand 0 "register_operand" "=r,r,r") - (call (mem:HI (match_operand:HI 1 "nonmemory_operand" "!z,*r,i")) + [(set (match_operand 0 "register_operand" "=r,r,r,r") + (call (mem:HI (match_operand:HI 1 "nonmemory_operand" "!z,*r,s,n")) ;; We don't need in saving Z register because r30,r31 is a call used registers - (match_operand:HI 2 "general_operand" "X,X,X")))] + (match_operand:HI 2 "general_operand" "X,X,X,X")))] ;; Operand 2 not used on the AVR. "(register_operand (operands[0], VOIDmode) || CONSTANT_P (operands[0]))" - "* -{ + "*{ if (which_alternative==0) return \"icall\"; else if (which_alternative==1) @@ -2137,9 +2141,13 @@ AS2 (mov, r31, %B1) CR_TAB \"icall\"); } - return AS1(%~call,%c1); + else if (which_alternative==2) + return AS1(%~call,%c1); + return (AS2 (ldi, r30, lo8(%1)) CR_TAB + AS2 (ldi, r31, hi8(%1)) CR_TAB + \"icall\"); }" - [(set_attr "cc" "clobber,clobber,clobber") + [(set_attr "cc" "clobber,clobber,clobber,clobber") (set_attr_alternative "length" [(const_int 1) (if_then_else (eq_attr "mcu_enhanced" "yes") @@ -2147,7 +2155,8 @@ (const_int 3)) (if_then_else (eq_attr "mcu_mega" "yes") (const_int 2) - (const_int 1))])]) + (const_int 1)) + (const_int 3)])]) (define_insn "return" [(return)] |