Commit 8b0f9101 by Richard Kenner

(emit_library_call): Move the invocation of prepare_call_address before the…

(emit_library_call): Move the invocation of prepare_call_address before the assignments of the function arguments.

(emit_library_call): Move the invocation of prepare_call_address before the
assignments of the function arguments.
(emit_library_call_value): Likewise.

From-SVN: r6978
parent 1923e516
...@@ -1770,6 +1770,8 @@ expand_call (exp, target, ignore) ...@@ -1770,6 +1770,8 @@ expand_call (exp, target, ignore)
} }
} }
funexp = prepare_call_address (funexp, fndecl, &use_insns);
/* Now do the register loads required for any wholly-register parms or any /* Now do the register loads required for any wholly-register parms or any
parms which are passed both on the stack and in a register. Their parms which are passed both on the stack and in a register. Their
expressions were already evaluated. expressions were already evaluated.
...@@ -1844,8 +1846,6 @@ expand_call (exp, target, ignore) ...@@ -1844,8 +1846,6 @@ expand_call (exp, target, ignore)
/* All arguments and registers used for the call must be set up by now! */ /* All arguments and registers used for the call must be set up by now! */
funexp = prepare_call_address (funexp, fndecl, &use_insns);
/* Generate the actual call instruction. */ /* Generate the actual call instruction. */
emit_call_1 (funexp, funtype, args_size.constant, struct_value_size, emit_call_1 (funexp, funtype, args_size.constant, struct_value_size,
FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1),
...@@ -2324,6 +2324,8 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode, ...@@ -2324,6 +2324,8 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
argnum = 0; argnum = 0;
#endif #endif
fun = prepare_call_address (fun, NULL_TREE, &use_insns);
/* Now load any reg parms into their regs. */ /* Now load any reg parms into their regs. */
for (count = 0; count < nargs; count++, argnum += inc) for (count = 0; count < nargs; count++, argnum += inc)
...@@ -2351,8 +2353,6 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode, ...@@ -2351,8 +2353,6 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
use_insns = get_insns (); use_insns = get_insns ();
end_sequence (); end_sequence ();
fun = prepare_call_address (fun, NULL_TREE, &use_insns);
/* Don't allow popping to be deferred, since then /* Don't allow popping to be deferred, since then
cse'ing of library calls could delete a call and leave the pop. */ cse'ing of library calls could delete a call and leave the pop. */
NO_DEFER_POP; NO_DEFER_POP;
...@@ -2670,6 +2670,8 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue, ...@@ -2670,6 +2670,8 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
argnum = 0; argnum = 0;
#endif #endif
fun = prepare_call_address (fun, NULL_TREE, &use_insns);
/* Now load any reg parms into their regs. */ /* Now load any reg parms into their regs. */
for (count = 0; count < nargs; count++, argnum += inc) for (count = 0; count < nargs; count++, argnum += inc)
...@@ -2715,8 +2717,6 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue, ...@@ -2715,8 +2717,6 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
} }
} }
fun = prepare_call_address (fun, NULL_TREE, &use_insns);
/* Don't allow popping to be deferred, since then /* Don't allow popping to be deferred, since then
cse'ing of library calls could delete a call and leave the pop. */ cse'ing of library calls could delete a call and leave the pop. */
NO_DEFER_POP; NO_DEFER_POP;
......
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