On 23 June 2014 16:47, Tejas Belagod <tbela...@arm.com> wrote:
>
> Hi,
>
> Here is a patch that restructures neon builtins to use vector types based on
> standard base types. We previously defined arm_neon.h's neon vector
> types(int8x8_t) using gcc's front-end vector extensions. We now move away
> from that and use types built internally(e.g. __Int8x8_t). These internal
> types names are defined by the AAPCS64 and we build arm_neon.h's public
> vector types over these internal types. e.g.
>
>   typedef __Int8x8_t int8x8_t;
>
> as opposed to
>
>   typedef __builtin_aarch64_simd_qi int8x8_t
>     __attribute__ ((__vector_size__ (8)));
>
> Impact on mangling:
>
> This patch does away with these builtin scalar types that the vector types
> were based on. These were previously used to look up mangling names. We now
> use the internal vector type names(e.g. __Int8x8_t) to lookup mangling for
> the arm_neon.h-exported vector types. There are a few internal scalar
> types(__builtin_aarch64_simd_oi etc.) that is needed to efficiently
> implement some NEON Intrinsics. These will be declared in the back-end and
> registered in the front-end and aarch64-specific builtin types, but are not
> user-visible. These, along with a few scalar __builtin types that aren't
> user-visible will have implementation-defined mangling. Because we don't
> have strong-typing across all builtins yet, we still have to maintain the
> old builtin scalar types - they will be removed once we move over to a
> strongly-typed builtin system implemented by the qualifier infrastructure.
>
> Marc Glisse's patch in this thread exposed this issue
> https://gcc.gnu.org/ml/gcc-patches/2014-04/msg00618.html. I've tested my
> patch with the change that his patch introduced, and it seems to work fine -
> specifically these two lines:
>
> +  for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
> +    emit_support_tinfo_1 (TREE_VALUE (t));
>
> Regressed on aarch64-none-elf. OK for trunk?
>
> Thanks,
> Tejas.
>
> gcc/Changelog
>
> 2014-06-23  Tejas Belagod  <tejas.bela...@arm.com>
>
>         * config/aarch64/aarch64-builtins.c (aarch64_build_scalar_type):
> Remove.
>         (aarch64_scalar_builtin_types, aarch64_simd_type,
> aarch64_simd_types,
>          aarch64_mangle_builtin_scalar_type,
> aarch64_mangle_builtin_vector_type,
>          aarch64_mangle_builtin_type, aarch64_simd_builtin_std_type,
>          aarch64_lookup_simd_builtin_type, aarch64_simd_builtin_type,
>          aarch64_init_simd_builtin_types,
>          aarch64_init_simd_builtin_scalar_types): New.
>         (aarch64_init_simd_builtins): Refactor.
>         (aarch64_fold_builtin): Remove redundant defn.
>         (aarch64_init_crc32_builtins): Use aarch64_simd_builtin_std_type.
>         * config/aarch64/aarch64-simd-builtin-types.def: New.

Has the content of this new file been included in the patch?

Yufeng

Reply via email to