frontend/A32/ir_emitter: Mark PC() and AlignPC() as const-qualified member functions

These don't modify instance state, so they can be const-qualified member
functions.
This commit is contained in:
Lioncash 2019-02-05 20:18:25 -05:00 committed by MerryMage
parent 3a2dd09122
commit ee973f13c7
2 changed files with 6 additions and 6 deletions

View file

@ -12,13 +12,13 @@ namespace Dynarmic::A32 {
using Opcode = IR::Opcode; using Opcode = IR::Opcode;
u32 IREmitter::PC() { u32 IREmitter::PC() const {
u32 offset = current_location.TFlag() ? 4 : 8; const u32 offset = current_location.TFlag() ? 4 : 8;
return current_location.PC() + offset; return current_location.PC() + offset;
} }
u32 IREmitter::AlignPC(size_t alignment) { u32 IREmitter::AlignPC(size_t alignment) const {
u32 pc = PC(); const u32 pc = PC();
return static_cast<u32>(pc - pc % alignment); return static_cast<u32>(pc - pc % alignment);
} }

View file

@ -31,8 +31,8 @@ public:
LocationDescriptor current_location; LocationDescriptor current_location;
u32 PC(); u32 PC() const;
u32 AlignPC(size_t alignment); u32 AlignPC(size_t alignment) const;
IR::U32 GetRegister(Reg source_reg); IR::U32 GetRegister(Reg source_reg);
IR::U32U64 GetExtendedRegister(ExtReg source_reg); IR::U32U64 GetExtendedRegister(ExtReg source_reg);