MCPcopy Create free account
hub / github.com/dolphin-emu/dolphin / l

Function l

Source/Core/Core/DSP/DSPIntExtOps.cpp:141–159  ·  view source on GitHub ↗

L $axD.D, @$arS xxxx xxxx 01dd d0ss Load $axD.D/$acD.D with value from memory pointed by register $arS. Post increment register $arS.

Source from the content-addressed store, hash-verified

139// Load $axD.D/$acD.D with value from memory pointed by register $arS.
140// Post increment register $arS.
141void l(const UDSPInstruction opc)
142{
143 u8 sreg = opc & 0x3;
144 u8 dreg = ((opc >> 3) & 0x7) + DSP_REG_AXL0;
145
146 if ((dreg >= DSP_REG_ACM0) && (g_dsp.r.sr & SR_40_MODE_BIT))
147 {
148 u16 val = dsp_dmem_read(g_dsp.r.ar[sreg]);
149 writeToBackLog(0, dreg - DSP_REG_ACM0 + DSP_REG_ACH0, (val & 0x8000) ? 0xFFFF : 0x0000);
150 writeToBackLog(1, dreg, val);
151 writeToBackLog(2, dreg - DSP_REG_ACM0 + DSP_REG_ACL0, 0);
152 writeToBackLog(3, sreg, dsp_increment_addr_reg(sreg));
153 }
154 else
155 {
156 writeToBackLog(0, dreg, dsp_dmem_read(g_dsp.r.ar[sreg]));
157 writeToBackLog(1, sreg, dsp_increment_addr_reg(sreg));
158 }
159}
160
161// LN $axD.D, @$arS
162// xxxx xxxx 01dd d0ss

Callers

nothing calls this directly

Calls 3

dsp_dmem_readFunction · 0.85
writeToBackLogFunction · 0.85
dsp_increment_addr_regFunction · 0.85

Tested by

no test coverage detected