diff --git a/src/arch/riscv/reg_abi.hh b/src/arch/riscv/reg_abi.hh index 6f1c8cbc6c..0869e0f4a6 100644 --- a/src/arch/riscv/reg_abi.hh +++ b/src/arch/riscv/reg_abi.hh @@ -77,22 +77,20 @@ struct Argument -struct Argument && - std::is_same::value && - ABI::template IsWideV>> +// This method will be used for RV32 pointers. +template <> +struct Argument { - static Arg + using ABI = RiscvISA::RegABI32; + + static GuestAddr get(ThreadContext *tc, typename ABI::State &state) { panic_if(state >= ABI::ArgumentRegs.size(), "Ran out of syscall argument registers."); auto arg = bits(tc->getReg(ABI::ArgumentRegs[state++]), 31, 0); - return *reinterpret_cast(&arg); + return *reinterpret_cast(&arg); } };