From 42860a579cbb7dfd9bf56236b9a221c2c43c42ea Mon Sep 17 00:00:00 2001 From: Ced2911 Date: Thu, 15 Aug 2013 14:18:23 +0200 Subject: [PATCH] sub --- Common/ppcEmitter.cpp | 6 +++++- Common/ppcEmitter.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/ppcEmitter.cpp b/Common/ppcEmitter.cpp index 82f280b935..3b749b0eb4 100644 --- a/Common/ppcEmitter.cpp +++ b/Common/ppcEmitter.cpp @@ -358,7 +358,11 @@ namespace PpcGen { u32 instr = (0x7C000378 | (Ra << 21) | (Rd << 16) | (Rb << 11)); Write32(instr); } - + + void PPCXEmitter::XOR(PPCReg Rd, PPCReg Ra, PPCReg Rb) { + u32 instr = (0x7C000278 | (Ra << 21) | (Rd << 16) | (Rb << 11)); + Write32(instr); + } void PPCXEmitter::SUBF(PPCReg Rd, PPCReg Ra, PPCReg Rb, int RCFlags) { u32 instr = (0x7C000050 | (Rd << 21) | (Ra << 16) | (Rb << 11) | (RCFlags & 1)); diff --git a/Common/ppcEmitter.h b/Common/ppcEmitter.h index ff0a83d0e3..8d6fa3876c 100644 --- a/Common/ppcEmitter.h +++ b/Common/ppcEmitter.h @@ -226,6 +226,9 @@ public: void ADDI (PPCReg Rd, PPCReg Ra, short imm); void ADDIS (PPCReg Rd, PPCReg Ra, short imm); void ADDC (PPCReg Rd, PPCReg Ra, PPCReg Rb); + void SUB (PPCReg Rd, PPCReg Ra, PPCReg Rb) { + SUBF(Rd, Ra, Rb); + } void SUBF (PPCReg Rd, PPCReg Ra, PPCReg Rb, int RCFlags = 0); void SUBFC (PPCReg Rd, PPCReg Ra, PPCReg Rb);