mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-12 09:48:30 +12:00
PPCRec: Unify BCCTR and BCLR code
Instead of having fixed macros for BCCTR/BCCTRL/BCLR/BCLRL we now have only one single macro instruction that takes the jump destination as a register parameter. This also allows us to reuse an already loaded LR register (by something like MTLR) instead of loading it again from memory. As a necessary requirement for this: The register allocator now has support for read operations in suffix instructions
This commit is contained in:
parent
f2a07ade4c
commit
bb6b18d78f
6 changed files with 95 additions and 271 deletions
|
@ -1033,8 +1033,8 @@ void PPCRecRA_calculateSegmentMinMaxRanges(ppcImlGenContext_t* ppcImlGenContext,
|
|||
while (index < imlSegment->imlList.size())
|
||||
{
|
||||
// end loop at suffix instruction
|
||||
if (imlSegment->imlList[index].IsSuffixInstruction())
|
||||
break;
|
||||
//if (imlSegment->imlList[index].IsSuffixInstruction())
|
||||
// break;
|
||||
// get accessed GPRs
|
||||
imlSegment->imlList[index].CheckRegisterUsage(&gprTracking);
|
||||
for (sint32 t = 0; t < 4; t++)
|
||||
|
@ -1125,9 +1125,10 @@ void PPCRecRA_createSegmentLivenessRanges(ppcImlGenContext_t* ppcImlGenContext,
|
|||
IMLUsedRegisters gprTracking;
|
||||
while (index < imlSegment->imlList.size())
|
||||
{
|
||||
// end loop at suffix instruction
|
||||
if (imlSegment->imlList[index].IsSuffixInstruction())
|
||||
break;
|
||||
// we parse suffix instructions too for any potential input registers (writes not allowed), but note that any spills/stores need to happen before the suffix instruction
|
||||
//// end loop at suffix instruction
|
||||
//if (imlSegment->imlList[index].IsSuffixInstruction())
|
||||
// break;
|
||||
// get accessed GPRs
|
||||
imlSegment->imlList[index].CheckRegisterUsage(&gprTracking);
|
||||
// handle accessed GPR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue