chore: adds check for riscv64 and riscv32 archs (#2993)

This commit is contained in:
dimeko 2025-02-17 14:03:09 +02:00 committed by GitHub
parent 9a2a42ccca
commit 94d6c51363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,12 +30,12 @@
// Linux kernel
#include <asm-generic/int-ll64.h>
#if defined(__x86_64__) || defined(__aarch64__)
#if defined(__x86_64__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
typedef __u64 libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif
#ifdef __arm__
#if defined(__arm__) || (defined(__riscv) && __riscv_xlen == 32)
typedef __u32 libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif
@ -47,12 +47,12 @@
#define noinline __attribute__((noinline))
#if defined(__x86_64__) || defined(__aarch64__)
#if defined(__x86_64__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
typedef uint64_t libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif
#ifdef __arm__
#if defined(__arm__) || (defined(__riscv) && __riscv_xlen == 32)
typedef uint32_t libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif
@ -66,12 +66,12 @@
#define noinline __attribute__((noinline))
#if defined(__x86_64__) || defined(__aarch64__)
#if defined(__x86_64__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
typedef uint64_t libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif
#ifdef __arm__
#if defined(__arm__) || (defined(__riscv) && __riscv_xlen == 32)
typedef uint32_t libafl_word;
#define LIBAFL_CALLING_CONVENTION __attribute__(())
#endif