This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH][ARM][1/2] Add support for vcvt_f16_f32 and vcvt_f32_f16 NEON intrinsics

Hi Julian,

> From: Julian Brown []
> Sent: 13 April 2013 15:04
> To: Julian Brown
> Cc: Kyrylo Tkachov;; 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 <> wrote:
> > On Fri, 12 Apr 2013 15:19:18 +0100
> > Kyrylo Tkachov <> 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 .
> >
> > 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?

2013-04-17  Kyrylo Tkachov  <>
            Julian Brown  <>

	* config/arm/arm.c (neon_builtin_type_mode): Add T_V4HF.
	(TB_DREG): Add T_V4HF.
	(v4hf_UP): New macro.
	(arm_init_neon_builtins): Handle NEON_FLOAT_WIDEN,
	Handle initialisation of V4HF. Adjust initialisation of reinterpret
	(arm_expand_neon_builtin): Handle NEON_FLOAT_WIDEN,
	(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_vcvtv4sfv4hf): New pattern.
	(neon_vcvtv4hfv4sf): Likewise.
	* config/arm/ Handle half-precision floating point
	* config/arm/ Handle Requires_FP_bit feature.
	* config/arm/arm_neon.h: Regenerate.
	* config/arm/ (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.

2013-04-17  Kyrylo Tkachov  <>
            Julian Brown  <>

	* New test. Generated.
	* Likewise.

Attachment: neon-vcvt-intrinsics.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]