PPCRec: Use agnostic breakpoints

This commit is contained in:
Exzap 2023-01-30 06:30:29 +01:00
parent acfc27f9fc
commit 86b82be8ef
5 changed files with 6 additions and 67 deletions

View file

@ -642,7 +642,7 @@ bool PPCRecompilerX64Gen_imlInstruction_r_s32(PPCRecFunction_t* PPCRecFunction,
} }
else if( imlInstruction->operation == PPCREC_IML_OP_MFCR ) else if( imlInstruction->operation == PPCREC_IML_OP_MFCR )
{ {
__debugbreak(); DEBUG_BREAK;
//uint32 destRegister = imlInstruction->op_r_immS32.registerIndex; //uint32 destRegister = imlInstruction->op_r_immS32.registerIndex;
//x64Gen_xor_reg64Low32_reg64Low32(x64GenContext, destRegister, destRegister); //x64Gen_xor_reg64Low32_reg64Low32(x64GenContext, destRegister, destRegister);
//for(sint32 f=0; f<32; f++) //for(sint32 f=0; f<32; f++)
@ -653,7 +653,7 @@ bool PPCRecompilerX64Gen_imlInstruction_r_s32(PPCRecFunction_t* PPCRecFunction,
} }
else if (imlInstruction->operation == PPCREC_IML_OP_MTCRF) else if (imlInstruction->operation == PPCREC_IML_OP_MTCRF)
{ {
__debugbreak(); DEBUG_BREAK;
//uint32 srcRegister = imlInstruction->op_r_immS32.registerIndex; //uint32 srcRegister = imlInstruction->op_r_immS32.registerIndex;
//uint32 crBitMask = ppc_MTCRFMaskToCRBitMask((uint32)imlInstruction->op_r_immS32.immS32); //uint32 crBitMask = ppc_MTCRFMaskToCRBitMask((uint32)imlInstruction->op_r_immS32.immS32);
//for (sint32 f = 0; f < 32; f++) //for (sint32 f = 0; f < 32; f++)
@ -896,7 +896,7 @@ bool PPCRecompilerX64Gen_imlInstruction_r_r_r(PPCRecFunction_t* PPCRecFunction,
//if (rRegResult == rRegOperand2) //if (rRegResult == rRegOperand2)
//{ //{
// if (rRegResult != rRegOperand1) // if (rRegResult != rRegOperand1)
// __debugbreak(); // cannot handle yet (we use rRegResult as a temporary reg, but its not possible if it is shared with op2) // DEBUG_BREAK; // cannot handle yet (we use rRegResult as a temporary reg, but its not possible if it is shared with op2)
//} //}
//if(rRegOperand1 != rRegResult) //if(rRegOperand1 != rRegResult)

View file

@ -12,7 +12,6 @@ struct PPCRecCRTracking_t
bool IMLAnalyzer_IsTightFiniteLoop(IMLSegment* imlSegment); bool IMLAnalyzer_IsTightFiniteLoop(IMLSegment* imlSegment);
bool IMLAnalyzer_CanTypeWriteCR(IMLInstruction* imlInstruction); bool IMLAnalyzer_CanTypeWriteCR(IMLInstruction* imlInstruction);
void IMLAnalyzer_GetCRTracking(IMLInstruction* imlInstruction, PPCRecCRTracking_t* crTracking);
// optimizer passes // optimizer passes
// todo - rename // todo - rename

View file

@ -89,63 +89,3 @@ bool IMLAnalyzer_CanTypeWriteCR(IMLInstruction* imlInstruction)
return false; return false;
} }
void IMLAnalyzer_GetCRTracking(IMLInstruction* imlInstruction, PPCRecCRTracking_t* crTracking)
{
__debugbreak();
//crTracking->readCRBits = 0;
//crTracking->writtenCRBits = 0;
//if (imlInstruction->type == PPCREC_IML_TYPE_CJUMP)
//{
// if (imlInstruction->op_conditionalJump.condition != PPCREC_JUMP_CONDITION_NONE)
// {
// uint32 crBitFlag = 1 << (imlInstruction->op_conditionalJump.crRegisterIndex * 4 + imlInstruction->op_conditionalJump.crBitIndex);
// crTracking->readCRBits = (crBitFlag);
// }
//}
//else if (imlInstruction->type == PPCREC_IML_TYPE_CONDITIONAL_R_S32)
//{
// uint32 crBitFlag = 1 << (imlInstruction->op_conditional_r_s32.crRegisterIndex * 4 + imlInstruction->op_conditional_r_s32.crBitIndex);
// crTracking->readCRBits = crBitFlag;
//}
//else if (imlInstruction->type == PPCREC_IML_TYPE_R_S32 && imlInstruction->operation == PPCREC_IML_OP_MFCR)
//{
// crTracking->readCRBits = 0xFFFFFFFF;
//}
//else if (imlInstruction->type == PPCREC_IML_TYPE_R_S32 && imlInstruction->operation == PPCREC_IML_OP_MTCRF)
//{
// crTracking->writtenCRBits |= ppc_MTCRFMaskToCRBitMask((uint32)imlInstruction->op_r_immS32.immS32);
//}
//else if (imlInstruction->type == PPCREC_IML_TYPE_CR)
//{
// if (imlInstruction->operation == PPCREC_IML_OP_CR_CLEAR ||
// imlInstruction->operation == PPCREC_IML_OP_CR_SET)
// {
// uint32 crBitFlag = 1 << (imlInstruction->op_cr.crD);
// crTracking->writtenCRBits = crBitFlag;
// }
// else if (imlInstruction->operation == PPCREC_IML_OP_CR_OR ||
// imlInstruction->operation == PPCREC_IML_OP_CR_ORC ||
// imlInstruction->operation == PPCREC_IML_OP_CR_AND ||
// imlInstruction->operation == PPCREC_IML_OP_CR_ANDC)
// {
// uint32 crBitFlag = 1 << (imlInstruction->op_cr.crD);
// crTracking->writtenCRBits = crBitFlag;
// crBitFlag = 1 << (imlInstruction->op_cr.crA);
// crTracking->readCRBits = crBitFlag;
// crBitFlag = 1 << (imlInstruction->op_cr.crB);
// crTracking->readCRBits |= crBitFlag;
// }
// else
// assert_dbg();
//}
//else if (IMLAnalyzer_CanTypeWriteCR(imlInstruction) && imlInstruction->crRegister >= 0 && imlInstruction->crRegister <= 7)
//{
// crTracking->writtenCRBits |= (0xF << (imlInstruction->crRegister * 4));
//}
//else if ((imlInstruction->type == PPCREC_IML_TYPE_STORE || imlInstruction->type == PPCREC_IML_TYPE_STORE_INDEXED) && imlInstruction->op_storeLoad.copyWidth == PPC_REC_STORE_STWCX_MARKER)
//{
// // overwrites CR0
// crTracking->writtenCRBits |= (0xF << 0);
//}
}

View file

@ -381,7 +381,7 @@ raLivenessSubrange_t* _GetSubrangeByInstructionIndexAndVirtualReg(IMLSegment* im
void IMLRA_IsolateRangeOnInstruction(ppcImlGenContext_t* ppcImlGenContext, IMLSegment* imlSegment, raLivenessSubrange_t* subrange, sint32 instructionIndex) void IMLRA_IsolateRangeOnInstruction(ppcImlGenContext_t* ppcImlGenContext, IMLSegment* imlSegment, raLivenessSubrange_t* subrange, sint32 instructionIndex)
{ {
__debugbreak(); DEBUG_BREAK;
} }
void IMLRA_HandleFixedRegisters(ppcImlGenContext_t* ppcImlGenContext, IMLSegment* imlSegment) void IMLRA_HandleFixedRegisters(ppcImlGenContext_t* ppcImlGenContext, IMLSegment* imlSegment)

View file

@ -3079,7 +3079,7 @@ bool PPCRecompiler_GenerateIML(ppcImlGenContext_t& ppcImlGenContext, PPCFunction
{ {
debug_printf("---------------- SegmentDump (Suffix instruction at wrong pos in segment 0x%x):\n", (int)segIndex); debug_printf("---------------- SegmentDump (Suffix instruction at wrong pos in segment 0x%x):\n", (int)segIndex);
IMLDebug_Dump(&ppcImlGenContext); IMLDebug_Dump(&ppcImlGenContext);
__debugbreak(); DEBUG_BREAK;
} }
} }
} }
@ -3089,7 +3089,7 @@ bool PPCRecompiler_GenerateIML(ppcImlGenContext_t& ppcImlGenContext, PPCFunction
{ {
debug_printf("---------------- SegmentDump (NoSuffixInstruction in segment 0x%x):\n", (int)segIndex); debug_printf("---------------- SegmentDump (NoSuffixInstruction in segment 0x%x):\n", (int)segIndex);
IMLDebug_Dump(&ppcImlGenContext); IMLDebug_Dump(&ppcImlGenContext);
__debugbreak(); DEBUG_BREAK;
} }
} }
if (seg->nextSegmentBranchNotTaken) if (seg->nextSegmentBranchNotTaken)