diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_dec.cpp | 2 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_dec.h | 2 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 14 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_dec.cpp b/src/core/arm/dyncom/arm_dyncom_dec.cpp index 64dcaae08..dcfcd6561 100644 --- a/src/core/arm/dyncom/arm_dyncom_dec.cpp +++ b/src/core/arm/dyncom/arm_dyncom_dec.cpp | |||
| @@ -415,7 +415,7 @@ const InstructionSetEncodingItem arm_exclusion_code[] = { | |||
| 415 | }; | 415 | }; |
| 416 | // clang-format on | 416 | // clang-format on |
| 417 | 417 | ||
| 418 | ARMDecodeStatus DecodeARMInstruction(u32 instr, s32* idx) { | 418 | ARMDecodeStatus DecodeARMInstruction(u32 instr, int* idx) { |
| 419 | int n = 0; | 419 | int n = 0; |
| 420 | int base = 0; | 420 | int base = 0; |
| 421 | int instr_slots = sizeof(arm_instruction) / sizeof(InstructionSetEncodingItem); | 421 | int instr_slots = sizeof(arm_instruction) / sizeof(InstructionSetEncodingItem); |
diff --git a/src/core/arm/dyncom/arm_dyncom_dec.h b/src/core/arm/dyncom/arm_dyncom_dec.h index 2fb7ac37c..1dcf7ecd1 100644 --- a/src/core/arm/dyncom/arm_dyncom_dec.h +++ b/src/core/arm/dyncom/arm_dyncom_dec.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | enum class ARMDecodeStatus { SUCCESS, FAILURE }; | 9 | enum class ARMDecodeStatus { SUCCESS, FAILURE }; |
| 10 | 10 | ||
| 11 | ARMDecodeStatus DecodeARMInstruction(u32 instr, s32* idx); | 11 | ARMDecodeStatus DecodeARMInstruction(u32 instr, int* idx); |
| 12 | 12 | ||
| 13 | struct InstructionSetEncodingItem { | 13 | struct InstructionSetEncodingItem { |
| 14 | const char* name; | 14 | const char* name; |
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 273bc8167..8073bb705 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #define CITRA_IGNORE_EXIT(x) | 5 | #define CITRA_IGNORE_EXIT(x) |
| 6 | 6 | ||
| 7 | #include <algorithm> | 7 | #include <algorithm> |
| 8 | #include <cinttypes> | ||
| 8 | #include <cstdio> | 9 | #include <cstdio> |
| 9 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 10 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| @@ -808,8 +809,8 @@ MICROPROFILE_DEFINE(DynCom_Decode, "DynCom", "Decode", MP_RGB(255, 64, 64)); | |||
| 808 | 809 | ||
| 809 | static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, const u32 phys_addr, | 810 | static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, const u32 phys_addr, |
| 810 | ARM_INST_PTR& inst_base) { | 811 | ARM_INST_PTR& inst_base) { |
| 811 | unsigned int inst_size = 4; | 812 | u32 inst_size = 4; |
| 812 | unsigned int inst = Memory::Read32(phys_addr & 0xFFFFFFFC); | 813 | u32 inst = Memory::Read32(phys_addr & 0xFFFFFFFC); |
| 813 | 814 | ||
| 814 | // If we are in Thumb mode, we'll translate one Thumb instruction to the corresponding ARM | 815 | // If we are in Thumb mode, we'll translate one Thumb instruction to the corresponding ARM |
| 815 | // instruction | 816 | // instruction |
| @@ -828,10 +829,11 @@ static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, cons | |||
| 828 | int idx; | 829 | int idx; |
| 829 | if (DecodeARMInstruction(inst, &idx) == ARMDecodeStatus::FAILURE) { | 830 | if (DecodeARMInstruction(inst, &idx) == ARMDecodeStatus::FAILURE) { |
| 830 | std::string disasm = ARM_Disasm::Disassemble(phys_addr, inst); | 831 | std::string disasm = ARM_Disasm::Disassemble(phys_addr, inst); |
| 831 | LOG_ERROR(Core_ARM11, "Decode failure.\tPC : [0x%x]\tInstruction : %s [%x]", phys_addr, | 832 | LOG_ERROR(Core_ARM11, |
| 832 | disasm.c_str(), inst); | 833 | "Decode failure.\tPC: [0x%08" PRIX32 "]\tInstruction: %s [%08" PRIX32 "]", |
| 833 | LOG_ERROR(Core_ARM11, "cpsr=0x%x, cpu->TFlag=%d, r15=0x%x", cpu->Cpsr, cpu->TFlag, | 834 | phys_addr, disasm.c_str(), inst); |
| 834 | cpu->Reg[15]); | 835 | LOG_ERROR(Core_ARM11, "cpsr=0x%" PRIX32 ", cpu->TFlag=%d, r15=0x%08" PRIX32, cpu->Cpsr, |
| 836 | cpu->TFlag, cpu->Reg[15]); | ||
| 835 | CITRA_IGNORE_EXIT(-1); | 837 | CITRA_IGNORE_EXIT(-1); |
| 836 | } | 838 | } |
| 837 | inst_base = arm_instruction_trans[idx](inst, idx); | 839 | inst_base = arm_instruction_trans[idx](inst, idx); |