[PPC] Implement `vsubcuw`

Other half of #2125. I don't know of any title that utilizes this instruction, but I went ahead and implemented it for completeness.

Verified the implementation with `instr__gen_vsubcuw` from #1348. Can be grabbed with:
```
git checkout origin/gen_tests -- src\xenia\cpu\ppc\testing\*vsubcuw.s
```
This commit is contained in:
Wunkolo 2023-04-17 10:33:37 -07:00 committed by Rick Gibbed
parent 93b77fb775
commit 121bf93cbe
1 changed files with 5 additions and 1 deletions

View File

@ -1662,7 +1662,11 @@ int InstrEmit_vsrw128(PPCHIRBuilder& f, const InstrData& i) {
}
int InstrEmit_vsubcuw(PPCHIRBuilder& f, const InstrData& i) {
XEINSTRNOTIMPLEMENTED();
Value* underflow =
f.VectorCompareUGE(f.LoadVR(i.VX.VA), f.LoadVR(i.VX.VB), INT32_TYPE);
Value* borrow =
f.VectorShr(underflow, f.LoadConstantVec128(vec128i(31)), INT32_TYPE);
f.StoreVR(i.VX.VD, borrow);
return 1;
}