add MFCR and MTCR

This commit is contained in:
Ced2911 2013-08-19 09:47:53 +02:00
parent 23637db54c
commit dd83a922bd
2 changed files with 8 additions and 0 deletions

View File

@ -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) {

View File

@ -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();