stuff
This commit is contained in:
parent
d4fab15fcc
commit
271ad42187
12
src/main.cpp
12
src/main.cpp
|
@ -505,6 +505,9 @@ std::unordered_set<std::string> ignored_funcs {
|
|||
"__divdi3",
|
||||
"__udivdi3",
|
||||
"__umoddi3",
|
||||
"div64_64",
|
||||
"div64_32",
|
||||
"__moddi3",
|
||||
// ido math routines
|
||||
"__ll_div",
|
||||
"__ll_lshift",
|
||||
|
@ -543,6 +546,7 @@ std::unordered_set<std::string> renamed_funcs{
|
|||
"sqrtf",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"memmove",
|
||||
"strcmp",
|
||||
"strcat",
|
||||
"strcpy",
|
||||
|
@ -562,6 +566,8 @@ std::unordered_set<std::string> renamed_funcs{
|
|||
"floor",
|
||||
"floorf",
|
||||
"fmodf",
|
||||
"fmod",
|
||||
"modf",
|
||||
"lround",
|
||||
"lroundf",
|
||||
"nearbyint",
|
||||
|
@ -575,6 +581,8 @@ std::unordered_set<std::string> renamed_funcs{
|
|||
"malloc",
|
||||
"free",
|
||||
"realloc",
|
||||
"rand",
|
||||
"srand",
|
||||
};
|
||||
|
||||
bool read_symbols(RecompPort::Context& context, const ELFIO::elfio& elf_file, ELFIO::section* symtab_section, uint32_t entrypoint, bool has_entrypoint, bool use_absolute_symbols) {
|
||||
|
@ -1249,6 +1257,8 @@ int main(int argc, char** argv) {
|
|||
std::ofstream func_header_file{ config.output_func_path / "funcs.h" };
|
||||
|
||||
fmt::print(func_header_file,
|
||||
"#ifndef __RECOMPED_FUNCS_H__\n"
|
||||
"#define __RECOMPED_FUNCS_H__\n"
|
||||
"#include \"recomp.h\"\n"
|
||||
"\n"
|
||||
"#ifdef __cplusplus\n"
|
||||
|
@ -1453,6 +1463,8 @@ int main(int argc, char** argv) {
|
|||
"#ifdef __cplusplus\n"
|
||||
"}}\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"#endif\n"
|
||||
);
|
||||
|
||||
{
|
||||
|
|
|
@ -1067,6 +1067,7 @@ bool RecompPort::recompile_function(const RecompPort::Context& context, const Re
|
|||
// Write the file header
|
||||
fmt::print(output_file,
|
||||
"#include \"recomp.h\"\n"
|
||||
"#include \"funcs.h\"\n"
|
||||
"#include \"disable_warnings.h\"\n"
|
||||
"\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue