This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Fix some scan-assembler tests for -mabi=ilp32
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, <nd at arm dot com>
- Date: Wed, 29 Jun 2016 11:47:57 +0100
- Subject: Re: [PATCH][AArch64] Fix some scan-assembler tests for -mabi=ilp32
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- References: <5773A58D dot 8050703 at foss dot arm dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Wed, Jun 29, 2016 at 11:40:13AM +0100, Kyrill Tkachov wrote:
> Hi all,
>
> I notice these scan-assembler tests fail when testing -mabi=ilp32 because the
> 64-bit operation that they expect doesn't happen on the 32-bit long types in
> that configuration.
>
> The easy fix is to change the 'long' types to be 'long long' so that they are
> always 64-bit. With this patch the tests now pass with and without
> -mabi=ilp32.
In my opinion, the better fix would be something like:
typedef int SImode __attribute__((mode(SI)));
typedef int DImode __attribute__((mode(DI)));
Then:
SImode
foosi (SImode x)
{
...
}
DImode
foodi (DImode x)
{
...
}
As these patterns are explictly testing that the back-end patterns are
triggered for data of any type, under any ABI, with the appropriate mode.
Thanks,
James
> 2016-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gcc.target/aarch64/cinc_common_1.c: Use long long instead of long.
> * gcc.target/aarch64/combine_bfi_1.c: Likewise.
> * gcc.target/aarch64/fmul_fcvt_1.c: Likewise.
> * gcc.target/aarch64/mult-synth_4.c: Likewise.
> * gcc.target/aarch64/target_attr_3.c: Likewise.