riscv: cleanup architecture macro checks

* We really should get out of the habbit of making up
  our own architecture defines.
* __riscv with an additional  __riscv_xlen is the
  standard that developed... let's just roll with it.

Change-Id: Ieb777d48340ae25a6d66f66133afa0ec5c6da9b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4402
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Alexander von Gluck IV
2021-09-01 18:04:59 +00:00
committed by waddlesplash
parent f40bacae87
commit 372b901dfe
6 changed files with 19 additions and 8 deletions
+11 -1
View File
@@ -61,11 +61,21 @@
# define __HAIKU_ARCH_ABI "arm64"
# define __HAIKU_ARCH_ARM64 1
# define __HAIKU_ARCH_BITS 64
#elif defined(__riscv64__) || (defined(__riscv) && __riscv_xlen == 64)
#elif (defined(__riscv) && __riscv_xlen == 32)
# define __HAIKU_ARCH riscv32
# define __HAIKU_ARCH_ABI "riscv32"
# define __HAIKU_ARCH_RISCV32 1
# define __HAIKU_ARCH_BITS 32
#elif (defined(__riscv) && __riscv_xlen == 64)
# define __HAIKU_ARCH riscv64
# define __HAIKU_ARCH_ABI "riscv64"
# define __HAIKU_ARCH_RISCV64 1
# define __HAIKU_ARCH_BITS 64
#elif (defined(__riscv) && __riscv_xlen == 128)
# define __HAIKU_ARCH riscv128
# define __HAIKU_ARCH_ABI "riscv128"
# define __HAIKU_ARCH_RISCV128 1
# define __HAIKU_ARCH_BITS 128
#elif defined(__sparc64__)
# define __HAIKU_ARCH sparc64
# define __HAIKU_ARCH_ABI "sparc"