Skip to content

Commit 3dcf708

Browse files
committed
fix vaddsws implementation
1 parent 7a3db68 commit 3dcf708

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PowerRecomp/recompiler.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,12 @@ bool Recompiler::Recompile(
18231823
break;
18241824

18251825
case PPC_INST_VADDSWS:
1826-
println("\t_mm_store_si128((__m128i*){}.s32, _mm_adds_epi32(_mm_load_si128((__m128i*){}.s32), _mm_load_si128((__m128i*){}.s32)));", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
1826+
// TODO: vectorize
1827+
for (size_t i = 0; i < 4; i++)
1828+
{
1829+
println("\t{}.s64 = int64_t({}.s32[{}]) + int64_t({}.s32[{}]);", temp(), v(insn.operands[1]), i, v(insn.operands[2]), i);
1830+
println("\t{}.s32[{}] = {}.s64 > INT_MAX ? INT_MAX : {}.s64 < INT_MIN ? INT_MIN : {}.s64;", v(insn.operands[0]), i, temp(), temp(), temp());
1831+
}
18271832
break;
18281833

18291834
case PPC_INST_VADDUBM:

0 commit comments

Comments
 (0)