diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2011-05-04 12:01:21 +0000 |
---|---|---|
committer | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2011-05-04 12:01:21 +0000 |
commit | 7292d66945c46378b96c354fcb146b569ba3e332 (patch) | |
tree | 8900c45044a2c5fcbab68008ebff0cf2f9c08fa3 /gcc/calls.c | |
parent | b614278466cc2e490826ac0380be6a434f6aeae8 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@173371 138bc75d-0d04-0410-961f-82ee72b054a4
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 98f3009905a..44a16ff63ff 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); |