[AArch64] Add basic FP16 support
authorAlan Lawrence <alan.lawrence@arm.com>
Wed, 29 Jul 2015 12:27:05 +0000 (12:27 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Wed, 29 Jul 2015 12:27:05 +0000 (12:27 +0000)
commitc2ec330c9af93429e85803ef2e7f2a92a23d3f64
tree4e0bf27a51657a0224b2c5e126660c288d17c900
parentda571fdab9871ff28cc385a9a1fa25d698162ca1
[AArch64] Add basic FP16 support

gcc/:

* config/aarch64/aarch64-builtins.c (aarch64_fp16_type_node): New.
(aarch64_init_builtins): Make aarch64_fp16_type_node, use for __fp16.

* config/aarch64/aarch64-modes.def: Add HFmode.

* config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define
__ARM_FP16_FORMAT_IEEE and __ARM_FP16_ARGS. Set bit 1 of __ARM_FP.

* config/aarch64/aarch64.c (aarch64_init_libfuncs,
aarch64_promoted_type): New.

(aarch64_float_const_representable_p): Disable HFmode.
(aarch64_mangle_type): Mangle half-precision floats to "Dh".
(TARGET_PROMOTED_TYPE): Define to aarch64_promoted_type.
(TARGET_INIT_LIBFUNCS): Define to aarch64_init_libfuncs.

* config/aarch64/aarch64.md (mov<mode>): Include HFmode using GPF_F16.
(movhf_aarch64, extendhfsf2, extendhfdf2, truncsfhf2, truncdfhf2): New.

* config/aarch64/iterators.md (GPF_F16): New.

gcc/testsuite/:

* gcc.target/aarch64/f16_movs_1.c: New test.

From-SVN: r226346
gcc/ChangeLog
gcc/config/aarch64/aarch64-builtins.c
gcc/config/aarch64/aarch64-modes.def
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.h
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/f16_movs_1.c [new file with mode: 0644]