riscv compiler support

This commit is contained in:
Laytan
2024-09-01 15:51:39 +02:00
parent 722b638e2c
commit 28c643d23f
5 changed files with 34 additions and 4 deletions

View File

@@ -155,7 +155,7 @@ gb_internal void report_windows_product_type(DWORD ProductType) {
#endif
gb_internal void odin_cpuid(int leaf, int result[]) {
#if defined(GB_CPU_ARM)
#if defined(GB_CPU_ARM) || defined(GB_CPU_RISCV)
return;
#elif defined(GB_CPU_X86)
@@ -225,6 +225,12 @@ gb_internal void report_cpu_info() {
gb_printf("ARM\n");
#endif
}
#elif defined(GB_CPU_RISCV)
#if defined(GB_ARCH_64_BIT)
gb_printf("RISCV64\n");
#else
gb_printf("RISCV32\n");
#endif
#else
gb_printf("Unknown\n");
#endif