[Request for instruction] BSO/BNS: Branch if (not) Summary Overflow
These branch instructions seems to be fairly common in other titles.
Might also be worth considering a instruction implementation tracking issue for anything else that comes up, but that's up to someone else.
I noticed there's uint8_t so (summary overflow) in PPCCRRegister, not sure if that's already implemented or not. If so then we can implement bso/bns by
case PPC_INST_BSO:
printConditionalBranch(false, "so");
break;
case PPC_INST_BSOLR:
println("\tif ({}.so) return;", cr(insn.operands[0]));
break;
case PPC_INST_BNS:
printConditionalBranch(true, "so");
break;
case PPC_INST_BNSLR:
println("\tif (!{}.so) return;", cr(insn.operands[0]));
break;
Also here's my attempt on lhbrx for tgm ace
case PPC_INST_LHBRX:
print("\t{}.u64 = __builtin_bswap16(PPC_LOAD_U16(", r(insn.operands[0]));
if (insn.operands[1] != 0)
print("{}.u32 + ", r(insn.operands[1]));
println("{}.u32));", r(insn.operands[2]));
break;
Edit: Fixed PPC_INST_LHBRX
Don't forget to use this file: https://github.com/gaiden-dev/XenonRecomp/blob/main/XenonRecomp/recompiler.cpp. Also comment #icnlude simde_wrapper.h and /* */ commit one function which use it(you can work without it) and if it need add #include