diff options
Diffstat (limited to 'C/CpuArch.h')
-rw-r--r-- | C/CpuArch.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/C/CpuArch.h b/C/CpuArch.h index 529d3a5..4856fbb 100644 --- a/C/CpuArch.h +++ b/C/CpuArch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* CpuArch.h -- CPU specific code | 1 | /* CpuArch.h -- CPU specific code |
2 | 2021-07-13 : Igor Pavlov : Public domain */ | 2 | 2022-07-15 : Igor Pavlov : Public domain */ |
3 | 3 | ||
4 | #ifndef __CPU_ARCH_H | 4 | #ifndef __CPU_ARCH_H |
5 | #define __CPU_ARCH_H | 5 | #define __CPU_ARCH_H |
@@ -123,12 +123,15 @@ MY_CPU_64BIT means that processor can work with 64-bit registers. | |||
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | 125 | ||
126 | #if defined(__sparc64__) | 126 | #if defined(__riscv) \ |
127 | #define MY_CPU_NAME "sparc64" | 127 | || defined(__riscv__) |
128 | #define MY_CPU_64BIT | 128 | #if __riscv_xlen == 32 |
129 | #elif defined(__sparc__) | 129 | #define MY_CPU_NAME "riscv32" |
130 | #define MY_CPU_NAME "sparc" | 130 | #elif __riscv_xlen == 64 |
131 | /* #define MY_CPU_32BIT */ | 131 | #define MY_CPU_NAME "riscv64" |
132 | #else | ||
133 | #define MY_CPU_NAME "riscv" | ||
134 | #endif | ||
132 | #endif | 135 | #endif |
133 | 136 | ||
134 | 137 | ||