[AArch64] Add support for __jcvt intrinsic

Programming / Compilers / GCC - ktkachov [138bc75d-0d04-0410-961f-82ee72b054a4] - 3 September 2019 08:40 EDT

This patch implements the __jcvt ACLE intrinsic [1] that maps down to the FJCVTZS [2] instruction from Armv8.3-a. No fancy mode iterators or nothing. Just a single builtin, UNSPEC and define_insn and the associate plumbing. This patch also defines __ARM_FEATURE_JCVT to indicate when the intrinsic is available.

[1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics [2] https://developer.arm.com/docs/ddi0596/latest/simd-and-floating-point-instructions-alphabetic-order/fjcvtzs-floating-point-javascript-convert-to-signed-fixed-point-rounding-toward-zero

- config/aarch64/aarch64.md (UNSPEC_FJCVTZS): Define. (aarch64_fjcvtzs): New define_insn.
- config/aarch64/aarch64.h (TARGET_JSCVT): Define.
- config/aarch64/aarch64-builtins.c (aarch64_builtins): Add AARCH64_JSCVT. (aarch64_init_builtins): Initialize __builtin_aarch64_jcvtzs. (aarch64_expand_builtin): Handle AARCH64_JSCVT.
- config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define __ARM_FEATURE_JCVT where appropriate.
- config/aarch64/arm_acle.h (__jcvt): Define.

- gcc.target/aarch64/acle/jcvt_1.c: New test.

25cf4c37c0f [AArch64] Add support for __jcvt intrinsic
gcc/ChangeLog | 13 +++++++++++++
gcc/config/aarch64/aarch64-builtins.c | 18 ++++++++++++++++++
gcc/config/aarch64/aarch64-c.c | 1 +
gcc/config/aarch64/aarch64.h | 3 +++
gcc/config/aarch64/aarch64.md | 10 ++++++++++
gcc/config/aarch64/arm_acle.h | 10 ++++++++++
gcc/testsuite/ChangeLog | 4 ++++
gcc/testsuite/gcc.target/aarch64/acle/jcvt_1.c | 15 +++++++++++++++
8 files changed, 74 insertions(+)

Upstream: gcc.gnu.org


  • Share