diff options
author | Matthew Wahab <matthew.wahab@arm.com> | 2015-11-26 15:06:04 +0000 |
---|---|---|
committer | Matthew Wahab <mwahab@gcc.gnu.org> | 2015-11-26 15:06:04 +0000 |
commit | a1d5d08d25717c01683e592cfc7f5ddf1bbb5e6e (patch) | |
tree | f736b188fb0f82723b41ccfcade8608716c77eb3 /gcc | |
parent | 89c9a60c99fa2cbe0ecb38964d9d98fbba5ea7c3 (diff) | |
download | gcc-a1d5d08d25717c01683e592cfc7f5ddf1bbb5e6e.zip gcc-a1d5d08d25717c01683e592cfc7f5ddf1bbb5e6e.tar.gz gcc-a1d5d08d25717c01683e592cfc7f5ddf1bbb5e6e.tar.bz2 |
[AArch64][dejagnu] Dejagnu support for ARMv8.1 Adv.SIMD.
gcc/testsuite
* lib/target-supports.exp (add_options_for_arm_v8_1a_neon): New.
(check_effective_target_arm_arch_FUNC_ok)
(add_options_for_arm_arch_FUNC)
(check_effective_target_arm_arch_FUNC_multilib): Add "armv8.1-a"
to the list to be generated.
(check_effective_target_arm_v8_1a_neon_ok_nocache): New.
(check_effective_target_arm_v8_1a_neon_ok): New.
(check_effective_target_arm_v8_1a_neon_hw): New.
From-SVN: r230970
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 57 |
2 files changed, 67 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 46810e8..cf00597 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2015-11-26 Matthew Wahab <matthew.wahab@arm.com> + + * lib/target-supports.exp (add_options_for_arm_v8_1a_neon): New. + (check_effective_target_arm_arch_FUNC_ok) + (add_options_for_arm_arch_FUNC) + (check_effective_target_arm_arch_FUNC_multilib): Add "armv8.1-a" + to the list to be generated. + (check_effective_target_arm_v8_1a_neon_ok_nocache): New. + (check_effective_target_arm_v8_1a_neon_ok): New. + (check_effective_target_arm_v8_1a_neon_hw): New. + 2015-11-26 Nathan Sidwell <nathan@acm.org> * gcc.target/nvptx/proto-1.c: Adjust expected asm. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 254c4e3..2275fd3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2816,6 +2816,16 @@ proc add_options_for_arm_v8_neon { flags } { return "$flags $et_arm_v8_neon_flags -march=armv8-a" } +# Add the options needed for ARMv8.1 Adv.SIMD. + +proc add_options_for_arm_v8_1a_neon { flags } { + if { [istarget aarch64*-*-*] } { + return "$flags -march=armv8.1-a" + } else { + return "$flags" + } +} + proc add_options_for_arm_crc { flags } { if { ! [check_effective_target_arm_crc_ok] } { return "$flags" @@ -3102,7 +3112,8 @@ foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ v7r "-march=armv7-r" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__ v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__ - v8a "-march=armv8-a" __ARM_ARCH_8A__ } { + v8a "-march=armv8-a" __ARM_ARCH_8A__ + v8_1a "-march=armv8.1a" __ARM_ARCH_8A__ } { eval [string map [list FUNC $armfunc FLAG $armflag DEF $armdef ] { proc check_effective_target_arm_arch_FUNC_ok { } { if { [ string match "*-marm*" "FLAG" ] && @@ -3259,6 +3270,25 @@ proc check_effective_target_arm_neonv2_hw { } { } [add_options_for_arm_neonv2 ""]] } +# Return 1 if the target supports the ARMv8.1 Adv.SIMD extension, 0 +# otherwise. The test is valid for AArch64. + +proc check_effective_target_arm_v8_1a_neon_ok_nocache { } { + if { ![istarget aarch64*-*-*] } { + return 0 + } + return [check_no_compiler_messages_nocache arm_v8_1a_neon_ok assembly { + #if !defined (__ARM_FEATURE_QRDMX) + #error "__ARM_FEATURE_QRDMX not defined" + #endif + } [add_options_for_arm_v8_1a_neon ""]] +} + +proc check_effective_target_arm_v8_1a_neon_ok { } { + return [check_cached_effective_target arm_v8_1a_neon_ok \ + check_effective_target_arm_v8_1a_neon_ok_nocache] +} + # Return 1 if the target supports executing ARMv8 NEON instructions, 0 # otherwise. @@ -3277,6 +3307,31 @@ proc check_effective_target_arm_v8_neon_hw { } { } [add_options_for_arm_v8_neon ""]] } +# Return 1 if the target supports executing the ARMv8.1 Adv.SIMD extension, 0 +# otherwise. The test is valid for AArch64. + +proc check_effective_target_arm_v8_1a_neon_hw { } { + if { ![check_effective_target_arm_v8_1a_neon_ok] } { + return 0; + } + return [check_runtime_nocache arm_v8_1a_neon_hw_available { + int + main (void) + { + __Int32x2_t a = {0, 1}; + __Int32x2_t b = {0, 2}; + __Int32x2_t result; + + asm ("sqrdmlah %0.2s, %1.2s, %2.2s" + : "=w"(result) + : "w"(a), "w"(b) + : /* No clobbers. */); + + return result[0]; + } + } [add_options_for_arm_v8_1a_neon ""]] +} + # Return 1 if this is a ARM target with NEON enabled. proc check_effective_target_arm_neon { } { |