diff --git a/src/xenia/cpu/ppc/ppc_emit_altivec.cc b/src/xenia/cpu/ppc/ppc_emit_altivec.cc index 3ca5bc40f..b8257c1bc 100644 --- a/src/xenia/cpu/ppc/ppc_emit_altivec.cc +++ b/src/xenia/cpu/ppc/ppc_emit_altivec.cc @@ -358,8 +358,13 @@ int InstrEmit_mtvscr(PPCHIRBuilder& f, const InstrData& i) { } int InstrEmit_vaddcuw(PPCHIRBuilder& f, const InstrData& i) { - XEINSTRNOTIMPLEMENTED(); - return 1; + Value* sum = f.VectorAdd(f.LoadVR(i.VX.VA), f.LoadVR(i.VX.VB), INT32_TYPE, + ARITHMETIC_UNSIGNED); + Value* overflow = f.VectorCompareUGT(f.LoadVR(i.VX.VA), sum, INT32_TYPE); + Value* carry = + f.VectorShr(overflow, f.LoadConstantVec128(vec128i(31)), INT32_TYPE); + f.StoreVR(i.VX.VD, carry); + return 0; } int InstrEmit_vaddfp_(PPCHIRBuilder& f, uint32_t vd, uint32_t va, uint32_t vb) {