Skip to content

Commit 830be1f

Browse files
committed
fix vaddsws implementation
1 parent a5d6382 commit 830be1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

XenonRecomp/recompiler.cpp

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

19301930
case PPC_INST_VADDSWS:
1931-
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]));
1931+
// TODO: vectorize
1932+
for (size_t i = 0; i < 4; i++)
1933+
{
1934+
println("\t{}.s64 = int64_t({}.s32[{}]) + int64_t({}.s32[{}]);", temp(), v(insn.operands[1]), i, v(insn.operands[2]), i);
1935+
println("\t{}.s32[{}] = {}.s64 > INT_MAX ? INT_MAX : {}.s64 < INT_MIN ? INT_MIN : {}.s64;", v(insn.operands[0]), i, temp(), temp(), temp());
1936+
}
19321937
break;
19331938

19341939
case PPC_INST_VADDUBM:

0 commit comments

Comments
 (0)