From 474d0f58f5f7c788f75798504173d653f4371b0a Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sat, 28 Aug 2021 17:40:32 -0500 Subject: Add support for the RISC-V architecture Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions) --- core/os/os.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/os') diff --git a/core/os/os.cpp b/core/os/os.cpp index 7404ffdcd5..5892f91ff3 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -431,6 +431,15 @@ bool OS::has_feature(const String &p_feature) { if (p_feature == "arm") { return true; } +#elif defined(__riscv) +#if __riscv_xlen == 8 + if (p_feature == "rv64") { + return true; + } +#endif + if (p_feature == "riscv") { + return true; + } #endif if (_check_internal_feature_support(p_feature)) { -- cgit v1.2.3