This is the mail archive of the gcc-patches@gcc.gnu.org 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][AArch64] Add bounds checking to vqdm*_lane intrinsics via a qualifier that also flips endianness


Nice! One nit - can the extra "tree" argument be a "const_tree" ? - I'll defer to the maintainers on the use of C++ default arguments in the AArch64 backend. But LGTM.

--Alan

Charles Baylis wrote:
On 11 November 2014 15:25, Alan Lawrence <alan.lawrence@arm.com> wrote:
[Resending in gcc-patches-accepted form]

I'm working on a patch for vget_lane (that removes the be_checked_get_lane
thing which isn't an intrinsic). Other than that, no not yet - loads and
stores I was thinking to wait until David Sherwood + Alan Hayward's patches
have been settled, but there's still ARM, indeed.

If you have any way/ideas to get better error messages (i.e. line numbers),
that'd be particularly good, tho  :)

This is the best idea I have at the moment...

The attached patch starts to improve the error messages for NEON
intrinsics, by adding %K to the error message string, as suggested by
Jakub a while ago.

========== error message without this patch:
In file included from
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:3:0:
/tmp/arm_neon.h: In function âmainâ:
/tmp/arm_neon.h:12019:10: error: lane -1 out of range 0 - 7
   return __builtin_aarch64_sqrdmulh_laneqv8hi (__a, __b, __c);

========== error message with this patch (gives point of use of the
NEON intrinsic)
In file included from
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:3:0:
In function âvqrdmulhq_laneq_s16â,
    inlined from âmainâ at
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:17:3:
/tmp/arm_neon.h:12019:10: error: lane -1 out of range 0 - 7
   return __builtin_aarch64_sqrdmulh_laneqv8hi (__a, __b, __c);


This patch depends on Alan's patch (upthread). If conflicts were
resolved, it could be applied without, but would have no effect.

OK for trunk?

Further clean up (more work like Alan's patch) is needed to address
the other intrinsics which have arguments with constant integer range
constraints (vget_lane/vset_lane/vldN_lane/vstN_lane/shifts. Richard,
Marcus: is such clean up suitable for after stage 1 closes?



<DATE>  Charles Baylis  <charles.baylis@linaro.org>

    * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Pass
    expression to aarch64_simd_lane_bounds.
    * config/aarch64/aarch64-protos.h (aarch64_simd_lane_bounds): Update
    prototype.
    * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Add exp
    parameter. Report calling function in error message if exp is non-NULL.



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