summaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.h
diff options
context:
space:
mode:
authormwahab <mwahab@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-16 09:31:58 +0000
committermwahab <mwahab@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-16 09:31:58 +0000
commit2a1125d66f6e438f60d6b9b2356464b5712046db (patch)
tree9f7d00a689aac3631bce0629d716637f5c0bb11a /gcc/config/arm/arm.h
parentcd9a8ed04e4c422c51997b7e138832e4445727ee (diff)
downloadgcc-2a1125d66f6e438f60d6b9b2356464b5712046db.tar.gz
[ARM] Enable __fp16 as a function parameter and return type.
gcc/ 2016-05-16 Matthew Wahab <matthew.wahab@arm.com> Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> Jiong Wang <jiong.wang@arm.com> * config/arm/arm-c.c (arm_cpu_builtins): Use def_or_undef_macro for __ARM_FP16_FORMAT_IEEE and __ARM_FP16_FORMAT_ALTERNATIVE. Define __ARM_FP16_ARGS when appropriate. * config/arm/arm.c (arm_invalid_parameter_type): Remove declaration. (arm_invalid_return_type): Likewise. (TARGET_INVALID_PARAMETER_TYPE): Remove. (TARGET_INVALID_RETURN_TYPE): Remove. (aapcs_vfp_sub_candidate): Allow HFmode. (aapcs_vfp_allocate): Add comment. Support HFmode. (aapcs_vfp_allocate_return_reg): Likewise. (struct aapcs_cp_arg_layout): Slightly reword comments for is_return_candidate and allocate_return_reg. (output_mov_vfp): Update assert. (arm_hard_regno_mode_ok): Remove comment, update HF-mode condition. (arm_invalid_parameter_type): Remove. (amr_invalid_return_type): Remove. * config/arm/arm.h (TARGET_NEON_FP16): Fix definition. * config/arm/arm.md (*arm32_movhf): Disable for TARGET_VFP. * config/arm/vfp.md (*movhf_vfp): Enable for TARGET_VFP. gcc/testsuite/ 2016-05-16 Matthew Wahab <matthew.wahab@arm.com> * g++.dg/ext/arm-fp16/fp16-param-1.c: Update expected output. Add test for __ARM_FP16_ARGS. * g++.dg/ext/arm-fp16/fp16-return-1.c: Update expected output. * gcc.target/arm/aapcs/neon-vect10.c: New. * gcc.target/arm/aapcs/neon-vect9.c: New. * gcc.target/arm/aapcs/vfp18.c: New. * gcc.target/arm/aapcs/vfp19.c: New. * gcc.target/arm/aapcs/vfp20.c: New. * gcc.target/arm/aapcs/vfp21.c: New. * gcc.target/arm/fp16-aapcs-1.c: New. * g++.target/arm/fp16-param-1.c: Update expected output. Add test for __ARM_FP16_ARGS. * g++.target/arm/fp16-return-1.c: Update expected output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236269 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.h')
-rw-r--r--gcc/config/arm/arm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index ad123dde991..5b1a03080d0 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -194,7 +194,8 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
/* FPU supports half-precision floating-point with NEON element load/store. */
#define TARGET_NEON_FP16 \
(TARGET_VFP \
- && ARM_FPU_FSET_HAS (TARGET_FPU_FEATURES, FPU_FL_NEON | FPU_FL_FP16))
+ && ARM_FPU_FSET_HAS (TARGET_FPU_FEATURES, FPU_FL_NEON) \
+ && ARM_FPU_FSET_HAS (TARGET_FPU_FEATURES, FPU_FL_FP16))
/* FPU supports VFP half-precision floating-point. */
#define TARGET_FP16 \