This commit is contained in:
Pierce Andjelkovic 2021-07-31 01:50:48 +10:00
parent 0d0e2c44e0
commit bd8759853b
No known key found for this signature in database
GPG key ID: D0DF91D85EEF6DCA
3 changed files with 14 additions and 3 deletions

View file

@ -33,8 +33,8 @@ const char procfile[] = "/proc/cpuinfo";
const char syscpupresentfile[] = "/sys/devices/system/cpu/present";
std::string GetCPUString() {
std::string cpu_string = "Unknown";
std::string cpu_string;
cpu_string = "Unknown";
return cpu_string;
}

View file

@ -424,7 +424,17 @@ const char *GetCompilerABI() {
#elif PPSSPP_ARCH(AMD64)
return "x86-64";
#elif PPSSPP_ARCH(RISCV64)
return "rv64";
//https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions
//https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md#abi-related-preprocessor-definitions
#if defined(__riscv_float_abi_single)
return "lp64f";
#elif defined(__riscv_float_abi_double)
return "lp64d";
#elif defined(__riscv_float_abi_quad)
return "lp64q";
#elif defined(__riscv_float_abi_soft)
return "lp64";
#endif
#else
return "other";
#endif

View file

@ -65,6 +65,7 @@
#endif
#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
//https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md
#define PPSSPP_ARCH_RISCV64 1
#define PPSSPP_ARCH_64BIT 1
#endif