mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-09-14 07:16:36 +00:00
add remaining altivec instructions
This commit is contained in:
@@ -1881,6 +1881,16 @@ bool Recompiler::Recompile(
|
||||
println("_mm_load_ps({}.f32)));", v(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VCTUXS:
|
||||
case PPC_INST_VCFPUXWS128:
|
||||
printSetFlushMode(true);
|
||||
print("\t_mm_store_si128((__m128i*){}.u32, _mm_vctuxs(", v(insn.operands[0]));
|
||||
if (insn.operands[2] != 0)
|
||||
println("_mm_mul_ps(_mm_load_ps({}.f32), _mm_set1_ps({}))));", v(insn.operands[1]), 1u << insn.operands[2]);
|
||||
else
|
||||
println("_mm_load_ps({}.f32)));", v(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VCFSX:
|
||||
case PPC_INST_VCSXWFP128:
|
||||
{
|
||||
@@ -2198,6 +2208,14 @@ bool Recompiler::Recompile(
|
||||
break;
|
||||
}
|
||||
|
||||
case PPC_INST_VRLH:
|
||||
for (size_t i = 0; i < 8; i++)
|
||||
{
|
||||
println("\t{0}.u16[{1}] = ({2}.u16[{1}] << ({3}.u16[{1}] & 0xF)) | ({2}.u16[{1}] >> (16 - ({3}.u16[{1}] & 0xF)));", vTemp(), i, v(insn.operands[1]), v(insn.operands[2]));
|
||||
}
|
||||
println("{} = {};", v(insn.operands[0]), vTemp());
|
||||
break;
|
||||
|
||||
case PPC_INST_VRSQRTEFP:
|
||||
case PPC_INST_VRSQRTEFP128:
|
||||
// TODO: see if we can use rsqrt safely
|
||||
@@ -2752,7 +2770,7 @@ void Recompiler::SaveCurrentOutData(const std::string_view& name)
|
||||
bool shouldWrite = true;
|
||||
|
||||
// Check if an identical file already exists first to not trigger recompilation
|
||||
std::string filePath = std::format("{}{}/{}", config.directoryPath, config.outDirectoryPath, name.empty() ? cppName : name);
|
||||
std::string filePath = std::format("{}/{}/{}", config.directoryPath, config.outDirectoryPath, name.empty() ? cppName : name);
|
||||
FILE* f = fopen(filePath.c_str(), "rb");
|
||||
if (f)
|
||||
{
|
||||
|
Reference in New Issue
Block a user