mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
DSP: Fix gdsp_ifx_write to take a u16 value
And change the JIT to clear the upper 16 bits when calling the write function to work around bugs in some compilers like clang.
This commit is contained in:
parent
7c01127ac6
commit
017bfcda2b
@ -98,7 +98,7 @@ u16 gdsp_mbox_read_l(Mailbox mbx)
|
||||
return (u16)value;
|
||||
}
|
||||
|
||||
void gdsp_ifx_write(u32 addr, u32 val)
|
||||
void gdsp_ifx_write(u32 addr, u16 val)
|
||||
{
|
||||
g_dsp_cap->LogIFXWrite(addr, val);
|
||||
|
||||
|
@ -22,6 +22,6 @@ u16 gdsp_mbox_read_h(Mailbox mbx);
|
||||
u16 gdsp_mbox_read_l(Mailbox mbx);
|
||||
|
||||
void gdsp_ifx_init();
|
||||
void gdsp_ifx_write(u32 addr, u32 val);
|
||||
void gdsp_ifx_write(u32 addr, u16 val);
|
||||
u16 gdsp_ifx_read(u16 addr);
|
||||
} // namespace DSP
|
||||
|
@ -530,9 +530,9 @@ void DSPEmitter::dmem_write(X64Reg value)
|
||||
FixupBranch end = J(true);
|
||||
// else if (saddr == 0xf)
|
||||
SetJumpTarget(ifx);
|
||||
// Does it mean gdsp_ifx_write needs u32 rather than u16?
|
||||
DSPJitRegCache c(m_gpr);
|
||||
X64Reg abisafereg = m_gpr.MakeABICallSafe(value);
|
||||
MOVZX(32, 16, abisafereg, R(abisafereg));
|
||||
m_gpr.PushRegs();
|
||||
ABI_CallFunctionRR(gdsp_ifx_write, EAX, abisafereg);
|
||||
m_gpr.PopRegs();
|
||||
|
Loading…
Reference in New Issue
Block a user