public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4586] LoongArch: Modify check_effective_target_vect_int_mod according to SX/ASX capabilities.
@ 2023-10-12  7:28 LuluCheng
  0 siblings, 0 replies; only message in thread
From: LuluCheng @ 2023-10-12  7:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3948844679a306613b66574b28dbf0c8d40ccbfd

commit r14-4586-g3948844679a306613b66574b28dbf0c8d40ccbfd
Author: Chenghui Pan <panchenghui@loongson.cn>
Date:   Tue Sep 26 14:42:57 2023 +0800

    LoongArch: Modify check_effective_target_vect_int_mod according to SX/ASX capabilities.
    
    gcc/testsuite/ChangeLog:
    
            * lib/target-supports.exp: Add LoongArch in
            check_effective_target_vect_int_mod according to SX/ASX capabilities.

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4451386d780..f0b692a2e19 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8816,6 +8816,8 @@ proc check_effective_target_vect_int_mod { } {
       expr { ([istarget powerpc*-*-*]
 	      && [check_effective_target_has_arch_pwr10])
              || [istarget amdgcn-*-*]
+             || ([istarget loongarch*-*-*]
+		 && [check_effective_target_loongarch_sx])
              || ([istarget riscv*-*-*]
 		 && [check_effective_target_riscv_v]) }}]
 }
@@ -12948,6 +12950,14 @@ proc check_effective_target_cv_alu { } {
     } "-march=rv32i_xcvalu" ]
 }
 
+proc check_effective_target_loongarch_sx { } {
+    return [check_no_compiler_messages loongarch_lsx assembly {
+       #if !defined(__loongarch_sx)
+       #error "LSX not defined"
+       #endif
+    }]
+}
+
 proc check_effective_target_loongarch_sx_hw { } {
     return [check_runtime loongarch_sx_hw {
 	#include <lsxintrin.h>
@@ -12960,6 +12970,14 @@ proc check_effective_target_loongarch_sx_hw { } {
     } "-mlsx"]
 }
 
+proc check_effective_target_loongarch_asx { } {
+    return [check_no_compiler_messages loongarch_asx assembly {
+       #if !defined(__loongarch_asx)
+       #error "LASX not defined"
+       #endif
+    }]
+}
+
 proc check_effective_target_loongarch_asx_hw { } {
     return [check_runtime loongarch_asx_hw {
 	#include <lasxintrin.h>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-12  7:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12  7:28 [gcc r14-4586] LoongArch: Modify check_effective_target_vect_int_mod according to SX/ASX capabilities LuluCheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).