aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-04-11 06:43:58 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-04-11 06:43:58 -0400
commit7373d92d2f7827d896b80e54c4bf9bd8ef6cf978 (patch)
treef3cfe9b1e7cf0901c27128edc79b349709b4e6c9 /gcc
parent678566a5af9e48dc2eb9bcaa84a8741412697471 (diff)
downloadgcc-7373d92d2f7827d896b80e54c4bf9bd8ef6cf978.zip
gcc-7373d92d2f7827d896b80e54c4bf9bd8ef6cf978.tar.gz
gcc-7373d92d2f7827d896b80e54c4bf9bd8ef6cf978.tar.bz2
(expand_call, emit_library_call{,_value}, store_one_arg): Use
convert_modes instead of convert_to_mode. From-SVN: r7026
Diffstat (limited to 'gcc')
-rw-r--r--gcc/calls.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 4c5c7ea..285fb8f 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1287,10 +1287,12 @@ expand_call (exp, target, ignore)
args[i].initial_value = args[i].value
= expand_expr (args[i].tree_value, NULL_RTX, VOIDmode, 0);
- if (GET_MODE (args[i].value ) != VOIDmode
- && GET_MODE (args[i].value) != args[i].mode)
- args[i].value = convert_to_mode (args[i].mode, args[i].value,
- args[i].unsignedp);
+ if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) != args[i].mode)
+ args[i].value
+ = convert_modes (args[i].mode,
+ TYPE_MODE (TREE_TYPE (args[i].tree_value)),
+ args[i].value, args[i].unsignedp);
+
preserve_temp_slots (args[i].value);
pop_temp_slots ();
@@ -2174,7 +2176,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
Pass it as a double instead. */
#ifdef LIBGCC_NEEDS_DOUBLE
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
/* 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,
Pass it as a double instead. */
#ifdef LIBGCC_NEEDS_DOUBLE
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
/* 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,
/* If we are promoting object (or for any other reason) the mode
doesn't agree, convert the mode. */
- if (GET_MODE (arg->value) != VOIDmode
- && GET_MODE (arg->value) != arg->mode)
- arg->value = convert_to_mode (arg->mode, arg->value, arg->unsignedp);
+ if (arg->mode != TYPE_MODE (TREE_TYPE (pval)))
+ arg->value = convert_modes (arg->mode, TYPE_MODE (TREE_TYPE (pval)),
+ arg->value, arg->unsignedp);
#ifdef ACCUMULATE_OUTGOING_ARGS
if (arg->pass_on_stack)