From 94d6c51363d9e64b50f984d5ee1092aff30c9cf8 Mon Sep 17 00:00:00 2001 From: dimeko <73129503+dimeko@users.noreply.github.com> Date: Mon, 17 Feb 2025 14:03:09 +0200 Subject: [PATCH] chore: adds check for riscv64 and riscv32 archs (#2993) --- libafl_qemu/runtime/libafl_qemu_arch.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libafl_qemu/runtime/libafl_qemu_arch.h b/libafl_qemu/runtime/libafl_qemu_arch.h index 74bebc20ba..4bfba468bc 100644 --- a/libafl_qemu/runtime/libafl_qemu_arch.h +++ b/libafl_qemu/runtime/libafl_qemu_arch.h @@ -30,12 +30,12 @@ // Linux kernel #include - #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