[Patch 16/17 libgcc ARM] Half to double precision conversions
authorJames Greenhalgh <james.greenhalgh@arm.com>
Wed, 23 Nov 2016 17:33:39 +0000 (17:33 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Wed, 23 Nov 2016 17:33:39 +0000 (17:33 +0000)
commit5e0f10a0f590b31bd7d78bd194c1c9808008f378
tree3ee6485c7d9b7bddbb110c3138aafa0a48a342b3
parentbea64ca303c145dbe9763d63921d405833edeb0c
[Patch 16/17 libgcc ARM] Half to double precision conversions

gcc/

* config/arm/arm.c (arm_convert_to_type): Delete.
(TARGET_CONVERT_TO_TYPE): Delete.
(arm_init_libfuncs): Enable trunc_optab from DFmode to HFmode.
(arm_libcall_uses_aapcs_base): Add trunc_optab from DF- to HFmode.
* config/arm/arm.h (TARGET_FP16_TO_DOUBLE): New.
* config/arm/arm.md (truncdfhf2): Only convert through SFmode if we
are in fast math mode, and have no single step hardware instruction.
(extendhfdf2): Only expand through SFmode if we don't have a
single-step hardware instruction.
* config/arm/vfp.md (*truncdfhf2): New.
(extendhfdf2): Likewise.

gcc/testsuite/

* gcc.target/arm/fp16-rounding-alt-1.c (ROUNDED): Change expected
result.
* gcc.target/arm/fp16-rounding-ieee-1.c (ROUNDED): Change expected
result.

From-SVN: r242783
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md
gcc/config/arm/vfp.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/fp16-rounding-alt-1.c
gcc/testsuite/gcc.target/arm/fp16-rounding-ieee-1.c