File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2011,8 +2011,9 @@ const StringMap<bool> sys::getHostCPUFeatures() {
20112011const StringMap<bool > sys::getHostCPUFeatures () {
20122012 unsigned long hwcap = getauxval (AT_HWCAP);
20132013 bool HasFPU = hwcap & (1UL << 3 ); // HWCAP_LOONGARCH_FPU
2014- uint32_t cpucfg2 = 0x2 ;
2014+ uint32_t cpucfg2 = 0x2 , cpucfg3 = 0x3 ;
20152015 __asm__ (" cpucfg %[cpucfg2], %[cpucfg2]\n\t " : [cpucfg2] " +r" (cpucfg2));
2016+ __asm__ (" cpucfg %[cpucfg3], %[cpucfg3]\n\t " : [cpucfg3] " +r" (cpucfg3));
20162017
20172018 StringMap<bool > Features;
20182019
@@ -2026,12 +2027,13 @@ const StringMap<bool> sys::getHostCPUFeatures() {
20262027 Features[" frecipe" ] = cpucfg2 & (1U << 25 ); // CPUCFG.2.FRECIPE
20272028 Features[" lam-bh" ] = cpucfg2 & (1U << 27 ); // CPUCFG.2.LAM_BH
20282029
2030+ Features[" ld-seq-sa" ] = cpucfg3 & (1U << 23 ); // CPUCFG.3.LD_SEQ_SA
2031+
20292032 // TODO: Need to complete.
20302033 // Features["div32"] = cpucfg2 & (1U << 26); // CPUCFG.2.DIV32
20312034 // Features["lamcas"] = cpucfg2 & (1U << 28); // CPUCFG.2.LAMCAS
20322035 // Features["llacq-screl"] = cpucfg2 & (1U << 29); // CPUCFG.2.LLACQ_SCREL
20332036 // Features["scq"] = cpucfg2 & (1U << 30); // CPUCFG.2.SCQ
2034- // Features["ld-seq-sa"] = cpucfg3 & (1U << 23); // CPUCFG.3.LD_SEQ_SA
20352037 return Features;
20362038}
20372039#elif defined(__linux__) && defined(__riscv)
You can’t perform that action at this time.
0 commit comments