From d03e7f08ff0f6ddbc98a92c01ad013128d9ba564 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 6 Dec 2015 15:03:06 -0500 Subject: dyncom: const correctness changes --- src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 2 +- src/core/arm/dyncom/arm_dyncom_run.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/arm/dyncom') diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 96c88c83a..2cff2a26a 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp @@ -51,7 +51,7 @@ enum { typedef unsigned int (*shtop_fp_t)(ARMul_State* cpu, unsigned int sht_oper); -static bool CondPassed(ARMul_State* cpu, unsigned int cond) { +static bool CondPassed(const ARMul_State* cpu, unsigned int cond) { const bool n_flag = cpu->NFlag != 0; const bool z_flag = cpu->ZFlag != 0; const bool c_flag = cpu->CFlag != 0; diff --git a/src/core/arm/dyncom/arm_dyncom_run.h b/src/core/arm/dyncom/arm_dyncom_run.h index 13bef17fc..85c8d798e 100644 --- a/src/core/arm/dyncom/arm_dyncom_run.h +++ b/src/core/arm/dyncom/arm_dyncom_run.h @@ -30,7 +30,7 @@ * @return If the PC is being read, then the word-aligned PC value is returned. * If the PC is not being read, then the value stored in the register is returned. */ -static inline u32 CHECK_READ_REG15_WA(ARMul_State* cpu, int Rn) { +static inline u32 CHECK_READ_REG15_WA(const ARMul_State* cpu, int Rn) { return (Rn == 15) ? ((cpu->Reg[15] & ~0x3) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; } @@ -43,6 +43,6 @@ static inline u32 CHECK_READ_REG15_WA(ARMul_State* cpu, int Rn) { * @return If the PC is being read, then the incremented PC value is returned. * If the PC is not being read, then the values stored in the register is returned. */ -static inline u32 CHECK_READ_REG15(ARMul_State* cpu, int Rn) { +static inline u32 CHECK_READ_REG15(const ARMul_State* cpu, int Rn) { return (Rn == 15) ? ((cpu->Reg[15] & ~0x1) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; } -- cgit v1.2.3