Commit 1e2414db by Richard Kenner

(expand_function_end): Allow TRAMPOLINE_TEMPLATE

to be omitted on systems for which it is not cost effective.

From-SVN: r11822
parent 8b7bf671
...@@ -5309,7 +5309,9 @@ expand_function_end (filename, line, end_bindings) ...@@ -5309,7 +5309,9 @@ expand_function_end (filename, line, end_bindings)
register int i; register int i;
tree link; tree link;
#ifdef TRAMPOLINE_TEMPLATE
static rtx initial_trampoline; static rtx initial_trampoline;
#endif
if (output_bytecode) if (output_bytecode)
{ {
...@@ -5342,8 +5344,10 @@ expand_function_end (filename, line, end_bindings) ...@@ -5342,8 +5344,10 @@ expand_function_end (filename, line, end_bindings)
tree function = TREE_PURPOSE (link); tree function = TREE_PURPOSE (link);
rtx context = lookup_static_chain (function); rtx context = lookup_static_chain (function);
rtx tramp = RTL_EXPR_RTL (TREE_VALUE (link)); rtx tramp = RTL_EXPR_RTL (TREE_VALUE (link));
rtx blktramp;
rtx seq; rtx seq;
#ifdef TRAMPOLINE_TEMPLATE
/* First make sure this compilation has a template for /* First make sure this compilation has a template for
initializing trampolines. */ initializing trampolines. */
if (initial_trampoline == 0) if (initial_trampoline == 0)
...@@ -5353,15 +5357,18 @@ expand_function_end (filename, line, end_bindings) ...@@ -5353,15 +5357,18 @@ expand_function_end (filename, line, end_bindings)
= gen_rtx (MEM, BLKmode, assemble_trampoline_template ()); = gen_rtx (MEM, BLKmode, assemble_trampoline_template ());
resume_temporary_allocation (); resume_temporary_allocation ();
} }
#endif
/* Generate insns to initialize the trampoline. */ /* Generate insns to initialize the trampoline. */
start_sequence (); start_sequence ();
tramp = change_address (initial_trampoline, BLKmode, tramp = round_trampoline_addr (XEXP (tramp, 0));
round_trampoline_addr (XEXP (tramp, 0))); #ifdef TRAMPOLINE_TEMPLATE
emit_block_move (tramp, initial_trampoline, GEN_INT (TRAMPOLINE_SIZE), blktramp = change_address (initial_trampoline, BLKmode, tramp);
emit_block_move (blktramp, initial_trampoline,
GEN_INT (TRAMPOLINE_SIZE),
FUNCTION_BOUNDARY / BITS_PER_UNIT); FUNCTION_BOUNDARY / BITS_PER_UNIT);
INITIALIZE_TRAMPOLINE (XEXP (tramp, 0), #endif
XEXP (DECL_RTL (function), 0), context); INITIALIZE_TRAMPOLINE (tramp, XEXP (DECL_RTL (function), 0), context);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
......
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