diff mbox

ARM fixed-point support [5.5/6]: argument & return padding for libcalls

Message ID CAMe9rOp0AwAacAXf1Evk9RYos+u4GbQS6gwUznegKoPaxUxRYQ@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Aug. 1, 2011, 1:51 p.m. UTC
On Mon, Aug 1, 2011 at 6:38 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, May 26, 2011 at 9:56 AM, Julian Brown <julian@codesourcery.com> wrote:
>> This patch allows padding to be specified per-target for libcalls. This
>> hasn't been traditionally important, because libcalls haven't accepted
>> quantities which might need padding, but that's no longer true with the
>> new(-ish) fixed-point support helper functions.
>>
>> Tested (alongside other fixed-point support patches) with cross to ARM
>> EABI in both big & little-endian mode (the target-specific part is to
>> avoid a behaviour change for half-float types on ARM). OK to apply?
>>
>> Thanks,
>>
>> Julian
>>
>> ChangeLog
>>
>>    gcc/
>>    * calls.c (emit_library_call_value_1): Support padding for libcall
>>    arguments and return values.
>>    * config/arm/arm.c (arm_pad_arg_upward): Pad half-float values
>>    downwards in big-endian mode.
>
> This breaks bootstrap on Linux/x86:
>
> http://gcc.gnu.org/ml/gcc-regression/2011-08/msg00007.html
>
> ../../src-trunk/gcc/calls.c: In function 'rtx_def*
> emit_library_call_value_1(int, rtx, rtx, libcall_type, machine_mode,
> int, __va_list_tag*)':
> ../../src-trunk/gcc/calls.c:3832:11: error: unused variable 'size'
> [-Werror=unused-variable]
> cc1plus: all warnings being treated as errors
>
> make[6]: *** [calls.o] Error 1
>

I am testing this patch.

Comments

H.J. Lu Aug. 1, 2011, 1:54 p.m. UTC | #1
On Mon, Aug 1, 2011 at 6:51 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Aug 1, 2011 at 6:38 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, May 26, 2011 at 9:56 AM, Julian Brown <julian@codesourcery.com> wrote:
>>> This patch allows padding to be specified per-target for libcalls. This
>>> hasn't been traditionally important, because libcalls haven't accepted
>>> quantities which might need padding, but that's no longer true with the
>>> new(-ish) fixed-point support helper functions.
>>>
>>> Tested (alongside other fixed-point support patches) with cross to ARM
>>> EABI in both big & little-endian mode (the target-specific part is to
>>> avoid a behaviour change for half-float types on ARM). OK to apply?
>>>
>>> Thanks,
>>>
>>> Julian
>>>
>>> ChangeLog
>>>
>>>    gcc/
>>>    * calls.c (emit_library_call_value_1): Support padding for libcall
>>>    arguments and return values.
>>>    * config/arm/arm.c (arm_pad_arg_upward): Pad half-float values
>>>    downwards in big-endian mode.
>>
>> This breaks bootstrap on Linux/x86:
>>
>> http://gcc.gnu.org/ml/gcc-regression/2011-08/msg00007.html
>>
>> ../../src-trunk/gcc/calls.c: In function 'rtx_def*
>> emit_library_call_value_1(int, rtx, rtx, libcall_type, machine_mode,
>> int, __va_list_tag*)':
>> ../../src-trunk/gcc/calls.c:3832:11: error: unused variable 'size'
>> [-Werror=unused-variable]
>> cc1plus: all warnings being treated as errors
>>
>> make[6]: *** [calls.o] Error 1
>>
>
> I am testing this patch.
>
> --
> H.J.
> ---
> diff --git a/gcc/calls.c b/gcc/calls.c
> index 7ad30b4..c4f8b46 100644
> --- a/gcc/calls.c
> +++ b/gcc/calls.c
> @@ -3829,7 +3829,9 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx val
> ue,
>       rtx val = argvec[argnum].value;
>       rtx reg = argvec[argnum].reg;
>       int partial = argvec[argnum].partial;
> +#ifdef BLOCK_REG_PADDING
>       int size = 0;
> +#endif
>
>       /* Handle calls that pass values in multiple non-contiguous
>         locations.  The PA64 has examples of this for library calls.  */
>

I checked it in as an obvious fix.
Julian Brown Aug. 1, 2011, 2:24 p.m. UTC | #2
On Mon, 1 Aug 2011 06:54:54 -0700
"H.J. Lu" <hjl.tools@gmail.com> wrote:

> >> This breaks bootstrap on Linux/x86:

> I checked it in as an obvious fix.

Sorry about that, and thank you!

Cheers,

Julian
diff mbox

Patch

diff --git a/gcc/calls.c b/gcc/calls.c
index 7ad30b4..c4f8b46 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -3829,7 +3829,9 @@  emit_library_call_value_1 (int retval, rtx orgfun, rtx val
ue,
       rtx val = argvec[argnum].value;
       rtx reg = argvec[argnum].reg;
       int partial = argvec[argnum].partial;
+#ifdef BLOCK_REG_PADDING
       int size = 0;
+#endif

       /* Handle calls that pass values in multiple non-contiguous