diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2023-12-03 07:14:04 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 07:14:04 +1000 |
commit | 2bc4b1bcc68910c4f23df4dad5e1f516a710c5f8 (patch) | |
tree | dd8678a206b73fa19b102cb626b6860e5aae665c | |
parent | 13489ece870cfe43c60a430bb9d06940516c2f10 (diff) | |
parent | 1c2c5150eb17f432a5d9ad81a97d999662a4e669 (diff) |
Merge pull request #23989 from 212dandan/master
Add LoongArch support to system info
-rw-r--r-- | xbmc/utils/SystemInfo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp index d1e53c41bb..92ef021efb 100644 --- a/xbmc/utils/SystemInfo.cpp +++ b/xbmc/utils/SystemInfo.cpp @@ -1033,7 +1033,7 @@ int CSysInfo::GetKernelBitness(void) std::string machine(un.machine); if (machine == "x86_64" || machine == "amd64" || machine == "arm64" || machine == "aarch64" || machine == "ppc64" || machine == "ppc64el" || machine == "ppc64le" || machine == "ia64" || - machine == "mips64" || machine == "s390x" || machine == "riscv64") + machine == "loongarch64" || machine == "mips64" || machine == "s390x" || machine == "riscv64") kernelBitness = 64; else kernelBitness = 32; @@ -1080,6 +1080,8 @@ const std::string& CSysInfo::GetKernelCpuFamily(void) std::string machine(un.machine); if (machine.compare(0, 3, "arm", 3) == 0 || machine.compare(0, 7, "aarch64", 7) == 0) kernelCpuFamily = "ARM"; + else if (machine.compare(0, 9, "loongarch", 9) == 0 || machine.compare(0, 7, "loong64", 7) == 0) + kernelCpuFamily = "LoongArch"; else if (machine.compare(0, 4, "mips", 4) == 0) kernelCpuFamily = "MIPS"; else if (machine.compare(0, 4, "i686", 4) == 0 || machine == "i386" || machine == "amd64" || machine.compare(0, 3, "x86", 3) == 0) @@ -1466,6 +1468,8 @@ std::string CSysInfo::GetBuildTargetCpuFamily(void) return "ARM (Thumb)"; #elif defined(__arm__) || defined(_M_ARM) || defined (__aarch64__) return "ARM"; +#elif defined(__loongarch__) + return "LoongArch"; #elif defined(__mips__) || defined(mips) || defined(__mips) return "MIPS"; #elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) || \ |