summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subv2017-08-19 11:30:20 -0500
committerGravatar Subv2017-08-21 08:34:23 -0500
commit9d0841b48b6b6f3c5a2425922617343fc2f79cdc (patch)
tree396f1f14d1af656f2863bf1b8c8020fff7821e37
parentDyncom: Fixed a conversion warning when decoding thumb instructions. (diff)
downloadyuzu-9d0841b48b6b6f3c5a2425922617343fc2f79cdc.tar.gz
yuzu-9d0841b48b6b6f3c5a2425922617343fc2f79cdc.tar.xz
yuzu-9d0841b48b6b6f3c5a2425922617343fc2f79cdc.zip
Dyncom: Use size_t instead of int to store the instruction offsets in the instruction cache.
Fixes a few warnings.
Diffstat (limited to '')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp6
-rw-r--r--src/core/arm/skyeye_common/armstate.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index f829b9229..3522d1e82 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -838,7 +838,7 @@ static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, cons
838 return inst_size; 838 return inst_size;
839} 839}
840 840
841static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr) { 841static int InterpreterTranslateBlock(ARMul_State* cpu, std::size_t& bb_start, u32 addr) {
842 MICROPROFILE_SCOPE(DynCom_Decode); 842 MICROPROFILE_SCOPE(DynCom_Decode);
843 843
844 // Decode instruction, get index 844 // Decode instruction, get index
@@ -871,7 +871,7 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr)
871 return KEEP_GOING; 871 return KEEP_GOING;
872} 872}
873 873
874static int InterpreterTranslateSingle(ARMul_State* cpu, int& bb_start, u32 addr) { 874static int InterpreterTranslateSingle(ARMul_State* cpu, std::size_t& bb_start, u32 addr) {
875 MICROPROFILE_SCOPE(DynCom_Decode); 875 MICROPROFILE_SCOPE(DynCom_Decode);
876 876
877 ARM_INST_PTR inst_base = nullptr; 877 ARM_INST_PTR inst_base = nullptr;
@@ -1620,7 +1620,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
1620 unsigned int addr; 1620 unsigned int addr;
1621 unsigned int num_instrs = 0; 1621 unsigned int num_instrs = 0;
1622 1622
1623 int ptr; 1623 std::size_t ptr;
1624 1624
1625 LOAD_NZCVT; 1625 LOAD_NZCVT;
1626DISPATCH : { 1626DISPATCH : {
diff --git a/src/core/arm/skyeye_common/armstate.h b/src/core/arm/skyeye_common/armstate.h
index 1a707ff7e..893877797 100644
--- a/src/core/arm/skyeye_common/armstate.h
+++ b/src/core/arm/skyeye_common/armstate.h
@@ -230,7 +230,7 @@ public:
230 230
231 // TODO(bunnei): Move this cache to a better place - it should be per codeset (likely per 231 // TODO(bunnei): Move this cache to a better place - it should be per codeset (likely per
232 // process for our purposes), not per ARMul_State (which tracks CPU core state). 232 // process for our purposes), not per ARMul_State (which tracks CPU core state).
233 std::unordered_map<u32, int> instruction_cache; 233 std::unordered_map<u32, std::size_t> instruction_cache;
234 234
235private: 235private:
236 void ResetMPCoreCP15Registers(); 236 void ResetMPCoreCP15Registers();