CPU: Don't leave fault_count uninitialized

This commit is contained in:
Stenzek 2023-03-16 18:58:43 +10:00
parent 51e4c4bfb0
commit 70695d3a4d
3 changed files with 5 additions and 0 deletions

View file

@ -1249,6 +1249,7 @@ void CodeGenerator::EmitLoadGuestMemoryFastmem(const CodeBlockInstruction& cbi,
bpi.address_host_reg = HostReg_Invalid;
bpi.value_host_reg = result.host_reg;
bpi.guest_pc = m_current_instruction->pc;
bpi.fault_count = 0;
Value fastmem_base = GetFastmemLoadBase();
@ -1405,6 +1406,7 @@ void CodeGenerator::EmitStoreGuestMemoryFastmem(const CodeBlockInstruction& cbi,
bpi.address_host_reg = HostReg_Invalid;
bpi.value_host_reg = value.host_reg;
bpi.guest_pc = m_current_instruction->pc;
bpi.fault_count = 0;
Value fastmem_base = GetFastmemStoreBase();
Value actual_value = GetValueInHostRegister(value);

View file

@ -1411,6 +1411,7 @@ void CodeGenerator::EmitLoadGuestMemoryFastmem(const CodeBlockInstruction& cbi,
bpi.address_host_reg = HostReg_Invalid;
bpi.value_host_reg = result.host_reg;
bpi.guest_pc = m_current_instruction->pc;
bpi.fault_count = 0;
HostReg address_reg;
if (address.IsConstant())
@ -1586,6 +1587,7 @@ void CodeGenerator::EmitStoreGuestMemoryFastmem(const CodeBlockInstruction& cbi,
bpi.address_host_reg = HostReg_Invalid;
bpi.value_host_reg = value.host_reg;
bpi.guest_pc = m_current_instruction->pc;
bpi.fault_count = 0;
HostReg address_reg;
if (address.IsConstant())

View file

@ -1875,6 +1875,7 @@ void CodeGenerator::EmitLoadGuestMemoryFastmem(const CodeBlockInstruction& cbi,
bpi.address_host_reg = HostReg_Invalid;
bpi.value_host_reg = result.host_reg;
bpi.guest_pc = m_current_instruction->pc;
bpi.fault_count = 0;
if (g_settings.cpu_fastmem_mode == CPUFastmemMode::MMap)
{