mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 18:31:03 +00:00
added instructions for potf
This commit is contained in:
parent
1c571c8576
commit
35840c8dc6
@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 3.8)
|
||||
|
||||
project("XenonRecomp")
|
||||
|
||||
# Find required packages
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(tomlplusplus REQUIRED)
|
||||
find_package(xxHash REQUIRED)
|
||||
|
||||
add_executable(XenonRecomp
|
||||
"main.cpp"
|
||||
"recompiler.cpp"
|
||||
|
@ -2240,6 +2240,75 @@ bool Recompiler::Recompile(
|
||||
println("\t{}.u64 = {}.u64 ^ {};", r(insn.operands[0]), r(insn.operands[1]), insn.operands[2] << 16);
|
||||
break;
|
||||
|
||||
case PPC_INST_MULHD:
|
||||
println("\t{}.u64 = ({}.u64 * {}.u64) >> 64;", r(insn.operands[0]), r(insn.operands[1]), r(insn.operands[2]));
|
||||
if (strchr(insn.opcode->name, '.'))
|
||||
println("\t{}.compare<int64_t>({}.s64, 0);", cr(0), r(insn.operands[0]));
|
||||
break;
|
||||
|
||||
case PPC_INST_FRSQRTE:
|
||||
println("\t{}.f64 = 1.0 / sqrt({}.f64);", f(insn.operands[0]), f(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_DCBST:
|
||||
println("\t// Data Cache Block Store - system instruction, no operation in emulator");
|
||||
break;
|
||||
|
||||
case PPC_INST_VCFPUXWS128:
|
||||
println("\t{}.v4sf = vec_convert_to_float({}.v4si);", v(insn.operands[0]), v(insn.operands[1]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VPKUWUS128:
|
||||
println("\t{}.v8hi = vec_pack_unsigned({}.v4si, {}.v4si);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VPKUHUS128:
|
||||
println("\t{}.v16qi = vec_pack_unsigned({}.v8hi, {}.v8hi);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_EQV:
|
||||
println("\t{}.u64 = ~({}.u64 ^ {}.u64);", r(insn.operands[0]), r(insn.operands[1]), r(insn.operands[2]));
|
||||
if (strchr(insn.opcode->name, '.'))
|
||||
println("\t{}.compare<int64_t>({}.s64, 0);", cr(0), r(insn.operands[0]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VPKSWSS128:
|
||||
println("\t{}.v8hi = vec_pack_saturate({}.v4si, {}.v4si);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_MULHDU:
|
||||
println("\t{}.u64 = ({}.u64 * {}.u64) >> 64;", r(insn.operands[0]), r(insn.operands[1]), r(insn.operands[2]));
|
||||
if (strchr(insn.opcode->name, '.'))
|
||||
println("\t{}.compare<uint64_t>({}.u64, 0);", cr(0), r(insn.operands[0]));
|
||||
break;
|
||||
|
||||
case PPC_INST_STFSU:
|
||||
println("\t*({}.ptr) = {}.f64;", r(insn.operands[1]), f(insn.operands[0]));
|
||||
println("\t{}.u64 = {}.u64 + {}.s64;", r(insn.operands[1]), r(insn.operands[1]), r(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_MULLHWU:
|
||||
println("\t{}.u32 = ({}.u16 * {}.u16);", r(insn.operands[0]), r(insn.operands[1]), r(insn.operands[2]));
|
||||
if (strchr(insn.opcode->name, '.'))
|
||||
println("\t{}.compare<uint32_t>({}.u32, 0);", cr(0), r(insn.operands[0]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VSEL128:
|
||||
println("\t{}.v4si = vec_sel({}.v4si, {}.v4si, {}.v4si);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]), v(insn.operands[3]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VNOR128:
|
||||
println("\t{}.v4si = ~({}.v4si | {}.v4si);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VANDC:
|
||||
println("\t{}.v4si = {}.v4si & ~{}.v4si;", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
case PPC_INST_VPKSWSS:
|
||||
println("\t{}.v8hi = vec_pack_saturate({}.v4si, {}.v4si);", v(insn.operands[0]), v(insn.operands[1]), v(insn.operands[2]));
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
BIN
thirdparty/disasm/CMakeFiles/disasm.dir/disasm.c.obj
vendored
Normal file
BIN
thirdparty/disasm/CMakeFiles/disasm.dir/disasm.c.obj
vendored
Normal file
Binary file not shown.
BIN
thirdparty/disasm/CMakeFiles/disasm.dir/ppc-dis.c.obj
vendored
Normal file
BIN
thirdparty/disasm/CMakeFiles/disasm.dir/ppc-dis.c.obj
vendored
Normal file
Binary file not shown.
45
thirdparty/disasm/cmake_install.cmake
vendored
Normal file
45
thirdparty/disasm/cmake_install.cmake
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# Install script for directory: E:/recomp/XenonRecomp/thirdparty/disasm
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/disasm")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "C:/msys64/clang64/bin/llvm-objdump.exe")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "E:/recomp/XenonRecomp/thirdparty/disasm/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
BIN
thirdparty/disasm/libdisasm.a
vendored
Normal file
BIN
thirdparty/disasm/libdisasm.a
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user