MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / LH

Function LH

pcsx2/R5900OpcodeImpl.cpp:552–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552void LH()
553{
554 u32 addr = cpuRegs.GPR.r[_Rs_].UL[0] + _Imm_;
555
556 if (addr & 1) [[unlikely]]
557 RaiseAddressError(addr, false);
558
559 s16 temp = memRead16(addr);
560
561 if (!_Rt_) return;
562 cpuRegs.GPR.r[_Rt_].SD[0] = temp;
563
564 // Force event test on EE counter read to improve read + interrupt syncing. Namely ESPN Games.
565 if ((addr & 0xFFFFE000) == 0x10000000)
566 {
567 intUpdateCPUCycles();
568 intEventTest();
569 }
570}
571
572void LHU()
573{

Callers

nothing calls this directly

Calls 3

RaiseAddressErrorFunction · 0.85
intUpdateCPUCyclesFunction · 0.85
intEventTestFunction · 0.85

Tested by

no test coverage detected