static bool xorGeneric(PPCEmuAssembler& a, Instruction instr) { a.mov(a.eax, a.ppcgpr[instr.rS]); if (flags & XorImmediate) { a.mov(a.ecx, instr.uimm); } else { a.mov(a.ecx, a.ppcgpr[instr.rB]); } if (flags & XorShifted) { a.shl(a.ecx, 16); } a.xor_(a.eax, a.ecx); a.mov(a.ppcgpr[instr.rA], a.eax); if (flags & XorCheckRecord) { if (instr.rc) { updateConditionRegister(a, a.eax, a.ecx, a.edx); } } return true; }
// Condition Register XOR static bool crxor(PPCEmuAssembler& a, Instruction instr) { getTwoCRB(a, instr.crbA, a.eax, instr.crbB, a.ecx); a.xor_(a.eax, a.ecx); setCRB(a, instr.crbD, a.eax, a.ecx, a.edx); return true; }
// Equivalent static bool eqv(PPCEmuAssembler& a, Instruction instr) { a.mov(a.eax, a.ppcgpr[instr.rS]); a.mov(a.ecx, a.ppcgpr[instr.rB]); a.xor_(a.eax, a.ecx); a.not_(a.eax); a.mov(a.ppcgpr[instr.rA], a.eax); if (instr.rc) { updateConditionRegister(a, a.eax, a.ecx, a.edx); } return true; }