sourcebuild.texi: Document arm_v8_neon_ok.
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 6 Dec 2012 10:07:41 +0000 (10:07 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 6 Dec 2012 10:07:41 +0000 (10:07 +0000)
2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

gcc/
* doc/sourcebuild.texi: Document arm_v8_neon_ok.

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_arm_v8_neon_ok):
New procedure.
(add_options_for_arm_v8_neon): Likewise.

From-SVN: r194245

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index f5ca6e4d360ca20f069611b2a28873b421bebe2c..9d87b558656deafc6f614ad9a00f86ff00f941fe 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * doc/sourcebuild.texi: Document arm_v8_neon_ok.
+
 2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/arm/arm.c (neon_itype): Define NEON_RINT enum element.
index 0f29326690fc6d7eeac46f8936547da8b7f5f3d3..ae0568132c0b68bd5be66047f2a9c59c451ae1de 100644 (file)
@@ -1560,6 +1560,10 @@ Some multilibs may be incompatible with these options.
 ARM target supports @code{-mfpu=fp-armv8 -mfloat-abi=softfp}.
 Some multilibs may be incompatible with these options.
 
+@item arm_v8_neon_ok
+ARM target supports @code{-mfpu=neon-fp-armv8 -mfloat-abi=softfp}.
+Some multilibs may be incompatible with these options.
+
 @item arm_prefer_ldrd_strd
 ARM target prefers @code{LDRD} and @code{STRD} instructions over
 @code{LDM} and @code{STM} instructions.
index 30df45eae59e64f59ce7f135bbab8f4db733fac2..f89fe3c502664d01e5c283aa9a85d230d57fa165 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * lib/target-supports.exp (check_effective_target_arm_v8_neon_ok):
+       New procedure.
+       (add_options_for_arm_v8_neon): Likewise.
+
 2012-12-05  Steven Bosscher  <steven@gcc.gnu.org>
 
        * g++.dg/pr55604.C: New test.
index 5e830b102775c1ecf932d6b6536c8023fa089294..ef93ad1f56f067af7accd59eb1128b6e31a2b2e2 100644 (file)
@@ -2107,6 +2107,22 @@ proc check_effective_target_arm_v8_vfp_ok {} {
     }
 }
 
+# Return 1 if this is an ARM target supporting -mfpu=neon-fp-armv8
+# -mfloat-abi=softfp
+proc check_effective_target_arm_v8_neon_ok {} {
+    if { [check_effective_target_arm32] } {
+       return [check_no_compiler_messages arm_v8_neon_ok object {
+         int foo (void)
+         {
+            __asm__ volatile ("vrintn.f32 q0, q0");
+              return 0;
+         }
+       } "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"]
+    } else {
+       return 0
+    }
+}
+
 # Return 1 if this is an ARM target supporting -mfpu=vfp
 # -mfloat-abi=hard.  Some multilibs may be incompatible with these
 # options.
@@ -2166,6 +2182,13 @@ proc add_options_for_arm_v8_vfp { flags } {
     return "$flags -mfpu=fp-armv8 -mfloat-abi=softfp"
 }
 
+proc add_options_for_arm_v8_neon { flags } {
+    if { ! [check_effective_target_arm_v8_neon_ok] } {
+        return "$flags"
+    }
+    return "$flags -mfpu=neon-fp-armv8 -mfloat-abi=softfp"
+}
+
 # Add the options needed for NEON.  We need either -mfloat-abi=softfp
 # or -mfloat-abi=hard, but if one is already specified by the
 # multilib, use it.  Similarly, if a -mfpu option already enables