diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2011-05-04 12:01:21 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2011-05-04 12:01:21 +0000 |
commit | 5e617be801a07a59e464005f9e1bac1959b6cf56 (patch) | |
tree | 8900c45044a2c5fcbab68008ebff0cf2f9c08fa3 /gcc/calls.c | |
parent | 23ee028b82aaf3615dca2639a3443fcb216846cc (diff) | |
download | gcc-5e617be801a07a59e464005f9e1bac1959b6cf56.zip gcc-5e617be801a07a59e464005f9e1bac1959b6cf56.tar.gz gcc-5e617be801a07a59e464005f9e1bac1959b6cf56.tar.bz2 |
calls.c (emit_library_call_value_1): Invoke promote_function_mode hook on libcall arguments.
2011-05-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* calls.c (emit_library_call_value_1): Invoke
promote_function_mode hook on libcall arguments.
* explow.c (promote_function_mode, promote_mode): Handle TYPE
argument being NULL.
* targhooks.c (default_promote_function_mode): Lisewise.
* config/s390/s390.c (s390_promote_function_mode): Likewise.
* config/sparc/sparc.c (sparc_promote_function_mode): Likewise.
* doc/tm.texi: Document that TYPE argument might be NULL.
From-SVN: r173371
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 98f3009..44a16ff 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -3477,6 +3477,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, { rtx val = va_arg (p, rtx); enum machine_mode mode = (enum machine_mode) va_arg (p, int); + int unsigned_p = 0; /* We cannot convert the arg value to the mode the library wants here; must do it earlier where we know the signedness of the arg. */ @@ -3524,9 +3525,9 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, val = force_operand (XEXP (slot, 0), NULL_RTX); } - argvec[count].value = val; + mode = promote_function_mode (NULL_TREE, mode, &unsigned_p, NULL_TREE, 0); argvec[count].mode = mode; - + argvec[count].value = convert_modes (mode, GET_MODE (val), val, unsigned_p); argvec[count].reg = targetm.calls.function_arg (&args_so_far, mode, NULL_TREE, true); |