diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 9 | ||||
| -rw-r--r-- | src/core/core.h | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/shader/decode/other.cpp | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index b0ee7821a..97d5c2a8a 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp | |||
| @@ -50,11 +50,14 @@ static void CodeHook(uc_engine* uc, uint64_t address, uint32_t size, void* user_ | |||
| 50 | 50 | ||
| 51 | static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int size, u64 value, | 51 | static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int size, u64 value, |
| 52 | void* user_data) { | 52 | void* user_data) { |
| 53 | auto* const system = static_cast<System*>(user_data); | ||
| 54 | |||
| 53 | ARM_Interface::ThreadContext ctx{}; | 55 | ARM_Interface::ThreadContext ctx{}; |
| 54 | Core::CurrentArmInterface().SaveContext(ctx); | 56 | system->CurrentArmInterface().SaveContext(ctx); |
| 55 | ASSERT_MSG(false, "Attempted to read from unmapped memory: 0x{:X}, pc=0x{:X}, lr=0x{:X}", addr, | 57 | ASSERT_MSG(false, "Attempted to read from unmapped memory: 0x{:X}, pc=0x{:X}, lr=0x{:X}", addr, |
| 56 | ctx.pc, ctx.cpu_registers[30]); | 58 | ctx.pc, ctx.cpu_registers[30]); |
| 57 | return {}; | 59 | |
| 60 | return false; | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | ARM_Unicorn::ARM_Unicorn(System& system) : system{system} { | 63 | ARM_Unicorn::ARM_Unicorn(System& system) : system{system} { |
| @@ -65,7 +68,7 @@ ARM_Unicorn::ARM_Unicorn(System& system) : system{system} { | |||
| 65 | 68 | ||
| 66 | uc_hook hook{}; | 69 | uc_hook hook{}; |
| 67 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_INTR, (void*)InterruptHook, this, 0, -1)); | 70 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_INTR, (void*)InterruptHook, this, 0, -1)); |
| 68 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_MEM_INVALID, (void*)UnmappedMemoryHook, this, 0, -1)); | 71 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_MEM_INVALID, (void*)UnmappedMemoryHook, &system, 0, -1)); |
| 69 | if (GDBStub::IsServerEnabled()) { | 72 | if (GDBStub::IsServerEnabled()) { |
| 70 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_CODE, (void*)CodeHook, this, 0, -1)); | 73 | CHECKED(uc_hook_add(uc, &hook, UC_HOOK_CODE, (void*)CodeHook, this, 0, -1)); |
| 71 | last_bkpt_hit = false; | 74 | last_bkpt_hit = false; |
diff --git a/src/core/core.h b/src/core/core.h index 11e73278e..8ebb385ac 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -327,10 +327,6 @@ private: | |||
| 327 | static System s_instance; | 327 | static System s_instance; |
| 328 | }; | 328 | }; |
| 329 | 329 | ||
| 330 | inline ARM_Interface& CurrentArmInterface() { | ||
| 331 | return System::GetInstance().CurrentArmInterface(); | ||
| 332 | } | ||
| 333 | |||
| 334 | inline Kernel::Process* CurrentProcess() { | 330 | inline Kernel::Process* CurrentProcess() { |
| 335 | return System::GetInstance().CurrentProcess(); | 331 | return System::GetInstance().CurrentProcess(); |
| 336 | } | 332 | } |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index a46eed3da..0687839ff 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1739,8 +1739,8 @@ static ResultCode SignalProcessWideKey(Core::System& system, VAddr condition_var | |||
| 1739 | // Wait for an address (via Address Arbiter) | 1739 | // Wait for an address (via Address Arbiter) |
| 1740 | static ResultCode WaitForAddress(Core::System& system, VAddr address, u32 type, s32 value, | 1740 | static ResultCode WaitForAddress(Core::System& system, VAddr address, u32 type, s32 value, |
| 1741 | s64 timeout) { | 1741 | s64 timeout) { |
| 1742 | LOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, timeout={}", | 1742 | LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, timeout={}", address, |
| 1743 | address, type, value, timeout); | 1743 | type, value, timeout); |
| 1744 | 1744 | ||
| 1745 | // If the passed address is a kernel virtual address, return invalid memory state. | 1745 | // If the passed address is a kernel virtual address, return invalid memory state. |
| 1746 | if (Memory::IsKernelVirtualAddress(address)) { | 1746 | if (Memory::IsKernelVirtualAddress(address)) { |
| @@ -1762,8 +1762,8 @@ static ResultCode WaitForAddress(Core::System& system, VAddr address, u32 type, | |||
| 1762 | // Signals to an address (via Address Arbiter) | 1762 | // Signals to an address (via Address Arbiter) |
| 1763 | static ResultCode SignalToAddress(Core::System& system, VAddr address, u32 type, s32 value, | 1763 | static ResultCode SignalToAddress(Core::System& system, VAddr address, u32 type, s32 value, |
| 1764 | s32 num_to_wake) { | 1764 | s32 num_to_wake) { |
| 1765 | LOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", | 1765 | LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", |
| 1766 | address, type, value, num_to_wake); | 1766 | address, type, value, num_to_wake); |
| 1767 | 1767 | ||
| 1768 | // If the passed address is a kernel virtual address, return invalid memory state. | 1768 | // If the passed address is a kernel virtual address, return invalid memory state. |
| 1769 | if (Memory::IsKernelVirtualAddress(address)) { | 1769 | if (Memory::IsKernelVirtualAddress(address)) { |
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp index 42e3de02f..c0f64d7a0 100644 --- a/src/video_core/shader/decode/other.cpp +++ b/src/video_core/shader/decode/other.cpp | |||
| @@ -102,7 +102,7 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 102 | PRECISE, op_a, Immediate(3)); | 102 | PRECISE, op_a, Immediate(3)); |
| 103 | const Node operand = | 103 | const Node operand = |
| 104 | Operation(OperationCode::IAdd, PRECISE, convert, Immediate(target)); | 104 | Operation(OperationCode::IAdd, PRECISE, convert, Immediate(target)); |
| 105 | branch = Operation(OperationCode::BranchIndirect, convert); | 105 | branch = Operation(OperationCode::BranchIndirect, operand); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 108 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; |