mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 18:31:03 +00:00
add vpkuhus implementation
This commit is contained in:
parent
c8ecd79c99
commit
a382cd5653
@ -2156,6 +2156,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]));
|
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;
|
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_VREFP:
|
||||||
case PPC_INST_VREFP128:
|
case PPC_INST_VREFP128:
|
||||||
// TODO: see if we can use rcp safely
|
// TODO: see if we can use rcp safely
|
||||||
|
Loading…
x
Reference in New Issue
Block a user