From 3f762121bd7e4e3db87df4178cbfbbb07ef7f04e Mon Sep 17 00:00:00 2001 From: Xeonacid Date: Sun, 6 Apr 2025 14:36:31 +0200 Subject: [PATCH] Add riscv64 defines --- cds/compiler/gcc/compiler_macro.h | 5 +++++ cds/details/defs.h | 1 + 2 files changed, 6 insertions(+) diff --git a/cds/compiler/gcc/compiler_macro.h b/cds/compiler/gcc/compiler_macro.h index f954d6ca8..93601b463 100644 --- a/cds/compiler/gcc/compiler_macro.h +++ b/cds/compiler/gcc/compiler_macro.h @@ -122,6 +122,11 @@ # else # define CDS_BUILD_BITS 32 # endif +#elif defined(__riscv) && __riscv_xlen == 64 +# define CDS_PROCESSOR_ARCH CDS_PROCESSOR_RISCV64 +# define CDS_BUILD_BITS 64 +# define CDS_PROCESSOR__NAME "RISC-V64" +# define CDS_PROCESSOR__NICK "riscv64" #else # if defined(CDS_USE_LIBCDS_ATOMIC) # error "Libcds does not support atomic implementation for the processor architecture. Try to use C++11-compatible compiler and remove CDS_USE_LIBCDS_ATOMIC flag from compiler command line" diff --git a/cds/details/defs.h b/cds/details/defs.h index 54095e5c2..f3fe86454 100644 --- a/cds/details/defs.h +++ b/cds/details/defs.h @@ -278,6 +278,7 @@ namespace cds {} #define CDS_PROCESSOR_PPC64 5 // PowerPC 64bit #define CDS_PROCESSOR_ARM7 7 #define CDS_PROCESSOR_ARM8 8 +#define CDS_PROCESSOR_RISCV64 9 #define CDS_PROCESSOR_UNKNOWN -1 // Supported OS interfaces