diff options
author | Jeff Law <law@gcc.gnu.org> | 1993-04-05 18:51:12 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1993-04-05 18:51:12 -0600 |
commit | b0213198c922e82a632e1e78aa08dada252732ab (patch) | |
tree | 6ea0af8e94cc8d34d05b39b59726c65fbb26ae8f /gcc/config/pa/pa.md | |
parent | ff78f7732cf4bf15d75d11d696ea5563d76ac1fa (diff) | |
download | gcc-b0213198c922e82a632e1e78aa08dada252732ab.zip gcc-b0213198c922e82a632e1e78aa08dada252732ab.tar.gz gcc-b0213198c922e82a632e1e78aa08dada252732ab.tar.bz2 |
pa.md (prologue, epilogue): New define_expands.
* pa.md (prologue, epilogue): New define_expands.
(return_internal, call_profiler): New define_insns.
From-SVN: r4023
Diffstat (limited to 'gcc/config/pa/pa.md')
-rw-r--r-- | gcc/config/pa/pa.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 9dcd818..f5df9df 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2580,6 +2580,47 @@ "bv%* 0(%%r2)" [(set_attr "type" "branch")]) +;; Use a different pattern for functions which have non-trivial +;; epilogues so as not to confuse jump and reorg. +(define_insn "return_internal" + [(use (reg:SI 2)) + (return)] + "" + "bv%* 0(%%r2)" + [(set_attr "type" "branch")]) + +(define_expand "prologue" + [(const_int 0)] + "" + "hppa_expand_prologue ();DONE;") + +(define_expand "epilogue" + [(return)] + "" + " +{ + /* Try to use the trivial return first. Else use the full + epilogue. */ + if (hppa_can_use_return_insn_p ()) + emit_jump_insn (gen_return ()); + else + { + hppa_expand_epilogue (); + emit_jump_insn (gen_return_internal ()); + } + DONE; +}") + +;; Special because we use the value placed in %r2 by the bl instruction +;; from within its delay slot to set the value for the 2nd parameter to +;; the call. +(define_insn "call_profiler" + [(unspec_volatile [(const_int 0)] 0) + (use (match_operand:SI 0 "const_int_operand" ""))] + "" + "bl _mcount,%%r2\;ldo %0(%%r2),%%r25" + [(set_attr "length" "2")]) + (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] "" |