Commit 7373d92d by Richard Kenner

(expand_call, emit_library_call{,_value}, store_one_arg): Use

convert_modes instead of convert_to_mode.

From-SVN: r7026
parent 678566a5
...@@ -1287,10 +1287,12 @@ expand_call (exp, target, ignore) ...@@ -1287,10 +1287,12 @@ expand_call (exp, target, ignore)
args[i].initial_value = args[i].value args[i].initial_value = args[i].value
= expand_expr (args[i].tree_value, NULL_RTX, VOIDmode, 0); = expand_expr (args[i].tree_value, NULL_RTX, VOIDmode, 0);
if (GET_MODE (args[i].value ) != VOIDmode if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) != args[i].mode)
&& GET_MODE (args[i].value) != args[i].mode) args[i].value
args[i].value = convert_to_mode (args[i].mode, args[i].value, = convert_modes (args[i].mode,
args[i].unsignedp); TYPE_MODE (TREE_TYPE (args[i].tree_value)),
args[i].value, args[i].unsignedp);
preserve_temp_slots (args[i].value); preserve_temp_slots (args[i].value);
pop_temp_slots (); pop_temp_slots ();
...@@ -2174,7 +2176,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode, ...@@ -2174,7 +2176,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
Pass it as a double instead. */ Pass it as a double instead. */
#ifdef LIBGCC_NEEDS_DOUBLE #ifdef LIBGCC_NEEDS_DOUBLE
if (LIBGCC_NEEDS_DOUBLE && mode == SFmode) if (LIBGCC_NEEDS_DOUBLE && mode == SFmode)
val = convert_to_mode (DFmode, val, 0), mode = DFmode; val = convert_modes (DFmode, SFmode, val, 0), mode = DFmode;
#endif #endif
/* There's no need to call protect_from_queue, because /* There's no need to call protect_from_queue, because
...@@ -2525,7 +2527,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue, ...@@ -2525,7 +2527,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
Pass it as a double instead. */ Pass it as a double instead. */
#ifdef LIBGCC_NEEDS_DOUBLE #ifdef LIBGCC_NEEDS_DOUBLE
if (LIBGCC_NEEDS_DOUBLE && mode == SFmode) if (LIBGCC_NEEDS_DOUBLE && mode == SFmode)
val = convert_to_mode (DFmode, val, 0), mode = DFmode; val = convert_modes (DFmode, SFmode, val, 0), mode = DFmode;
#endif #endif
/* There's no need to call protect_from_queue, because /* There's no need to call protect_from_queue, because
...@@ -2955,9 +2957,9 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl, ...@@ -2955,9 +2957,9 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
/* If we are promoting object (or for any other reason) the mode /* If we are promoting object (or for any other reason) the mode
doesn't agree, convert the mode. */ doesn't agree, convert the mode. */
if (GET_MODE (arg->value) != VOIDmode if (arg->mode != TYPE_MODE (TREE_TYPE (pval)))
&& GET_MODE (arg->value) != arg->mode) arg->value = convert_modes (arg->mode, TYPE_MODE (TREE_TYPE (pval)),
arg->value = convert_to_mode (arg->mode, arg->value, arg->unsignedp); arg->value, arg->unsignedp);
#ifdef ACCUMULATE_OUTGOING_ARGS #ifdef ACCUMULATE_OUTGOING_ARGS
if (arg->pass_on_stack) if (arg->pass_on_stack)
......
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