Commit 2f7e5a0d by Eric Christopher Committed by Eric Christopher

s390.c (s390_emit_prologue): Call unspec tpf prologue insn instead of setting up call.

2004-05-03  Eric Christopher  <echristo@redhat.com>

        * config/s390/s390.c (s390_emit_prologue): Call unspec tpf
        prologue insn instead of setting up call.
        (s390_emit_epilogue): Ditto.
        * config/s390/s390.md (prologue_tpf, epilogue_tpf): New patterns.
        (define_constants): Add numbers for above patterns.

From-SVN: r81466
parent 38899e29
2004-05-03 Eric Christopher <echristo@redhat.com> 2004-05-03 Eric Christopher <echristo@redhat.com>
* config/s390/s390.c (s390_emit_prologue): Call unspec tpf
prologue insn instead of setting up call.
(s390_emit_epilogue): Ditto.
* config/s390/s390.md (prologue_tpf, epilogue_tpf): New patterns.
(define_constants): Add numbers for above patterns.
2004-05-03 Eric Christopher <echristo@redhat.com>
* config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Move body... * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Move body...
* config/s390/s390.c (s390_conditional_register_usage): ...here. * config/s390/s390.c (s390_conditional_register_usage): ...here.
* config/s390/s390-protos.h: Prototype. * config/s390/s390-protos.h: Prototype.
......
...@@ -5683,11 +5683,8 @@ s390_emit_prologue (void) ...@@ -5683,11 +5683,8 @@ s390_emit_prologue (void)
{ {
/* Generate a BAS instruction to serve as a function /* Generate a BAS instruction to serve as a function
entry intercept to facilitate the use of tracing entry intercept to facilitate the use of tracing
algorithms located at the branch target. algorithms located at the branch target. */
emit_insn (gen_prologue_tpf ());
This must use register 1. */
s390_emit_call (GEN_INT (0xfe0), NULL_RTX, NULL_RTX,
gen_rtx_REG (Pmode, 1));
/* Emit a blockage here so that all code /* Emit a blockage here so that all code
lies between the profiling mechanisms. */ lies between the profiling mechanisms. */
...@@ -5710,16 +5707,13 @@ s390_emit_epilogue (bool sibcall) ...@@ -5710,16 +5707,13 @@ s390_emit_epilogue (bool sibcall)
/* Generate a BAS instruction to serve as a function /* Generate a BAS instruction to serve as a function
entry intercept to facilitate the use of tracing entry intercept to facilitate the use of tracing
algorithms located at the branch target. algorithms located at the branch target. */
This must use register 1. */
/* Emit a blockage here so that all code /* Emit a blockage here so that all code
lies between the profiling mechanisms. */ lies between the profiling mechanisms. */
emit_insn (gen_blockage ()); emit_insn (gen_blockage ());
s390_emit_call (GEN_INT (0xfe6), NULL_RTX, NULL_RTX, emit_insn (gen_epilogue_tpf ());
gen_rtx_REG (Pmode, 1));
} }
/* Check whether to use frame or stack pointer for restore. */ /* Check whether to use frame or stack pointer for restore. */
......
...@@ -118,6 +118,10 @@ ...@@ -118,6 +118,10 @@
[; Blockage [; Blockage
(UNSPECV_BLOCKAGE 0) (UNSPECV_BLOCKAGE 0)
; TPF Support
(UNSPECV_TPF_PROLOGUE 20)
(UNSPECV_TPF_EPILOGUE 21)
; Literal pool ; Literal pool
(UNSPECV_POOL 200) (UNSPECV_POOL 200)
(UNSPECV_POOL_START 201) (UNSPECV_POOL_START 201)
...@@ -7522,11 +7526,28 @@ ...@@ -7522,11 +7526,28 @@
"" ""
"s390_emit_prologue (); DONE;") "s390_emit_prologue (); DONE;")
(define_insn "prologue_tpf"
[(unspec_volatile [(const_int 0)] UNSPECV_TPF_PROLOGUE)
(clobber (reg:DI 1))]
"TARGET_TPF"
"bas\t%%r1,4064"
[(set_attr "type" "jsr")
(set_attr "op_type" "RX")])
(define_expand "epilogue" (define_expand "epilogue"
[(use (const_int 1))] [(use (const_int 1))]
"" ""
"s390_emit_epilogue (false); DONE;") "s390_emit_epilogue (false); DONE;")
(define_insn "epilogue_tpf"
[(unspec_volatile [(const_int 0)] UNSPECV_TPF_EPILOGUE)
(clobber (reg:DI 1))]
"TARGET_TPF"
"bas\t%%r1,4070"
[(set_attr "type" "jsr")
(set_attr "op_type" "RX")])
(define_expand "sibcall_epilogue" (define_expand "sibcall_epilogue"
[(use (const_int 0))] [(use (const_int 0))]
"" ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment