Index: gcc/ChangeLog from Alexandre Oliva * config/h8300/h8300.md (attr type): Add call. (attr can_delay): If type is call, set it no. (call, call_value): Set type to call. Index: gcc/config/h8300/h8300.md =================================================================== RCS file: /cvs/cvsfiles/gnupro/gcc/config/h8300/h8300.md,v retrieving revision 1.7 diff -u -p -r1.7 h8300.md --- gcc/config/h8300/h8300.md 27 Jun 2004 03:45:42 -0000 1.7 +++ gcc/config/h8300/h8300.md 27 Jun 2004 05:19:31 -0000 @@ -75,7 +75,7 @@ (define_attr "cpu" "h8300,h8300h" (const (symbol_ref "cpu_type"))) -(define_attr "type" "branch,arith,bitbranch" +(define_attr "type" "branch,arith,bitbranch,call" (const_string "arith")) (define_attr "length_table" "none,addb,addw,addl,logicb,movb,movw,movl,mova_zero,mova,unary,mov_imm4,short_immediate,bitfield,bitbranch" @@ -145,9 +145,12 @@ (define_attr "delay_slot" "none,jump" (const_string "none")) -;; "yes" if the instruction can be put into a delay slot. +;; "yes" if the instruction can be put into a delay slot. It's not +;; entirely clear that jsr is not valid in delay slots, but it +;; definitely doesn't have the effect of causing the called function +;; to return to the target of the delayed branch. (define_attr "can_delay" "no,yes" - (cond [(eq_attr "type" "branch,bitbranch") + (cond [(eq_attr "type" "branch,bitbranch,call") (const_string "no") (ne (symbol_ref "get_attr_length (insn)") (const_int 2)) (const_string "no")] @@ -2493,6 +2496,7 @@ return \"jsr\\t%0\"; }" [(set_attr "cc" "clobber") + (set_attr "type" "call") (set (attr "length") (if_then_else (match_operand:QI 0 "small_call_insn_operand" "") (const_int 2) @@ -2517,6 +2521,7 @@ return \"jsr\\t%1\"; }" [(set_attr "cc" "clobber") + (set_attr "type" "call") (set (attr "length") (if_then_else (match_operand:QI 0 "small_call_insn_operand" "") (const_int 2)