From 6001fd902f2bf85bf7b32fb168ce8c9eecdb653a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A0rius=20Mont=C3=B3n?= Date: Fri, 30 Sep 2022 15:42:16 +0200 Subject: [PATCH] add const to some functions --- inc/BASE_ISA.h | 2 +- inc/C_extension.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/BASE_ISA.h b/inc/BASE_ISA.h index b697cbf..e595628 100644 --- a/inc/BASE_ISA.h +++ b/inc/BASE_ISA.h @@ -1787,7 +1787,7 @@ namespace riscv_tlm { * @brief Decodes opcode of instruction * @return opcode of instruction */ - opCodes decode() { + opCodes decode() const { switch (opcode()) { case LUI: return OP_LUI; diff --git a/inc/C_extension.h b/inc/C_extension.h index 331e7d0..90e6ada 100644 --- a/inc/C_extension.h +++ b/inc/C_extension.h @@ -182,7 +182,7 @@ namespace riscv_tlm { return aux; } - inline void set_imm_I(std::uint32_t value) { + inline void set_imm_I(std::uint32_t value) const { this->m_instr.range(31, 20) = value; }