target-supports.exp (check_effective_target_vect_int, [...]): Check for ARM.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 1 Jul 2008 22:15:47 +0000 (23:15 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 1 Jul 2008 22:15:47 +0000 (23:15 +0100)
* lib/target-supports.exp (check_effective_target_vect_int,
check_effective_target_vect_shift,
check_effective_target_vect_long,
check_effective_target_vect_float,
check_effective_target_vect_no_align,
check_effective_target_vect_int_mult): Check for ARM.
(check_effective_target_arm_neon): New.
(check_effective_target_vect_cmdline_needed): Use it.

From-SVN: r137328

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index d52e473..5f06629 100644 (file)
@@ -1,3 +1,14 @@
+2008-07-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * lib/target-supports.exp (check_effective_target_vect_int,
+       check_effective_target_vect_shift,
+       check_effective_target_vect_long,
+       check_effective_target_vect_float,
+       check_effective_target_vect_no_align,
+       check_effective_target_vect_int_mult): Check for ARM.
+       (check_effective_target_arm_neon): New.
+       (check_effective_target_vect_cmdline_needed): Use it.
+
 2008-07-01  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * g++.dg/other/opaque-1.C, g++.dg/other/opaque-2.C,
index ecca421..9c12ddd 100644 (file)
@@ -1131,7 +1131,8 @@ proc check_effective_target_vect_cmdline_needed { } {
             || ([istarget powerpc*-*-*]
                 && ([check_effective_target_powerpc_spe]
                     || [check_effective_target_powerpc_altivec]))
-             || [istarget spu-*-*] } {
+             || [istarget spu-*-*]
+            || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
           set et_vect_cmdline_needed_saved 0
        }
     }
@@ -1158,7 +1159,8 @@ proc check_effective_target_vect_int { } {
              || [istarget x86_64-*-*]
              || [istarget sparc*-*-*]
              || [istarget alpha*-*-*]
-             || [istarget ia64-*-*] } {
+             || [istarget ia64-*-*] 
+             || [check_effective_target_arm32] } {
           set et_vect_int_saved 1
        }
     }
@@ -1264,6 +1266,22 @@ proc check_effective_target_arm_neon_hw { } {
     } "-mfpu=neon -mfloat-abi=softfp"]
 }
 
+# Return 1 if this is a ARM target with NEON enabled.
+
+proc check_effective_target_arm_neon { } {
+    if { [check_effective_target_arm32] } {
+       return [check_no_compiler_messages arm_neon object {
+           #ifndef __ARM_NEON__
+           #error not NEON
+           #else
+           int dummy;
+           #endif
+       }]
+    } else {
+       return 0
+    }
+}
+
 # Return 1 if this a Loongson-2E or -2F target using an ABI that supports
 # the Loongson vector modes.
 
@@ -1395,7 +1413,8 @@ proc check_effective_target_vect_shift { } {
              && ![istarget powerpc-*-linux*paired*])
             || [istarget ia64-*-*]
             || [istarget i?86-*-*]
-            || [istarget x86_64-*-*] } {
+            || [istarget x86_64-*-*]
+            || [check_effective_target_arm32] } {
           set et_vect_shift_saved 1
        }
     }
@@ -1414,6 +1433,7 @@ proc check_effective_target_vect_long { } {
               && ![istarget powerpc-*-linux*paired*]) 
               && [check_effective_target_ilp32])
         || [istarget x86_64-*-*]
+        || [check_effective_target_arm32]
         || ([istarget sparc*-*-*] && [check_effective_target_ilp32]) } {
        set answer 1
     } else {
@@ -1440,7 +1460,8 @@ proc check_effective_target_vect_float { } {
              || [istarget spu-*-*]
              || [istarget mipsisa64*-*-*]
              || [istarget x86_64-*-*]
-             || [istarget ia64-*-*] } {
+             || [istarget ia64-*-*]
+             || [check_effective_target_arm32] } {
           set et_vect_float_saved 1
        }
     }
@@ -1819,7 +1840,8 @@ proc check_effective_target_vect_no_align { } {
        set et_vect_no_align_saved 0
        if { [istarget mipsisa64*-*-*]
             || [istarget sparc*-*-*]
-            || [istarget ia64-*-*] } { 
+            || [istarget ia64-*-*]
+            || [check_effective_target_arm32] } { 
            set et_vect_no_align_saved 1
        }
     }
@@ -2008,7 +2030,8 @@ proc check_effective_target_vect_int_mult { } {
        if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
             || [istarget spu-*-*]
             || [istarget i?86-*-*]
-            || [istarget x86_64-*-*] } {
+            || [istarget x86_64-*-*]
+            || [check_effective_target_arm32] } {
           set et_vect_int_mult_saved 1
        }
     }