On 17/04/13 12:06, Kyrylo Tkachov wrote:
Hi Julian,

From: Julian Brown [mailto:jul...@codesourcery.com]
Sent: 13 April 2013 15:04
To: Julian Brown
Cc: Kyrylo Tkachov; gcc-patches@gcc.gnu.org; Richard Earnshaw; Ramana
Radhakrishnan
Subject: Re: [PATCH][ARM][1/2] Add support for vcvt_f16_f32 and
vcvt_f32_f16 NEON intrinsics

On Fri, 12 Apr 2013 20:09:39 +0100
Julian Brown <jul...@codesourcery.com> wrote:

On Fri, 12 Apr 2013 15:19:18 +0100
Kyrylo Tkachov <kyrylo.tkac...@arm.com> wrote:

Hi all,

This patch adds the vcvt_f16_f32 and vcvt_f32_f16 NEON intrinsic
to arm_neon.h through the generator ML scripts and also adds the
built-ins to which the intrinsics will map to. The generator ML
scripts are updated and used to generate the relevant .texi
documentation, arm_neon.h and the tests in gcc.target/arm/neon .

FWIW, some of the changes to neon*.ml can be simplified somewhat --
my
attempt at an improved version of those bits is attached. I'm still
not too happy with mode_suffix, but these new instructions require
adding semantics to parts of the generator program which weren't
really very well-defined to start with :-). I appreciate that it's a
bit of a tangle...

I thought of an improvement to the mode_suffix part from the last
version of the patch, so here it is. I'm done fiddling with this now,
so back to you!

Thanks for looking at it! My Ocaml-fu is rather limited.
It does look cleaner now.
Here it is together with all the other parts of the patch, plus some
minor formatting changes.

Ok for trunk now?

gcc/ChangeLog
2013-04-17  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
             Julian Brown  <jul...@codesourcery.com>

        * config/arm/arm.c (neon_builtin_type_mode): Add T_V4HF.
        (TB_DREG): Add T_V4HF.
        (v4hf_UP): New macro.
        (neon_itype): Add NEON_FLOAT_WIDEN, NEON_FLOAT_NARROW.
        (arm_init_neon_builtins): Handle NEON_FLOAT_WIDEN,
        NEON_FLOAT_NARROW.
        Handle initialisation of V4HF. Adjust initialisation of reinterpret
        built-ins.
        (arm_expand_neon_builtin): Handle NEON_FLOAT_WIDEN,
        NEON_FLOAT_NARROW.
        (arm_vector_mode_supported_p): Handle V4HF.
        (arm_mangle_map): Handle V4HFmode.
        * config/arm/arm.h (VALID_NEON_DREG_MODE): Add V4HF.
        * config/arm/arm_neon_builtins.def: Add entries for
        vcvtv4hfv4sf, vcvtv4sfv4hf.
        * config/arm/neon.md (neon_vcvtv4sfv4hf): New pattern.
        (neon_vcvtv4hfv4sf): Likewise.
        * config/arm/neon-gen.ml: Handle half-precision floating point
        features.
        * config/arm/neon-testgen.ml: Handle Requires_FP_bit feature.
        * config/arm/arm_neon.h: Regenerate.
        * config/arm/neon.ml (type elts): Add F16.
        (type vectype): Add T_float16x4, T_floatHF.
        (type vecmode): Add V4HF.
        (type features): Add Requires_FP_bit feature.
        (elt_width): Handle F16.
        (elt_class): Likewise.
        (elt_of_class_width): Likewise.
        (mode_of_elt): Refactor.
        (type_for_elt): Handle F16, fix error messages.
        (vectype_size): Handle T_float16x4.
        (vcvt_sh): New function.
        (ops): Add entries for vcvt_f16_f32, vcvt_f32_f16.
        (string_of_vectype): Handle T_floatHF, T_float16, T_float16x4.
        (string_of_mode): Handle V4HF.
        * doc/arm-neon-intrinsics.texi: Regenerate.


gcc/testsuite/ChangeLog
2013-04-17  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
             Julian Brown  <jul...@codesourcery.com>

        * gcc.target/arm/neon/vcvtf16_f32.c: New test. Generated.
        * gcc.target/arm/neon/vcvtf32_f16.c: Likewise.


neon-vcvt-intrinsics.patch


Please give Julian 24 hours for one final review of the Ocaml bits. Otherwise OK.

R.


Reply via email to