This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, AArch64] Restructure arm_neon.h vector types' implementation.
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Tejas Belagod <tbelagod at arm dot com>
- Cc: Yufeng Zhang <yufengzhangdev at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marc Glisse <marc dot glisse at inria dot fr>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Tue, 8 Jul 2014 17:00:07 +0100
- Subject: Re: [Patch, AArch64] Restructure arm_neon.h vector types' implementation.
- Authentication-results: sourceware.org; auth=none
- References: <53A84C27 dot 9050001 at arm dot com> <CAHkEkXq36voJ_7PCn+_1LU5x8-31=pWc=r+JO1x92w8VtvsDEA at mail dot gmail dot com> <53AD8E83 dot 8020201 at arm dot com>
I've spotted another couple of issues (inline below) that I see when
trying to bootstrap an AArch64 compiler with this patch applied.
(sorry for any duplicate mails sent and received, my mailer was upset by
some of the characters in the error messages).
Thanks,
James
On Fri, Jun 27, 2014 at 04:32:19PM +0100, Tejas Belagod wrote:
> +#define ENTRY(E, M, Q, G) E,
> +enum aarch64_simd_type
> +{
> +#include "aarch64-simd-builtin-types.def"
> +};
> +#undef ENTRY
>
The final entry in this enum will have a trailing comma, resulting in:
[...]/aarch64-builtins.c:333:28
error: comma at end of enumerator list
#define ENTRY(E, M, Q, G) E,
[...]/aarch64-simd-builtin-types.def:50:3: note: in expansion of macro ENTRY
ENTRY (Float64x2_t, V2DF, none, 13)
<snip>
> static void
> -aarch64_init_simd_builtins (void)
> +aarch64_init_simd_builtin_types (void)
> {
> - unsigned int i, fcode = AARCH64_SIMD_BUILTIN_BASE + 1;
> + int i;
> + int nelts = sizeof (aarch64_simd_types) / sizeof (aarch64_simd_types[0]);
> + tree tdecl;
<snip>
> +
> + for (i = 0; i < nelts; i++)
> + {
> + tree eltype = aarch64_simd_types[i].eltype;
> + enum machine_mode mode = aarch64_simd_types[i].mode;
> + enum aarch64_simd_type type = aarch64_simd_types[i].type;
Type is unused here, resulting in:
[...]/aarch64-builtins.c: In function void aarch64_init_simd_builtin_types():
[...]/aarch64-builtins.c:547:30: error: unused variable
enum aarch64_simd_type type = aarch64_simd_types[i].type;
> +
> + if (aarch64_simd_types[i].itype == NULL)
> + aarch64_simd_types[i].itype =
> + build_distinct_type_copy
> + (build_vector_type (eltype, GET_MODE_NUNITS (mode)));
> +
> + tdecl = add_builtin_type (aarch64_simd_types[i].name,
> + aarch64_simd_types[i].itype);
> + TYPE_NAME (aarch64_simd_types[i].itype) = tdecl;
> + SET_TYPE_STRUCTURAL_EQUALITY (aarch64_simd_types[i].itype);
> + }
>
<snip>