mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-07-22 04:47:13 +00:00
add vpkuhus implementation
This commit is contained in:
@@ -2283,6 +2283,16 @@ bool Recompiler::Recompile(
|
||||
println("\t_mm_store_si128((__m128i*){}.u8, _mm_packus_epi32(_mm_load_si128((__m128i*){}.s32), _mm_load_si128((__m128i*){}.s32)));", v(insn.operands[0]), v(insn.operands[2]), v(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VPKUHUS:
|
||||
case PPC_INST_VPKUHUS128:
|
||||
for (size_t i = 0; i < 8; i++)
|
||||
{
|
||||
println("\t{0}.u8[{1}] = {2}.u16[{1}] > UCHAR_MAX ? UCHAR_MAX : {2}.u16[{1}];", vTemp(), i, v(insn.operands[2]));
|
||||
println("\t{0}.u8[{1}] = {2}.u16[{3}] > UCHAR_MAX ? UCHAR_MAX : {2}.u16[{3}];", vTemp(), i + 8, v(insn.operands[1]), i);
|
||||
}
|
||||
println("{} = {};", v(insn.operands[0]), vTemp());
|
||||
break;
|
||||
|
||||
case PPC_INST_VREFP:
|
||||
case PPC_INST_VREFP128:
|
||||
// TODO: see if we can use rcp safely
|
||||
|
Reference in New Issue
Block a user