Skip to content

Commit

Permalink
chore: adds check for riscv64 and riscv32 archs (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimeko authored Feb 17, 2025
1 parent 9a2a42c commit 94d6c51
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libafl_qemu/runtime/libafl_qemu_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 94d6c51

Please sign in to comment.