@@ -1,6 +1,6 @@
/* Test various operators on __fp16 and mixed __fp16/float operands. */
/* { dg-do run { target arm*-*-* } } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
#include "arm-fp16-ops.h"
@@ -1,6 +1,7 @@
/* Test various operators on __fp16 and mixed __fp16/float operands. */
/* { dg-do run { target arm*-*-* } } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative -ffast-math" } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_fp16_alternative } */
#include "arm-fp16-ops.h"
@@ -1,7 +1,7 @@
/* Test floating-point conversions. Standard types and __fp16. */
/* { dg-do run { target arm*-*-* } } */
/* { dg-require-effective-target arm_fp16_alternative_ok }
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
#include "fp-int-convert.h"
#define FP16_MANT_DIG 11
@@ -1,6 +1,6 @@
/* Test various operators on __fp16 and mixed __fp16/float operands. */
/* { dg-do run { target arm*-*-* } } */
/* { dg-require-effective-target arm_fp16_alternative_ok }
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
#include "arm-fp16-ops.h"
@@ -1,6 +1,7 @@
/* Test various operators on __fp16 and mixed __fp16/float operands. */
/* { dg-do run { target arm*-*-* } } */
/* { dg-require-effective-target arm_fp16_alternative_ok }
-/* { dg-options "-mfp16-format=alternative -ffast-math" } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_fp16_alternative } */
#include "arm-fp16-ops.h"
@@ -1,7 +1,8 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_hard_vfp_ok } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-O2 -mfp16-format=alternative" } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Test __fp16 arguments and return value in registers (hard-float). */
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfloat-abi=softfp -O2 -mfp16-format=alternative" } */
+/* { dg-options "-mfloat-abi=softfp -O2" } */
+/* { dg-add-options arm_fp16_alternative } */
/* { dg-skip-if "incompatible float-abi" { arm*-*-* } { "-mfloat-abi=hard" } } */
/* Test __fp16 arguments and return value in registers (softfp). */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
__fp16 xx = 0.0;
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative -pedantic -std=gnu99" } */
+/* { dg-options "-pedantic -std=gnu99" } */
+/* { dg-add-options arm_fp16_alternative } */
#include <math.h>
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative -pedantic -std=gnu99" } */
+/* { dg-options "-pedantic -std=gnu99" } */
+/* { dg-add-options arm_fp16_alternative } */
#include <math.h>
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
float xx __attribute__((mode(HF))) = 0.0;
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* 0x3c00 = 15360 */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* 0xc000 = 49152 */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* 0x7bff = 31743 */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* 0x3555 = 13653 */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* This number is the maximum value representable in the alternative
encoding. */
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative -pedantic" } */
+/* { dg-options "-pedantic" } */
+/* { dg-add-options arm_fp16_alternative } */
/* This number overflows the range of the alternative encoding. Since this
encoding doesn't have infinities, we should get a pedantic warning,
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* This is the minimum normalized value. */
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-add-options arm_fp16_alternative } */
/* Encoding taken from: http://en.wikipedia.org/wiki/Half_precision */
/* This is the minimum denormalized value. */
@@ -3,8 +3,10 @@
__fp16 via float. */
/* { dg-do run } */
+/* { dg-require-effective-target arm_fp16_hw } */
/* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-mfp16-format=alternative" } */
+/* { dg-options "-std=c99" } */
+/* { dg-add-options arm_fp16_alternative } */
#include <stdlib.h>
@@ -5247,25 +5247,25 @@ proc add_options_for_aarch64_sve { flags } {
# Return 1 if this is an ARM target supporting the FP16 alternative
# format. Some multilibs may be incompatible with the options needed. Also
-# set et_arm_neon_fp16_flags to the best options to add.
+# set et_arm_fp16_alternative_flags to the best options to add.
proc check_effective_target_arm_fp16_alternative_ok_nocache { } {
if { [istarget *-*-vxworks7*] } {
# Not supported by the target system.
return 0
}
- global et_arm_neon_fp16_flags
- set et_arm_neon_fp16_flags ""
+ global et_arm_fp16_alternative_flags
+ set et_arm_fp16_alternative_flags ""
if { [check_effective_target_arm32] } {
foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp16"
"-mfpu=neon-fp16 -mfloat-abi=softfp"} {
if { [check_no_compiler_messages_nocache \
arm_fp16_alternative_ok object {
- #if !defined (__ARM_FP16_FORMAT_ALTERNATIVE)
+ #if !defined (__ARM_FP16_FORMAT_ALTERNATIVE) || ! (__ARM_FP & 2)
#error __ARM_FP16_FORMAT_ALTERNATIVE not defined
#endif
} "$flags -mfp16-format=alternative"] } {
- set et_arm_neon_fp16_flags "$flags -mfp16-format=alternative"
+ set et_arm_fp16_alternative_flags "$flags -mfp16-format=alternative"
return 1
}
}
@@ -5404,11 +5404,11 @@ proc add_options_for_arm_fp16_ieee { flags } {
# half-precision support. This is valid for ARM targets.
proc add_options_for_arm_fp16_alternative { flags } {
- if { ! [check_effective_target_arm_fp16_ok] } {
+ if { ! [check_effective_target_arm_fp16_alternative_ok] } {
return "$flags"
}
- global et_arm_fp16_flags
- return "$flags $et_arm_fp16_flags -mfp16-format=alternative"
+ global et_arm_fp16_alternative_flags
+ return "$flags $et_arm_fp16_alternative_flags"
}
# Return 1 if this is an ARM target that can support a VFP fp16 variant.