]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport of r269499 and related testism fix r269596.
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Wed, 13 Mar 2019 11:46:56 +0000 (11:46 +0000)
committerAndre Vieira <avieira@gcc.gnu.org>
Wed, 13 Mar 2019 11:46:56 +0000 (11:46 +0000)
gcc/ChangeLog:
2019-03-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>

Backport from mainline
2019-03-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
requirement.

gcc/testsuite/ChangeLog:
2019-03-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>

Backport from mainline
2019-03-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/f16_f64_conv_no_dp.c: New test.

Backport from mainline
2019-03-11  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective
target.

From-SVN: r269647

gcc/ChangeLog
gcc/config/arm/arm.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c [new file with mode: 0644]

index a8bf724062169a87cc75e80dcb0d7450de8915f2..e520d31f5bf5f56909e41cca02d5536dabe9ae7d 100644 (file)
@@ -1,3 +1,11 @@
+2019-03-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       Backport from mainline
+       2019-03-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
+       requirement.
+
 2019-03-11  Martin Liska  <mliska@suse.cz>
 
        Backport from mainline
index 68a6fa56c7cc3cf1c369156d6b2f68f8997ed58b..d89b6d345f40c83fd525ff50dd5fcdbe74746b0b 100644 (file)
@@ -186,7 +186,7 @@ extern tree arm_fp16_type_node;
 /* FPU supports converting between HFmode and DFmode in a single hardware
    step.  */
 #define TARGET_FP16_TO_DOUBLE                                          \
-  (TARGET_HARD_FLOAT && (TARGET_FP16 && TARGET_VFP5))
+  (TARGET_HARD_FLOAT && TARGET_FP16 && TARGET_VFP5 && TARGET_VFP_DOUBLE)
 
 /* FPU supports fused-multiply-add operations.  */
 #define TARGET_FMA (bitmap_bit_p (arm_active_target.isa, isa_bit_VFPv4))
index c7bfd6d27bd96e67ecb3f2d83faee9b6545a35cd..ebde6c185aa136428f9c8158120961d0bfaf49a9 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       Backport from mainline
+       2019-03-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * gcc.target/arm/f16_f64_conv_no_dp.c: New test.
+
+       Backport from mainline
+       2019-03-11  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective
+       target.
+
 2019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/71544
diff --git a/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c
new file mode 100644 (file)
index 0000000..2620e57
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_fp16_ok } */
+/* { dg-skip-if "do not override fpu" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv5-sp-d16" } } */
+/* { dg-skip-if "do not disable fpu" { *-*-* } { "-mfloat-abi=soft" } { * } } */
+/* { dg-skip-if "do not override fp16-format" { *-*-* } { "-mfp16-format=*" } { "-mfp16-format=ieee" } } */
+/* { dg-options "-O1 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee" } */
+
+__fp16 foo (double a)
+{
+  return a;
+}
+
+double bar (__fp16 a)
+{
+  return a;
+}