mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-07-22 21:17:14 +00:00
Recompiler: write ppc_context.h
This commit is contained in:
@@ -2,6 +2,8 @@ cmake_minimum_required (VERSION 3.8)
|
||||
|
||||
project("PowerRecomp")
|
||||
|
||||
BIN2H(SOURCE_FILE ${POWERUTILS_ROOT}/ppc_context.h HEADER_FILE "generated/ppc_context.gen.h" VARIABLE_NAME "gPPCContextText")
|
||||
|
||||
add_executable(PowerRecomp "main.cpp" "pch.h" "recompiler.cpp" "recompiler.h" "swa_recompiler.cpp" "swa_recompiler.h" "test_recompiler.cpp" "test_recompiler.h")
|
||||
target_precompile_headers(PowerRecomp PUBLIC "pch.h")
|
||||
target_link_libraries(PowerRecomp PRIVATE LibPowerAnalyse tomlplusplus::tomlplusplus xxHash::xxhash)
|
||||
|
3
PowerRecomp/generated/.gitignore
vendored
Normal file
3
PowerRecomp/generated/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
|
||||
!.gitignore
|
@@ -19,3 +19,4 @@
|
||||
#include <unordered_set>
|
||||
#include <xbox.h>
|
||||
#include <xxhash.h>
|
||||
#include "generated/ppc_context.gen.h"
|
||||
|
@@ -2097,7 +2097,7 @@ void Recompiler::Recompile(const char* directoryPath)
|
||||
out.reserve(10 * 1024 * 1024);
|
||||
|
||||
{
|
||||
println("#pragma once\n");
|
||||
println("#pragma once");
|
||||
|
||||
println("#ifndef PPC_CONFIG_H_INCLUDED");
|
||||
println("#define PPC_CONFIG_H_INCLUDED\n");
|
||||
@@ -2124,10 +2124,19 @@ void Recompiler::Recompile(const char* directoryPath)
|
||||
SaveCurrentOutData(directoryPath, "ppc_config.h");
|
||||
}
|
||||
|
||||
{
|
||||
println("#pragma once");
|
||||
|
||||
println("#include \"ppc_config.h\"");
|
||||
println("{}", std::string_view{gPPCContextText, gPPCContextText_SIZE});
|
||||
|
||||
SaveCurrentOutData(directoryPath, "ppc_context.h");
|
||||
}
|
||||
|
||||
{
|
||||
println("#pragma once\n");
|
||||
println("#include \"ppc_config.h\"");
|
||||
println("#include <ppc_context.h>\n");
|
||||
println("#include \"ppc_context.h\"\n");
|
||||
|
||||
for (auto& symbol : image.symbols)
|
||||
println("PPC_EXTERN_FUNC({});", symbol.name);
|
||||
|
Reference in New Issue
Block a user