diff --git a/Common/ppcEmitter.cpp b/Common/ppcEmitter.cpp index c910387ff..4e742b1bb 100644 --- a/Common/ppcEmitter.cpp +++ b/Common/ppcEmitter.cpp @@ -345,6 +345,12 @@ namespace PpcGen { void PPCXEmitter::CMPL(PPCReg a, PPCReg b) { Write32((31 << 26) | (a << 16) | (b << 11) | (1<<6)); } + void PPCXEmitter::MFCR (PPCReg dest) { + Write32(0x7C000026 | (dest << 21)); + } + void PPCXEmitter::MTCR (PPCReg dest) { + Write32(0x7C000120 | (dest << 21) | (0xff<<12)); + } // Others operation void PPCXEmitter::ORI(PPCReg src, PPCReg dest, unsigned short imm) { diff --git a/Common/ppcEmitter.h b/Common/ppcEmitter.h index a69664c84..d68bce65c 100644 --- a/Common/ppcEmitter.h +++ b/Common/ppcEmitter.h @@ -286,6 +286,8 @@ namespace PpcGen void CMPI (PPCReg dest, unsigned short imm); void CMPL (PPCReg a, PPCReg b); void CMP (PPCReg a, PPCReg b); + void MFCR (PPCReg dest); + void MTCR (PPCReg dest); void Prologue(); void Epilogue();