1 | //! Run-time feature detection on LoongArch. |
2 | |
3 | features! { |
4 | @TARGET: loongarch; |
5 | @CFG: target_arch = "loongarch64" ; |
6 | @MACRO_NAME: is_loongarch_feature_detected; |
7 | @MACRO_ATTRS: |
8 | /// Checks if `loongarch` feature is enabled. |
9 | /// Supported arguments are: |
10 | /// |
11 | /// * `"f"` |
12 | /// * `"d"` |
13 | /// * `"frecipe"` |
14 | /// * `"div32"` |
15 | /// * `"lsx"` |
16 | /// * `"lasx"` |
17 | /// * `"lam-bh"` |
18 | /// * `"lamcas"` |
19 | /// * `"ld-seq-sa"` |
20 | /// * `"scq"` |
21 | /// * `"lbt"` |
22 | /// * `"lvz"` |
23 | /// * `"ual"` |
24 | #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] |
25 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] f: "f" ; |
26 | /// F |
27 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] d: "d" ; |
28 | /// D |
29 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] frecipe: "frecipe" ; |
30 | /// Frecipe |
31 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] div32: "div32" ; |
32 | /// Div32 |
33 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] lsx: "lsx" ; |
34 | /// LSX |
35 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] lasx: "lasx" ; |
36 | /// LASX |
37 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] lam_bh: "lam-bh" ; |
38 | /// LAM-BH |
39 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] lamcas: "lamcas" ; |
40 | /// LAM-CAS |
41 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] ld_seq_sa: "ld-seq-sa" ; |
42 | /// LD-SEQ-SA |
43 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] scq: "scq" ; |
44 | /// SCQ |
45 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] lbt: "lbt" ; |
46 | /// LBT |
47 | @FEATURE: #[stable (feature = "stdarch_loongarch_feature" , since = "1.89.0" )] lvz: "lvz" ; |
48 | /// LVZ |
49 | @FEATURE: #[unstable (feature = "stdarch_loongarch_feature_detection" , issue = "117425" )] ual: "ual" ; |
50 | /// UAL |
51 | } |
52 | |