diff --git a/src/frontend/A32/ir_emitter.cpp b/src/frontend/A32/ir_emitter.cpp index 481e2dbe..24566532 100644 --- a/src/frontend/A32/ir_emitter.cpp +++ b/src/frontend/A32/ir_emitter.cpp @@ -12,13 +12,13 @@ namespace Dynarmic::A32 { using Opcode = IR::Opcode; -u32 IREmitter::PC() { - u32 offset = current_location.TFlag() ? 4 : 8; +u32 IREmitter::PC() const { + const u32 offset = current_location.TFlag() ? 4 : 8; return current_location.PC() + offset; } -u32 IREmitter::AlignPC(size_t alignment) { - u32 pc = PC(); +u32 IREmitter::AlignPC(size_t alignment) const { + const u32 pc = PC(); return static_cast(pc - pc % alignment); } diff --git a/src/frontend/A32/ir_emitter.h b/src/frontend/A32/ir_emitter.h index e9ccc248..ef9d958f 100644 --- a/src/frontend/A32/ir_emitter.h +++ b/src/frontend/A32/ir_emitter.h @@ -31,8 +31,8 @@ public: LocationDescriptor current_location; - u32 PC(); - u32 AlignPC(size_t alignment); + u32 PC() const; + u32 AlignPC(size_t alignment) const; IR::U32 GetRegister(Reg source_reg); IR::U32U64 GetExtendedRegister(ExtReg source_reg);