diff --git a/External/FEXCore/Source/Common/NetStream.cpp b/External/FEXCore/Source/Common/NetStream.cpp index b73b86abb..b74f56b3e 100644 --- a/External/FEXCore/Source/Common/NetStream.cpp +++ b/External/FEXCore/Source/Common/NetStream.cpp @@ -1,11 +1,7 @@ #include "NetStream.h" -#include - -#include #include -#include #include int NetStream::NetBuf::flushBuffer(const char *buffer, size_t size) { @@ -29,7 +25,7 @@ std::streamsize NetStream::NetBuf::xsputn(const char* buffer, std::streamsize si // Check if the string fits neatly in our buffer if (size <= buf_remaining) { - std::memcpy(pptr(), buffer, size); + ::memcpy(pptr(), buffer, size); pbump(size); return size; } diff --git a/External/FEXCore/Source/Common/NetStream.h b/External/FEXCore/Source/Common/NetStream.h index ff2056842..27048d79e 100644 --- a/External/FEXCore/Source/Common/NetStream.h +++ b/External/FEXCore/Source/Common/NetStream.h @@ -2,6 +2,7 @@ #include #include +#include #include class NetStream : public std::iostream { diff --git a/External/FEXCore/Source/Common/Paths.cpp b/External/FEXCore/Source/Common/Paths.cpp index c924a7815..7d0de1e9e 100644 --- a/External/FEXCore/Source/Common/Paths.cpp +++ b/External/FEXCore/Source/Common/Paths.cpp @@ -3,8 +3,9 @@ #include #include +#include #include -#include +#include #include namespace FEXCore::Paths { diff --git a/External/FEXCore/Source/Interface/Config/Config.cpp b/External/FEXCore/Source/Interface/Config/Config.cpp index 4dd1edcf3..b524262ec 100644 --- a/External/FEXCore/Source/Interface/Config/Config.cpp +++ b/External/FEXCore/Source/Interface/Config/Config.cpp @@ -1,16 +1,36 @@ #include "Common/StringConv.h" #include "Common/Paths.h" -#include -#include "Interface/Context/Context.h" - #include +#include + +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include + #include +namespace FEXCore::Context { + struct Context; +} + namespace FEXCore::Config { namespace DefaultValues { #define P(x) x diff --git a/External/FEXCore/Source/Interface/Context/Context.cpp b/External/FEXCore/Source/Interface/Context/Context.cpp index 232be1446..6afe8a316 100644 --- a/External/FEXCore/Source/Interface/Context/Context.cpp +++ b/External/FEXCore/Source/Interface/Context/Context.cpp @@ -4,9 +4,18 @@ #include "Interface/Core/OpcodeDispatcher.h" #include "Interface/Core/X86Tables/X86Tables.h" -#include #include -#include +#include +#include +#include +#include "FEXCore/Debug/InternalThreadState.h" + +#include +#include + +namespace FEXCore::HLE { + class SyscallVisitor; +} namespace FEXCore::Context { void InitializeStaticTables(OperatingMode Mode) { diff --git a/External/FEXCore/Source/Interface/Context/Context.h b/External/FEXCore/Source/Interface/Context/Context.h index a3143de78..e5cc2d52a 100644 --- a/External/FEXCore/Source/Interface/Context/Context.h +++ b/External/FEXCore/Source/Interface/Context/Context.h @@ -1,48 +1,47 @@ #pragma once -#include "Common/JitSymbols.h" #include "Interface/Core/CPUID.h" -#include "Interface/Core/Frontend.h" #include "Interface/Core/HostFeatures.h" -#include "Interface/Core/InternalThreadState.h" #include "Interface/Core/X86HelperGen.h" -#include "Interface/IR/PassManager.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" #include -#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include #include #include #include -#include -#include -#include #include +#include +#include #include #include +#include namespace FEXCore { +class CodeLoader; class ThunkHandler; -class BlockSamplingData; class GdbServer; -class SiganlDelegator; namespace CPU { class Arm64JITCore; class X86JITCore; } namespace HLE { +struct SyscallArguments; class SyscallHandler; } } namespace FEXCore::IR { - class RegisterAllocationPass; class RegisterAllocationData; class IRListView; namespace Validation { diff --git a/External/FEXCore/Source/Interface/Core/ArchHelpers/Arm64_stubs.cpp b/External/FEXCore/Source/Interface/Core/ArchHelpers/Arm64_stubs.cpp index 30fd9b729..0396ab5ab 100644 --- a/External/FEXCore/Source/Interface/Core/ArchHelpers/Arm64_stubs.cpp +++ b/External/FEXCore/Source/Interface/Core/ArchHelpers/Arm64_stubs.cpp @@ -1,6 +1,7 @@ #include "Interface/Core/ArchHelpers/Arm64.h" #include +#include namespace FEXCore::ArchHelpers::Arm64 { @@ -23,4 +24,4 @@ bool HandleAtomicMemOp(void *_ucontext, void *_info, uint32_t Instr) { } #endif -} \ No newline at end of file +} diff --git a/External/FEXCore/Source/Interface/Core/BlockSamplingData.cpp b/External/FEXCore/Source/Interface/Core/BlockSamplingData.cpp index b89ed20a7..42ffd3469 100644 --- a/External/FEXCore/Source/Interface/Core/BlockSamplingData.cpp +++ b/External/FEXCore/Source/Interface/Core/BlockSamplingData.cpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace FEXCore { void BlockSamplingData::DumpBlockData() { diff --git a/External/FEXCore/Source/Interface/Core/BlockSamplingData.h b/External/FEXCore/Source/Interface/Core/BlockSamplingData.h index dd318dd59..ec3b14293 100644 --- a/External/FEXCore/Source/Interface/Core/BlockSamplingData.h +++ b/External/FEXCore/Source/Interface/Core/BlockSamplingData.h @@ -1,6 +1,7 @@ #pragma once + +#include #include -#include namespace FEXCore { class BlockSamplingData { diff --git a/External/FEXCore/Source/Interface/Core/CPUID.cpp b/External/FEXCore/Source/Interface/Core/CPUID.cpp index 9be8b716f..1ad4c667c 100644 --- a/External/FEXCore/Source/Interface/Core/CPUID.cpp +++ b/External/FEXCore/Source/Interface/Core/CPUID.cpp @@ -5,8 +5,11 @@ desc: Handles presented capability bits for guest cpu $end_info$ */ +#include +#include #include "Interface/Context/Context.h" #include "Interface/Core/CPUID.h" +#include "Interface/Core/HostFeatures.h" #include "git_version.h" #include diff --git a/External/FEXCore/Source/Interface/Core/CPUID.h b/External/FEXCore/Source/Interface/Core/CPUID.h index 7fc0590cb..535542156 100644 --- a/External/FEXCore/Source/Interface/Core/CPUID.h +++ b/External/FEXCore/Source/Interface/Core/CPUID.h @@ -4,7 +4,9 @@ #include #include -#include + +#include +#include namespace FEXCore { namespace Context { diff --git a/External/FEXCore/Source/Interface/Core/CompileService.cpp b/External/FEXCore/Source/Interface/Core/CompileService.cpp index fab13c5ee..0892a5ccf 100644 --- a/External/FEXCore/Source/Interface/Core/CompileService.cpp +++ b/External/FEXCore/Source/Interface/Core/CompileService.cpp @@ -1,8 +1,21 @@ #include "Interface/Context/Context.h" #include "Interface/Core/LookupCache.h" #include "Interface/Core/CompileService.h" -#include "Interface/Core/InternalThreadState.h" #include "Interface/Core/OpcodeDispatcher.h" +#include "FEXCore/Debug/InternalThreadState.h" +#include "FEXCore/HLE/Linux/ThreadManagement.h" +#include "Interface/IR/PassManager.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include namespace FEXCore { static void* ThreadHandler(void *Arg) { diff --git a/External/FEXCore/Source/Interface/Core/CompileService.h b/External/FEXCore/Source/Interface/Core/CompileService.h index 4761a4162..510237e3d 100644 --- a/External/FEXCore/Source/Interface/Core/CompileService.h +++ b/External/FEXCore/Source/Interface/Core/CompileService.h @@ -1,23 +1,22 @@ #pragma once -#include +#include #include #include +#include #include -#include -#include +#include #include +#include +#include namespace FEXCore { namespace Context { struct Context; } -namespace Core { - struct InternalThreadState; -} - namespace IR { + class IRListView; class RegisterAllocationData; }; class CompileService final { diff --git a/External/FEXCore/Source/Interface/Core/Core.cpp b/External/FEXCore/Source/Interface/Core/Core.cpp index d5f1e417a..9c4da7179 100644 --- a/External/FEXCore/Source/Interface/Core/Core.cpp +++ b/External/FEXCore/Source/Interface/Core/Core.cpp @@ -7,42 +7,70 @@ desc: Glues Frontend, OpDispatcher and IR Opts & Compilation, LookupCache, Dispa $end_info$ */ -#include "Common/MathUtils.h" -#include "Common/Paths.h" - #include "Interface/Context/Context.h" #include "Interface/Core/LookupCache.h" -#include "Interface/Core/BlockSamplingData.h" #include "Interface/Core/CompileService.h" #include "Interface/Core/Core.h" -#include "Interface/Core/DebugData.h" +#include "Interface/Core/CPUID.h" +#include "Interface/Core/Frontend.h" +#include "Interface/Core/GdbServer.h" #include "Interface/Core/OpcodeDispatcher.h" #include "Interface/Core/Interpreter/InterpreterCore.h" #include "Interface/Core/JIT/JITCore.h" +#include "Interface/HLE/Thunks/Thunks.h" #include "Interface/IR/Passes/RegisterAllocationPass.h" #include "Interface/IR/Passes.h" +#include "Interface/IR/PassManager.h" #include #include +#include #include #include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include +#include +#include +#include -#include "Interface/HLE/Thunks/Thunks.h" -#include "FEXCore/Utils/Allocator.h" - -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include - -#include "Interface/Core/GdbServer.h" +#include +#include +#include +#include +#include +#include +#include namespace FEXCore::CPU { bool CreateCPUCore(FEXCore::Context::Context *CTX) { diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.cpp b/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.cpp index d5b938f0c..2a4ae5eb5 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.cpp @@ -2,17 +2,28 @@ #include "Interface/Core/ArchHelpers/MContext.h" #include "Interface/Core/Dispatcher/Arm64Dispatcher.h" - #include "Interface/Core/Interpreter/InterpreterClass.h" -#include "Interface/Context/Context.h" +#include "Interface/Context/Context.h" +#include "Interface/Core/X86HelperGen.h" + +#include +#include #include +#include +#include #include #include +#include +#include +#include #include "aarch64/assembler-aarch64.h" +#include "aarch64/constants-aarch64.h" +#include "aarch64/operands-aarch64.h" #include "aarch64/cpu-aarch64.h" -#include "aarch64/disasm-aarch64.h" +#include "code-buffer-vixl.h" +#include "platform-vixl.h" namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.h b/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.h index 41a03edec..fcb9edd5d 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.h +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/Arm64Dispatcher.h @@ -3,7 +3,13 @@ #include "Interface/Core/ArchHelpers/Arm64Emitter.h" #include "Interface/Core/Dispatcher/Dispatcher.h" -#include "aarch64/assembler-aarch64.h" +namespace FEXCore::Context { +struct Context; +} + +namespace FEXCore::Core { +struct InternalThreadState; +} namespace FEXCore::CPU { @@ -15,4 +21,4 @@ class Arm64Dispatcher final : public Dispatcher, public Arm64Emitter { void SpillSRA(void *ucontext) override; }; -} \ No newline at end of file +} diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.cpp b/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.cpp index da48c980c..ff640d95a 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.cpp @@ -1,8 +1,23 @@ -#include "Interface/Core/Dispatcher/Dispatcher.h" #include "Common/MathUtils.h" #include "Interface/Core/ArchHelpers/MContext.h" +#include "Interface/Core/Dispatcher/Dispatcher.h" +#include "Interface/Core/X86HelperGen.h" + +#include +#include +#include +#include #include +#include +#include +#include + +#include +#include +#include +#include +#include namespace FEXCore::CPU { @@ -360,18 +375,18 @@ bool Dispatcher::HandleGuestSignal(int Signal, void *info, void *ucontext, Guest } if (Is64BitMode) { - Frame->State.gregs[X86State::REG_RDI] = Signal; + Frame->State.gregs[FEXCore::X86State::REG_RDI] = Signal; // Set up the new SP for stack handling NewGuestSP -= 8; *(uint64_t*)NewGuestSP = SignalReturn; - Frame->State.gregs[X86State::REG_RSP] = NewGuestSP; + Frame->State.gregs[FEXCore::X86State::REG_RSP] = NewGuestSP; } else { NewGuestSP -= 4; *(uint32_t*)NewGuestSP = SignalReturn; LOGMAN_THROW_A(SignalReturn < 0x1'0000'0000ULL, "This needs to be below 4GB"); - Frame->State.gregs[X86State::REG_RSP] = NewGuestSP; + Frame->State.gregs[FEXCore::X86State::REG_RSP] = NewGuestSP; } return true; diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.h b/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.h index 5425683c8..f6202201b 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.h +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.h @@ -1,11 +1,24 @@ #pragma once #include -#include #include "Interface/Context/Context.h" +#include +#include +#include #include +#include +#include + +namespace FEXCore { +struct GuestSigAction; +} + +namespace FEXCore::Core { +struct CpuStateFrame; +struct InternalThreadState; +} namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.cpp b/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.cpp index 770c1726d..5bbe1c819 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.cpp @@ -3,10 +3,21 @@ #include "Interface/Core/Dispatcher/X86Dispatcher.h" #include "Interface/Core/Interpreter/InterpreterClass.h" +#include "Interface/Core/X86HelperGen.h" #include "Interface/Context/Context.h" #include +#include +#include +#include +#include + #include +#include +#include +#include +#include +#include "xbyak/xbyak.h" namespace FEXCore::CPU { static constexpr size_t MAX_DISPATCHER_CODE_SIZE = 4096; diff --git a/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.h b/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.h index 3d6051c0f..cc3fa3343 100644 --- a/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.h +++ b/External/FEXCore/Source/Interface/Core/Dispatcher/X86Dispatcher.h @@ -2,11 +2,17 @@ #include "Interface/Core/Dispatcher/Dispatcher.h" -#include - #define XBYAK64 #include +namespace FEXCore::Context { + struct Context; +} + +namespace FEXCore::Core { + struct InternalThreadState; +} + namespace FEXCore::CPU { class X86Dispatcher final : public Dispatcher, public Xbyak::CodeGenerator { diff --git a/External/FEXCore/Source/Interface/Core/Frontend.cpp b/External/FEXCore/Source/Interface/Core/Frontend.cpp index a79030e93..06c045861 100644 --- a/External/FEXCore/Source/Interface/Core/Frontend.cpp +++ b/External/FEXCore/Source/Interface/Core/Frontend.cpp @@ -7,13 +7,16 @@ $end_info$ #include "Interface/Context/Context.h" #include "Interface/Core/Frontend.h" -#include "Interface/Core/InternalThreadState.h" #include +#include #include #include +#include #include #include +#include +#include #include #include #include diff --git a/External/FEXCore/Source/Interface/Core/Frontend.h b/External/FEXCore/Source/Interface/Core/Frontend.h index 9caffbf94..4a7ff5b25 100644 --- a/External/FEXCore/Source/Interface/Core/Frontend.h +++ b/External/FEXCore/Source/Interface/Core/Frontend.h @@ -6,9 +6,8 @@ #include #include -#include #include -#include +#include #include namespace FEXCore::Context { diff --git a/External/FEXCore/Source/Interface/Core/GdbServer.cpp b/External/FEXCore/Source/Interface/Core/GdbServer.cpp index ed6fa01e7..89f807657 100644 --- a/External/FEXCore/Source/Interface/Core/GdbServer.cpp +++ b/External/FEXCore/Source/Interface/Core/GdbServer.cpp @@ -8,30 +8,41 @@ $end_info$ #include #include #include -#include #include #include #include #include #include "Common/NetStream.h" #include "Common/SoftFloat.h" +#include "Interface/Context/Context.h" +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include +#include #include -#include #include +#include #include +#include +#include +#include #include -#include #include - +#include +#include #include "GdbServer.h" -#include -#include namespace FEXCore { diff --git a/External/FEXCore/Source/Interface/Core/GdbServer.h b/External/FEXCore/Source/Interface/Core/GdbServer.h index 09bbb132d..ab71c61e6 100644 --- a/External/FEXCore/Source/Interface/Core/GdbServer.h +++ b/External/FEXCore/Source/Interface/Core/GdbServer.h @@ -5,18 +5,21 @@ $end_info$ */ #pragma once -#include -#include - -#include "Interface/Context/Context.h" -#include "Common/NetStream.h" - +#include #include +#include +#include #include +#include +#include namespace FEXCore { +namespace Context { + struct Context; +} + class GdbServer { public: GdbServer(FEXCore::Context::Context *ctx); diff --git a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp index 0b6133193..90c593404 100644 --- a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp +++ b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterCore.cpp @@ -1,30 +1,31 @@ -#include "Common/MathUtils.h" -#include "Common/SoftFloat.h" #include "Interface/Context/Context.h" #include "Interface/Core/ArchHelpers/Arm64.h" #include "Interface/Core/ArchHelpers/MContext.h" -#include "Interface/Core/LookupCache.h" -#include "Interface/Core/DebugData.h" -#include "Interface/Core/InternalThreadState.h" +#include "Interface/Core/Dispatcher/Dispatcher.h" #include "Interface/Core/Interpreter/InterpreterClass.h" +#include +#include +#include +#include #include -#include -#include -#include -#include - -#include "Interface/HLE/Thunks/Thunks.h" - -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "InterpreterOps.h" +namespace FEXCore::IR { + class IRListView; + class RegisterAllocationData; +} + namespace FEXCore::CPU { +class CPUBackend; static void InterpreterExecution(FEXCore::Core::CpuStateFrame *Frame) { auto Thread = Frame->Thread; diff --git a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.cpp b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.cpp index 8bd1d36a0..c07f8c6ee 100644 --- a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.cpp +++ b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.cpp @@ -1,17 +1,16 @@ -#include "Common/MathUtils.h" #include "Common/SoftFloat.h" +#include "Common/SoftFloat-3e/softfloat.h" #include "Interface/Context/Context.h" +#include "Interface/Core/CPUID.h" #include "InterpreterOps.h" #ifdef _M_ARM_64 #include "Interface/Core/ArchHelpers/Arm64.h" #endif -#include "Interface/Core/LookupCache.h" -#include "Interface/Core/DebugData.h" -#include "Interface/Core/InternalThreadState.h" -#include "Interface/Core/Interpreter/InterpreterClass.h" #include +#include +#include #include #include #include @@ -21,15 +20,18 @@ #include "Interface/HLE/Thunks/Thunks.h" +#include #include #include +#include #include +#include #include -#include -#ifdef _M_X86_64 -#include -#endif -#include +#include +#include +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.h b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.h index eff61778d..94c103292 100644 --- a/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.h +++ b/External/FEXCore/Source/Interface/Core/Interpreter/InterpreterOps.h @@ -1,9 +1,13 @@ +#pragma once +#include + namespace FEXCore::Core { struct InternalThreadState; } namespace FEXCore::IR { class IRListView; + struct IROp_Header; } namespace FEXCore::Core{ @@ -32,11 +36,11 @@ namespace FEXCore::CPU { FallbackABI ABI; void *fn; }; - + class InterpreterOps { public: static void InterpretIR(FEXCore::Core::InternalThreadState *Thread, uint64_t Entry, FEXCore::IR::IRListView *CurrentIR, FEXCore::Core::DebugData *DebugData); static bool GetFallbackHandler(IR::IROp_Header *IROp, FallbackInfo *Info); }; -}; \ No newline at end of file +}; diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/ALUOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/ALUOps.cpp index 9a39109fa..4b6632ab4 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/ALUOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/ALUOps.cpp @@ -5,7 +5,14 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include +#include + +#include +#include +#include +#include namespace FEXCore::CPU { #define DEF_OP(x) void X86JITCore::Op_##x(FEXCore::IR::IROp_Header *IROp, uint32_t Node) diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/AtomicOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/AtomicOps.cpp index e482e4eed..d2a9014f4 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/AtomicOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/AtomicOps.cpp @@ -5,7 +5,14 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include +#include + +#include +#include +#include +#include namespace FEXCore::CPU { #define DEF_OP(x) void X86JITCore::Op_##x(FEXCore::IR::IROp_Header *IROp, uint32_t Node) diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/BranchOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/BranchOps.cpp index d27712e65..3832f29b5 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/BranchOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/BranchOps.cpp @@ -4,14 +4,28 @@ tags: backend|x86-64 $end_info$ */ +#include "Interface/Context/Context.h" +#include "Interface/Core/CPUID.h" +#include "Interface/Core/Dispatcher/Dispatcher.h" #include "Interface/Core/LookupCache.h" - #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" +#include "Interface/HLE/Thunks/Thunks.h" +#include +#include #include +#include #include -#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include namespace FEXCore::CPU { #define DEF_OP(x) void X86JITCore::Op_##x(FEXCore::IR::IROp_Header *IROp, uint32_t Node) diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/ConversionOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/ConversionOps.cpp index a2435c900..586dbae6e 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/ConversionOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/ConversionOps.cpp @@ -5,7 +5,13 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include +#include + +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/EncryptionOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/EncryptionOps.cpp index cb392c69a..8e1ca1684 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/EncryptionOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/EncryptionOps.cpp @@ -5,7 +5,12 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include + +#include +#include +#include namespace FEXCore::CPU { #define DEF_OP(x) void X86JITCore::Op_##x(FEXCore::IR::IROp_Header *IROp, uint32_t Node) diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/FlagOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/FlagOps.cpp index 2d7dc7c4e..1a44a9c77 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/FlagOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/FlagOps.cpp @@ -5,7 +5,12 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include + +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/JIT.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/JIT.cpp index 57168b9c2..9f6440efc 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/JIT.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/JIT.cpp @@ -8,20 +8,36 @@ $end_info$ #include "Interface/Context/Context.h" #include "Interface/Core/LookupCache.h" +#include "Interface/Core/Dispatcher/Dispatcher.h" #include "Interface/Core/Dispatcher/X86Dispatcher.h" +#include "Interface/Core/Interpreter/InterpreterOps.h" #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/Core/InternalThreadState.h" - +#include "Interface/IR/PassManager.h" #include "Interface/IR/Passes/RegisterAllocationPass.h" -#include -#include +#include +#include +#include +#include +#include +#include +#include #include +#include -#include +#include +#include +#include +#include +#include +#include #include - -#include "Interface/Core/Interpreter/InterpreterOps.h" +#include +#include +#include +#include +#include +#include // #define DEBUG_RA 1 // #define DEBUG_CYCLES diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MemoryOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MemoryOps.cpp index f990bffbc..4ffdbe02d 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MemoryOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MemoryOps.cpp @@ -5,9 +5,15 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" -#include +#include +#include +#include + +#include +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MiscOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MiscOps.cpp index 9f164ee55..df5374b34 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MiscOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MiscOps.cpp @@ -4,8 +4,18 @@ tags: backend|x86-64 $end_info$ */ +#include "Interface/Context/Context.h" +#include "Interface/Core/Dispatcher/Dispatcher.h" #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include +#include +#include + +#include +#include +#include +#include namespace FEXCore::CPU { static void PrintValue(uint64_t Value) { diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MoveOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MoveOps.cpp index 276f418a2..9fbf8496f 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/MoveOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/MoveOps.cpp @@ -5,7 +5,13 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" + +#include +#include + +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/JIT/x86_64/VectorOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/x86_64/VectorOps.cpp index d822f7908..71b74e6fa 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/x86_64/VectorOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/x86_64/VectorOps.cpp @@ -5,8 +5,14 @@ $end_info$ */ #include "Interface/Core/JIT/x86_64/JITClass.h" -#include "Interface/IR/Passes/RegisterAllocationPass.h" +#include +#include + +#include +#include +#include +#include namespace FEXCore::CPU { diff --git a/External/FEXCore/Source/Interface/Core/LookupCache.cpp b/External/FEXCore/Source/Interface/Core/LookupCache.cpp index 62a10dc4b..11270dd4a 100644 --- a/External/FEXCore/Source/Interface/Core/LookupCache.cpp +++ b/External/FEXCore/Source/Interface/Core/LookupCache.cpp @@ -5,10 +5,11 @@ desc: Stores information about blocks, and provides C++ implementations to looku $end_info$ */ -#include "Interface/Context/Context.h" -#include "Interface/Core/Core.h" -#include "Interface/Core/LookupCache.h" #include +#include + +#include "Interface/Context/Context.h" +#include "Interface/Core/LookupCache.h" #include diff --git a/External/FEXCore/Source/Interface/Core/LookupCache.h b/External/FEXCore/Source/Interface/Core/LookupCache.h index 6f4154f4c..f34c7c3fb 100644 --- a/External/FEXCore/Source/Interface/Core/LookupCache.h +++ b/External/FEXCore/Source/Interface/Core/LookupCache.h @@ -1,10 +1,18 @@ #pragma once -#include "Interface/Context/Context.h" #include +#include +#include #include +#include +#include +#include namespace FEXCore { +namespace Context { + struct Context; +} + class LookupCache { public: diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index 0d155a366..da72bc22d 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -7,16 +7,22 @@ $end_info$ #include "Interface/Context/Context.h" #include "Interface/Core/OpcodeDispatcher.h" -#include "Interface/HLE/Thunks/Thunks.h" +#include +#include #include -#include -#include -#include -#include - #include +#include #include +#include +#include +#include +#include + +#include +#include +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.h b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.h index ca1aa02b7..1494de57d 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.h +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.h @@ -3,7 +3,8 @@ #include "Interface/Core/Frontend.h" #include "Interface/Context/Context.h" -#include +#include +#include #include #include #include @@ -12,9 +13,10 @@ #include #include -#include #include -#include +#include +#include +#include namespace FEXCore::IR { class Pass; diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Crypto.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Crypto.cpp index 28432f63c..3d1fcba32 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Crypto.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Crypto.cpp @@ -5,11 +5,16 @@ desc: Handles x86/64 Crypto instructions to IR $end_info$ */ +#include +#include +#include #include "Interface/Core/OpcodeDispatcher.h" -#include +#include namespace FEXCore::IR { +class OrderedNode; + #define OpcodeArgs [[maybe_unused]] FEXCore::X86Tables::DecodedOp Op void OpDispatchBuilder::AESImcOp(OpcodeArgs) { diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp index f294b5cf6..5b2e74878 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp @@ -5,9 +5,17 @@ desc: Handles x86/64 flag generation $end_info$ */ +#include "Interface/Context/Context.h" #include "Interface/Core/OpcodeDispatcher.h" #include +#include +#include +#include +#include + +#include +#include namespace FEXCore::IR { constexpr std::array FlagOffsets = { diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp index b01fc8c4a..8749023b8 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/Vector.cpp @@ -5,9 +5,20 @@ desc: Handles x86/64 Vector instructions to IR $end_info$ */ +#include "Interface/Context/Context.h" #include "Interface/Core/OpcodeDispatcher.h" +#include +#include #include +#include +#include +#include + +#include +#include +#include +#include namespace FEXCore::IR { #define OpcodeArgs [[maybe_unused]] FEXCore::X86Tables::DecodedOp Op diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp index 59b50e904..aea6e6090 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp @@ -7,9 +7,18 @@ $end_info$ #include "Interface/Core/OpcodeDispatcher.h" +#include #include +#include +#include +#include + +#include +#include namespace FEXCore::IR { +class OrderedNode; + #define OpcodeArgs [[maybe_unused]] FEXCore::X86Tables::DecodedOp Op OrderedNode *OpDispatchBuilder::GetX87Top() { diff --git a/External/FEXCore/Source/Interface/Core/SignalDelegator.cpp b/External/FEXCore/Source/Interface/Core/SignalDelegator.cpp index d117a54ca..de7efe274 100644 --- a/External/FEXCore/Source/Interface/Core/SignalDelegator.cpp +++ b/External/FEXCore/Source/Interface/Core/SignalDelegator.cpp @@ -2,6 +2,7 @@ #include #include +#include namespace FEXCore { struct ThreadState { diff --git a/External/FEXCore/Source/Interface/Core/X86HelperGen.cpp b/External/FEXCore/Source/Interface/Core/X86HelperGen.cpp index 11d38f0a5..c3ef9380a 100644 --- a/External/FEXCore/Source/Interface/Core/X86HelperGen.cpp +++ b/External/FEXCore/Source/Interface/Core/X86HelperGen.cpp @@ -6,12 +6,15 @@ $end_info$ */ #include "Interface/Core/X86HelperGen.h" + +#include #include +#include #include -#include #include #include +#include namespace FEXCore { constexpr size_t CODE_SIZE = 0x1000; diff --git a/External/FEXCore/Source/Interface/Core/X86HelperGen.h b/External/FEXCore/Source/Interface/Core/X86HelperGen.h index 7fd8c7beb..054f74cc1 100644 --- a/External/FEXCore/Source/Interface/Core/X86HelperGen.h +++ b/External/FEXCore/Source/Interface/Core/X86HelperGen.h @@ -5,8 +5,8 @@ $end_info$ */ #pragma once -#include +#include #include namespace FEXCore { diff --git a/External/FEXCore/Source/Interface/Core/X86Tables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables.cpp index 3ba7320a1..0b2ab0cd9 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables.cpp @@ -5,14 +5,8 @@ tags: frontend|x86-tables $end_info$ */ -#include - #include #include -#include -#include -#include -#include namespace FEXCore::X86Tables { diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/BaseTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/BaseTables.cpp index df18fa6f8..2f9fefd2e 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/BaseTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/BaseTables.cpp @@ -7,6 +7,9 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" #include +#include + +#include namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/DDDTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/DDDTables.cpp index b9c639300..e8ba17db3 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/DDDTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/DDDTables.cpp @@ -6,6 +6,10 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/EVEXTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/EVEXTables.cpp index 30ec8a419..25a0776a9 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/EVEXTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/EVEXTables.cpp @@ -6,6 +6,10 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/H0F38Tables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/H0F38Tables.cpp index 6719d82be..5d9503251 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/H0F38Tables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/H0F38Tables.cpp @@ -4,9 +4,11 @@ tags: frontend|x86-tables $end_info$ */ -#include - #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include +#include namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/H0F3ATables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/H0F3ATables.cpp index 46f728658..f77005f5e 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/H0F3ATables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/H0F3ATables.cpp @@ -6,6 +6,12 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include +#include + +#include +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/PrimaryGroupTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/PrimaryGroupTables.cpp index d87b762f3..8ad817717 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/PrimaryGroupTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/PrimaryGroupTables.cpp @@ -6,6 +6,11 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include +#include + +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryGroupTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryGroupTables.cpp index 1e27b4db9..631f8cb9d 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryGroupTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryGroupTables.cpp @@ -6,6 +6,11 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryModRMTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryModRMTables.cpp index 8c2f1cc8a..296396b0f 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryModRMTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryModRMTables.cpp @@ -6,6 +6,10 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryTables.cpp index 8fa302689..b467eb816 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/SecondaryTables.cpp @@ -4,7 +4,12 @@ tags: frontend|x86-tables $end_info$ */ - #include "Interface/Core/X86Tables/X86Tables.h" +#include "Interface/Core/X86Tables/X86Tables.h" + +#include +#include + +#include namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/VEXTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/VEXTables.cpp index d91fb16e7..f284524d0 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/VEXTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/VEXTables.cpp @@ -6,6 +6,9 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/X87Tables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/X87Tables.cpp index ce50daefb..b326bd596 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/X87Tables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/X87Tables.cpp @@ -6,6 +6,9 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/Core/X86Tables/XOPTables.cpp b/External/FEXCore/Source/Interface/Core/X86Tables/XOPTables.cpp index 6d3a51ff8..ca5fe4b6d 100644 --- a/External/FEXCore/Source/Interface/Core/X86Tables/XOPTables.cpp +++ b/External/FEXCore/Source/Interface/Core/X86Tables/XOPTables.cpp @@ -6,6 +6,11 @@ $end_info$ #include "Interface/Core/X86Tables/X86Tables.h" +#include + +#include +#include + namespace FEXCore::X86Tables { using namespace InstFlags; diff --git a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp index a0edcd812..d99e4e25e 100644 --- a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp +++ b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp @@ -5,21 +5,23 @@ tags: glue|thunks $end_info$ */ +#include +#include +#include #include +#include #include "Thunks.h" -#include "stdio.h" #include - -#include -#include -#include #include -#include "Interface/Core/InternalThreadState.h" #include "FEXCore/Core/X86Enums.h" -#include +#include +#include #include +#include +#include +#include struct LoadlibArgs { const char *Name; diff --git a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.h b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.h index a70191d0b..2a7e1f848 100644 --- a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.h +++ b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.h @@ -5,12 +5,15 @@ $end_info$ */ #pragma once -#include namespace FEXCore::Core { struct InternalThreadState; } +namespace FEXCore::IR { + struct SHA256Sum; +} + namespace FEXCore { typedef void ThunkedFunction(void* ArgsRv); @@ -22,4 +25,4 @@ namespace FEXCore { static ThunkHandler* Create(); }; -}; \ No newline at end of file +}; diff --git a/External/FEXCore/Source/Interface/IR/IRDumper.cpp b/External/FEXCore/Source/Interface/IR/IRDumper.cpp index 357725072..34a1a4992 100644 --- a/External/FEXCore/Source/Interface/IR/IRDumper.cpp +++ b/External/FEXCore/Source/Interface/IR/IRDumper.cpp @@ -7,9 +7,14 @@ $end_info$ #include #include -#include -#include "Interface/IR/Passes/RegisterAllocationPass.h" +#include +#include +#include +#include +#include +#include +#include #include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/IREmitter.cpp b/External/FEXCore/Source/Interface/IR/IREmitter.cpp index 8590648f5..5fd02015c 100644 --- a/External/FEXCore/Source/Interface/IR/IREmitter.cpp +++ b/External/FEXCore/Source/Interface/IR/IREmitter.cpp @@ -5,7 +5,15 @@ tags: ir|emitter $end_info$ */ +#include #include +#include +#include + +#include +#include +#include +#include namespace FEXCore::IR { void IREmitter::ResetWorkingList() { diff --git a/External/FEXCore/Source/Interface/IR/IRParser.cpp b/External/FEXCore/Source/Interface/IR/IRParser.cpp index 17f60f014..7b51782c8 100644 --- a/External/FEXCore/Source/Interface/IR/IRParser.cpp +++ b/External/FEXCore/Source/Interface/IR/IRParser.cpp @@ -5,16 +5,24 @@ tags: ir|parser $end_info$ */ -#include -#include -#include -#include - #include #include #include +#include - +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace FEXCore::IR { namespace { diff --git a/External/FEXCore/Source/Interface/IR/PassManager.cpp b/External/FEXCore/Source/Interface/IR/PassManager.cpp index 7d27df9b0..8996c0dde 100644 --- a/External/FEXCore/Source/Interface/IR/PassManager.cpp +++ b/External/FEXCore/Source/Interface/IR/PassManager.cpp @@ -13,6 +13,7 @@ $end_info$ #include namespace FEXCore::IR { +class IREmitter; void PassManager::AddDefaultPasses(bool InlineConstants, bool StaticRegisterAllocation) { FEX_CONFIG_OPT(DisablePasses, O0); diff --git a/External/FEXCore/Source/Interface/IR/PassManager.h b/External/FEXCore/Source/Interface/IR/PassManager.h index 48e79b16f..e0028705e 100644 --- a/External/FEXCore/Source/Interface/IR/PassManager.h +++ b/External/FEXCore/Source/Interface/IR/PassManager.h @@ -7,11 +7,10 @@ $end_info$ #pragma once #include -#include -#include #include #include +#include #include namespace FEXCore::HLE { @@ -19,8 +18,9 @@ class SyscallHandler; } namespace FEXCore::IR { -class OpDispatchBuilder; -class SyscallOptimization; +class PassManager; +class IREmitter; +class RegisterAllocationPass; using ShouldExitHandler = std::function; diff --git a/External/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp b/External/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp index c5394eefa..2821bd97a 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp @@ -15,7 +15,20 @@ $end_info$ #endif #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/DeadCodeElimination.cpp b/External/FEXCore/Source/Interface/IR/Passes/DeadCodeElimination.cpp index 4a8bdcceb..7612a328a 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/DeadCodeElimination.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/DeadCodeElimination.cpp @@ -5,11 +5,12 @@ $end_info$ */ #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" #include +#include +#include -#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp b/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp index 59a93e1ec..149779fef 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/DeadContextStoreElimination.cpp @@ -7,9 +7,21 @@ $end_info$ #include "Interface/IR/Passes.h" #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" #include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + namespace { struct ContextMemberClassification { size_t Offset; diff --git a/External/FEXCore/Source/Interface/IR/Passes/DeadStoreElimination.cpp b/External/FEXCore/Source/Interface/IR/Passes/DeadStoreElimination.cpp index b29a78de4..3bc5f782c 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/DeadStoreElimination.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/DeadStoreElimination.cpp @@ -6,7 +6,17 @@ $end_info$ */ #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/IRCompaction.cpp b/External/FEXCore/Source/Interface/IR/Passes/IRCompaction.cpp index 11d3d83e7..acf55c555 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/IRCompaction.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/IRCompaction.cpp @@ -9,7 +9,16 @@ $end_info$ #include "Interface/IR/PassManager.h" #include "Interface/Core/OpcodeDispatcher.h" -#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp b/External/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp index 3506ca0ab..c867386f8 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/IRValidation.cpp @@ -7,11 +7,22 @@ $end_info$ #include "Interface/IR/PassManager.h" #include "Interface/IR/Passes/RegisterAllocationPass.h" -#include "Interface/Context/Context.h" -#include "Interface/Core/OpcodeDispatcher.h" #include "Common/BitSet.h" +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include +#include +#include +#include namespace { struct BlockInfo { diff --git a/External/FEXCore/Source/Interface/IR/Passes/LongDivideRemovalPass.cpp b/External/FEXCore/Source/Interface/IR/Passes/LongDivideRemovalPass.cpp index 4c3c32ba5..c01c4ac0c 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/LongDivideRemovalPass.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/LongDivideRemovalPass.cpp @@ -6,7 +6,12 @@ $end_info$ */ #include "Interface/IR/PassManager.h" -#include +#include +#include +#include + +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/PhiValidation.cpp b/External/FEXCore/Source/Interface/IR/Passes/PhiValidation.cpp index 49fc6c5c7..949038044 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/PhiValidation.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/PhiValidation.cpp @@ -5,10 +5,16 @@ desc: Sanity checking pass $end_info$ */ -#include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" +#include +#include +#include +#include +#include "Interface/IR/PassManager.h" + +#include #include +#include namespace FEXCore::IR::Validation { diff --git a/External/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp b/External/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp index c2516d907..30ef3f5c5 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/RedundantFlagCalculationElimination.cpp @@ -5,8 +5,13 @@ desc: This is not used right now, possibly broken $end_info$ */ +#include +#include +#include #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" + +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.cpp b/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.cpp index 70dc0e25c..937a1001f 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.cpp @@ -4,15 +4,27 @@ tags: ir|opts $end_info$ */ -#include "Common/BitSet.h" +#include "Common/MathUtils.h" #include "Interface/IR/Passes/RegisterAllocationPass.h" #include "Interface/IR/Passes.h" -#include "Interface/Core/OpcodeDispatcher.h" -#include +#include +#include +#include +#include +#include +#include +#include -#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include #define SRA_DEBUG(...) // printf(__VA_ARGS__) diff --git a/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.h b/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.h index 17acd6fc0..4d7406d95 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.h +++ b/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.h @@ -6,11 +6,14 @@ $end_info$ #pragma once #include "Interface/IR/PassManager.h" -#include -#include + +#include +#include namespace FEXCore::IR { -class IRListView; +class RegisterAllocationData; +struct RegisterAllocationDataDeleter; +struct RegisterClassType; class RegisterAllocationPass : public FEXCore::IR::Pass { public: diff --git a/External/FEXCore/Source/Interface/IR/Passes/StaticRegisterAllocationPass.cpp b/External/FEXCore/Source/Interface/IR/Passes/StaticRegisterAllocationPass.cpp index d5dbee825..a8aac8eb0 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/StaticRegisterAllocationPass.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/StaticRegisterAllocationPass.cpp @@ -6,7 +6,15 @@ $end_info$ */ #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" +#include +#include +#include +#include +#include + +#include +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/SyscallOptimization.cpp b/External/FEXCore/Source/Interface/IR/Passes/SyscallOptimization.cpp index 68c3d77e9..7eb59e690 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/SyscallOptimization.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/SyscallOptimization.cpp @@ -5,12 +5,15 @@ desc: Removes unused arguments if known syscall number $end_info$ */ -#include "Interface/Context/Context.h" #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" +#include +#include +#include #include -#include + +#include +#include namespace FEXCore::IR { diff --git a/External/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp b/External/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp index 49b6b6684..d360ff749 100644 --- a/External/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp +++ b/External/FEXCore/Source/Interface/IR/Passes/ValueDominanceValidation.cpp @@ -6,12 +6,21 @@ $end_info$ */ #include "Interface/IR/PassManager.h" -#include "Interface/Core/OpcodeDispatcher.h" -#include -#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include #include #include +#include +#include namespace { struct BlockInfo { diff --git a/External/FEXCore/Source/Utils/Allocator.cpp b/External/FEXCore/Source/Utils/Allocator.cpp index d71c0c821..88ee8f25a 100644 --- a/External/FEXCore/Source/Utils/Allocator.cpp +++ b/External/FEXCore/Source/Utils/Allocator.cpp @@ -4,8 +4,10 @@ #ifdef ENABLE_JEMALLOC #include #endif +#include #include -#include +#include +#include extern "C" { typedef void* (*mmap_hook_type)( diff --git a/External/FEXCore/Source/Utils/Allocator/64BitAllocator.cpp b/External/FEXCore/Source/Utils/Allocator/64BitAllocator.cpp index 6ffd90099..2b90b3d69 100644 --- a/External/FEXCore/Source/Utils/Allocator/64BitAllocator.cpp +++ b/External/FEXCore/Source/Utils/Allocator/64BitAllocator.cpp @@ -3,23 +3,22 @@ #include "Utils/Allocator/IntrusiveArenaAllocator.h" #include +#include #include -#include -#include #include -#include #include -#include +#include #include -#include +#include #include -#include -#include +#include +#include +#include #include +#include #include -#include -#include -#include +#include +#include static constexpr uint64_t PAGE_SHIFT = 12; static constexpr uint64_t PAGE_MASK = (1 << PAGE_SHIFT) - 1; diff --git a/External/FEXCore/Source/Utils/LogManager.cpp b/External/FEXCore/Source/Utils/LogManager.cpp index 746cea1fd..38edf9d11 100644 --- a/External/FEXCore/Source/Utils/LogManager.cpp +++ b/External/FEXCore/Source/Utils/LogManager.cpp @@ -4,9 +4,14 @@ tags: glue|log-manager $end_info$ */ - +#include #include -#include + +#include +#include +#include +#include +#include #include namespace LogMan { diff --git a/External/FEXCore/Source/Utils/Telemetry.cpp b/External/FEXCore/Source/Utils/Telemetry.cpp index 31f5c9faa..cecb2c1b2 100644 --- a/External/FEXCore/Source/Utils/Telemetry.cpp +++ b/External/FEXCore/Source/Utils/Telemetry.cpp @@ -1,6 +1,3 @@ - -#include "Common/Paths.h" - #include #include #include @@ -8,6 +5,10 @@ #include #include #include +#include +#include +#include +#include namespace FEXCore::Telemetry { #ifndef FEX_DISABLE_TELEMETRY diff --git a/External/FEXCore/Source/Utils/Threads.cpp b/External/FEXCore/Source/Utils/Threads.cpp index bdfbc5782..5d4286286 100644 --- a/External/FEXCore/Source/Utils/Threads.cpp +++ b/External/FEXCore/Source/Utils/Threads.cpp @@ -2,10 +2,15 @@ #include #include +#include #include +#include +#include #include #include +#include #include +#include #include namespace FEXCore::Threads { diff --git a/External/FEXCore/include/FEXCore/Core/SignalDelegator.h b/External/FEXCore/include/FEXCore/Core/SignalDelegator.h index d2bc39ee5..73ed2c78d 100644 --- a/External/FEXCore/include/FEXCore/Core/SignalDelegator.h +++ b/External/FEXCore/include/FEXCore/Core/SignalDelegator.h @@ -2,9 +2,13 @@ #include +#include +#include +#include #include #include -#include +#include +#include namespace FEXCore { namespace Core { diff --git a/External/FEXCore/include/FEXCore/IR/IREmitter.h b/External/FEXCore/include/FEXCore/IR/IREmitter.h index e5124544a..6a9775be9 100644 --- a/External/FEXCore/include/FEXCore/IR/IREmitter.h +++ b/External/FEXCore/include/FEXCore/IR/IREmitter.h @@ -5,6 +5,10 @@ #include #include +#include +#include +#include +#include namespace FEXCore::IR { class Pass; diff --git a/External/FEXCore/include/FEXCore/Utils/LogManager.h b/External/FEXCore/include/FEXCore/Utils/LogManager.h index 610575af4..1d5d33288 100644 --- a/External/FEXCore/include/FEXCore/Utils/LogManager.h +++ b/External/FEXCore/include/FEXCore/Utils/LogManager.h @@ -2,9 +2,7 @@ #include -#include #include -#include #include diff --git a/Source/Common/ArgumentLoader.cpp b/Source/Common/ArgumentLoader.cpp index 210f635f3..d5b007241 100644 --- a/Source/Common/ArgumentLoader.cpp +++ b/Source/Common/ArgumentLoader.cpp @@ -1,9 +1,10 @@ #include "Common/ArgumentLoader.h" -#include "Common/Config.h" #include "OptionParser.h" #include "git_version.h" +#include + namespace FEX::Handler { std::string CoreHandler(std::string &Value) { if (Value == "irint") diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp index d0765793b..da25dc665 100644 --- a/Source/Common/Config.cpp +++ b/Source/Common/Config.cpp @@ -1,18 +1,13 @@ #include "Common/Config.h" -#include +#include -#include -#include #include -#include #include #include -#include #include -#include #include -#include +#include #include namespace FEX::Config { diff --git a/Source/Common/Config.h b/Source/Common/Config.h index d0b4ae835..9654bae8c 100644 --- a/Source/Common/Config.h +++ b/Source/Common/Config.h @@ -1,10 +1,7 @@ #pragma once #include -#include -#include #include -#include /** * @brief This is a singleton for storing global configuration state diff --git a/Source/Common/EnvironmentLoader.cpp b/Source/Common/EnvironmentLoader.cpp index 6c11c158f..8715d42f0 100644 --- a/Source/Common/EnvironmentLoader.cpp +++ b/Source/Common/EnvironmentLoader.cpp @@ -1,9 +1,5 @@ -#include -#include +#include #include -#include -#include "Common/Config.h" -#include namespace FEX::EnvLoader { diff --git a/Source/Common/FileFormatCheck.cpp b/Source/Common/FileFormatCheck.cpp index e7e81ae44..0b4f53919 100644 --- a/Source/Common/FileFormatCheck.cpp +++ b/Source/Common/FileFormatCheck.cpp @@ -1,4 +1,5 @@ #include +#include #include namespace FEX::FormatCheck { diff --git a/Source/Common/RootFSSetup.cpp b/Source/Common/RootFSSetup.cpp index f88c3dd53..bbee1b98a 100644 --- a/Source/Common/RootFSSetup.cpp +++ b/Source/Common/RootFSSetup.cpp @@ -1,18 +1,19 @@ #include "ConfigDefines.h" -#include "Common/Config.h" #include "Common/FileFormatCheck.h" #include +#include #include #include #include #include -#include -#include +#include +#include +#include +#include #include -#include #include namespace FEX::RootFS { diff --git a/Source/CommonCore/HostFactory.cpp b/Source/CommonCore/HostFactory.cpp index 2d9c108a0..87e1447c8 100644 --- a/Source/CommonCore/HostFactory.cpp +++ b/Source/CommonCore/HostFactory.cpp @@ -1,23 +1,15 @@ -#include -#include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include #include #include diff --git a/Source/Linux/Utils/ELFContainer.cpp b/Source/Linux/Utils/ELFContainer.cpp index f57b1cfc0..84d726831 100644 --- a/Source/Linux/Utils/ELFContainer.cpp +++ b/Source/Linux/Utils/ELFContainer.cpp @@ -8,11 +8,14 @@ $end_info$ #include "Common/MathUtils.h" #include "Linux/Utils/ELFContainer.h" #include + +#include #include #include #include #include -#include +#include +#include #include namespace ELFLoader { diff --git a/Source/Linux/Utils/ELFContainer.h b/Source/Linux/Utils/ELFContainer.h index cb05a10dc..8e34e0831 100644 --- a/Source/Linux/Utils/ELFContainer.h +++ b/Source/Linux/Utils/ELFContainer.h @@ -1,11 +1,14 @@ #pragma once +#include #include #include #include +#include #include #include #include +#include #include // Add macros which are missing in some versions of diff --git a/Source/Linux/Utils/ELFSymbolDatabase.cpp b/Source/Linux/Utils/ELFSymbolDatabase.cpp index 99accc63f..463f34659 100644 --- a/Source/Linux/Utils/ELFSymbolDatabase.cpp +++ b/Source/Linux/Utils/ELFSymbolDatabase.cpp @@ -13,11 +13,13 @@ $end_info$ #include #include -#include #include +#include +#include #include #include #include +#include namespace ELFLoader { void ELFSymbolDatabase::FillLibrarySearchPaths() { diff --git a/Source/Linux/Utils/ELFSymbolDatabase.h b/Source/Linux/Utils/ELFSymbolDatabase.h index d7946b7d0..ccb873bfc 100644 --- a/Source/Linux/Utils/ELFSymbolDatabase.h +++ b/Source/Linux/Utils/ELFSymbolDatabase.h @@ -2,7 +2,12 @@ #include "Linux/Utils/ELFContainer.h" +#include +#include +#include +#include #include +#include #include namespace ELFLoader { diff --git a/Source/Tests/FEXBash.cpp b/Source/Tests/FEXBash.cpp index 089ec40b6..7336c2527 100644 --- a/Source/Tests/FEXBash.cpp +++ b/Source/Tests/FEXBash.cpp @@ -7,14 +7,18 @@ $end_info$ #include "ConfigDefines.h" #include "Common/ArgumentLoader.h" -#include "Common/EnvironmentLoader.h" -#include "Common/Config.h" #include "Common/RootFSSetup.h" #include +#include + #include +#include +#include +#include #include #include +#include int main(int argc, char **argv, char **const envp) { FEXCore::Config::Initialize(); diff --git a/Source/Tests/FEXLoader.cpp b/Source/Tests/FEXLoader.cpp index 97d83ebee..5137faf4b 100644 --- a/Source/Tests/FEXLoader.cpp +++ b/Source/Tests/FEXLoader.cpp @@ -6,35 +6,45 @@ $end_info$ */ #include "Common/ArgumentLoader.h" -#include "Common/Config.h" -#include "Common/EnvironmentLoader.h" #include "Common/RootFSSetup.h" -#include "ELFCodeLoader.h" #include "ELFCodeLoader2.h" +#include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" #include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Linux/Utils/ELFContainer.h" #include -#include #include +#include #include #include #include #include +#include #include -#include -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/Source/Tests/IRLoader.cpp b/Source/Tests/IRLoader.cpp index 88b56e8aa..bec7aa06f 100644 --- a/Source/Tests/IRLoader.cpp +++ b/Source/Tests/IRLoader.cpp @@ -6,19 +6,27 @@ $end_info$ */ #include "Common/ArgumentLoader.h" -#include "Common/EnvironmentLoader.h" -#include "Common/Config.h" -#include "HarnessHelpers.h" #include "IRLoader/Loader.h" -#include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/SignalDelegator.h" #include #include #include +#include #include #include +#include +#include +#include +#include +#include +#include + +namespace FEXCore::Context { + struct Context; +} + void MsgHandler(LogMan::DebugLevels Level, char const *Message) { const char *CharLevel{nullptr}; diff --git a/Source/Tests/IRLoader/Loader.cpp b/Source/Tests/IRLoader/Loader.cpp index 53432f87d..15f57474f 100644 --- a/Source/Tests/IRLoader/Loader.cpp +++ b/Source/Tests/IRLoader/Loader.cpp @@ -2,9 +2,10 @@ #include #include -#include +#include #include +#include namespace FEX::IRLoader { Loader::Loader(std::string const &Filename, std::string const &ConfigFilename) { diff --git a/Source/Tests/IRLoader/Loader.h b/Source/Tests/IRLoader/Loader.h index 742a6c79d..5d85ae206 100644 --- a/Source/Tests/IRLoader/Loader.h +++ b/Source/Tests/IRLoader/Loader.h @@ -1,15 +1,16 @@ #pragma once #include -#include #include #include "HarnessHelpers.h" #include -#include +#include +#include +#include #include -#include +#include using namespace FEXCore::IR; diff --git a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp index 8f0487c1c..84d59c993 100644 --- a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp +++ b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp @@ -5,17 +5,27 @@ desc: Emulated /proc/cpuinfo, version, osrelease, etc $end_info$ */ -#include -#include -#include -#include -#include "FEXCore/Core/CodeLoader.h" - -#include #include "Tests/LinuxSyscalls/Syscalls.h" -#include "Tests/LinuxSyscalls/FileManagement.h" #include "Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h" +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + using string = std::string; namespace FEX::EmulatedFile { diff --git a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h index 3de472066..7da8a6a5f 100644 --- a/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h +++ b/Source/Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h @@ -10,12 +10,9 @@ $end_info$ #include #include #include -#include #include +#include -namespace FEXCore { - class FD; -} namespace FEXCore::Context { struct Context; } diff --git a/Source/Tests/LinuxSyscalls/FileManagement.cpp b/Source/Tests/LinuxSyscalls/FileManagement.cpp index ad54cce05..269e5b9ca 100644 --- a/Source/Tests/LinuxSyscalls/FileManagement.cpp +++ b/Source/Tests/LinuxSyscalls/FileManagement.cpp @@ -6,29 +6,36 @@ $end_info$ */ #include "Tests/LinuxSyscalls/FileManagement.h" +#include "Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include + +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include #include -#include +#include +#include #include -#include -#include + +namespace FEXCore::Context { + struct Context; +} namespace FEX::HLE { + struct open_how; static bool LoadFile(std::vector &Data, const std::string &Filename) { std::fstream File(Filename, std::ios::in); diff --git a/Source/Tests/LinuxSyscalls/FileManagement.h b/Source/Tests/LinuxSyscalls/FileManagement.h index 213eefd65..44a22419f 100644 --- a/Source/Tests/LinuxSyscalls/FileManagement.h +++ b/Source/Tests/LinuxSyscalls/FileManagement.h @@ -5,15 +5,18 @@ $end_info$ */ #pragma once +#include + #include -#include -#include -#include -#include -#include -#include +#include #include #include +#include +#include +#include +#include + +#include #include "Tests/LinuxSyscalls/EmulatedFiles/EmulatedFiles.h" diff --git a/Source/Tests/LinuxSyscalls/SignalDelegator.cpp b/Source/Tests/LinuxSyscalls/SignalDelegator.cpp index 566704f68..6ee98adc1 100644 --- a/Source/Tests/LinuxSyscalls/SignalDelegator.cpp +++ b/Source/Tests/LinuxSyscalls/SignalDelegator.cpp @@ -9,18 +9,26 @@ $end_info$ #include #include "Tests/LinuxSyscalls/SignalDelegator.h" +#include +#include #include +#include #include #include #include +#include +#include +#include #include #include +#include +#include #include -#include #include #include +#include namespace FEX::HLE { #ifdef _M_X86_64 diff --git a/Source/Tests/LinuxSyscalls/SignalDelegator.h b/Source/Tests/LinuxSyscalls/SignalDelegator.h index d2f331081..0edf7f769 100644 --- a/Source/Tests/LinuxSyscalls/SignalDelegator.h +++ b/Source/Tests/LinuxSyscalls/SignalDelegator.h @@ -9,16 +9,15 @@ $end_info$ #include #include -#include +#include +#include +#include +#include #include -#include #include namespace FEXCore { -namespace Context { - struct Context; -} namespace Core { struct InternalThreadState; } diff --git a/Source/Tests/LinuxSyscalls/Syscalls.cpp b/Source/Tests/LinuxSyscalls/Syscalls.cpp index 994857943..19e57a73d 100644 --- a/Source/Tests/LinuxSyscalls/Syscalls.cpp +++ b/Source/Tests/LinuxSyscalls/Syscalls.cpp @@ -6,37 +6,49 @@ desc: Glue logic, brk allocations $end_info$ */ -#include -#include - #include "Common/MathUtils.h" #include "Linux/Utils/ELFContainer.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/Syscalls/Thread.h" -#include "Tests/LinuxSyscalls/x64/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include +#include +#include +#include #include #include +#include +#include #include -#include +#include +#include +#include + +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include #include -#include -#include #include +namespace FEXCore::Context { + struct Context; +} + namespace FEX::HLE { +class SignalDelegator; SyscallHandler *_SyscallHandler{}; static bool IsSupportedByInterpreter(std::string const &Filename) { diff --git a/Source/Tests/LinuxSyscalls/Syscalls.h b/Source/Tests/LinuxSyscalls/Syscalls.h index 1b4b8512c..2a4e8e253 100644 --- a/Source/Tests/LinuxSyscalls/Syscalls.h +++ b/Source/Tests/LinuxSyscalls/Syscalls.h @@ -8,29 +8,34 @@ $end_info$ #pragma once #include "Tests/LinuxSyscalls/FileManagement.h" -#include "Tests/LinuxSyscalls/SignalDelegator.h" -#include "git_version.h" #include #include #include -#include -#include #include -#include +#include +#include #include -#include +#include +#include // #define DEBUG_STRACE -namespace FEXCore::Core { -struct CpuStateFrame; +namespace FEXCore { + class CodeLoader; + namespace Context { + struct Context; + } + namespace Core { + struct CpuStateFrame; + } } namespace FEX::HLE { class SyscallHandler; +class SignalDelegator; void RegisterEpoll(); void RegisterFD(FEX::HLE::SyscallHandler *const Handler); void RegisterFS(); diff --git a/Source/Tests/LinuxSyscalls/Syscalls/Info.cpp b/Source/Tests/LinuxSyscalls/Syscalls/Info.cpp index 495f46b97..d14444ea9 100644 --- a/Source/Tests/LinuxSyscalls/Syscalls/Info.cpp +++ b/Source/Tests/LinuxSyscalls/Syscalls/Info.cpp @@ -24,6 +24,8 @@ $end_info$ #include #include +#include + namespace FEX::HLE { using cap_user_header_t = void*; using cap_user_data_t = void*; diff --git a/Source/Tests/LinuxSyscalls/Syscalls/Signals.cpp b/Source/Tests/LinuxSyscalls/Syscalls/Signals.cpp index 7f45c3c0e..7b3d137a5 100644 --- a/Source/Tests/LinuxSyscalls/Syscalls/Signals.cpp +++ b/Source/Tests/LinuxSyscalls/Syscalls/Signals.cpp @@ -4,6 +4,7 @@ tags: LinuxSyscalls|syscalls-shared $end_info$ */ +#include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/Syscalls/Thread.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" diff --git a/Source/Tests/LinuxSyscalls/Syscalls/Stubs.cpp b/Source/Tests/LinuxSyscalls/Syscalls/Stubs.cpp index a8372ae4e..25c8eb57c 100644 --- a/Source/Tests/LinuxSyscalls/Syscalls/Stubs.cpp +++ b/Source/Tests/LinuxSyscalls/Syscalls/Stubs.cpp @@ -7,27 +7,19 @@ $end_info$ #include #include "Tests/LinuxSyscalls/Syscalls.h" -#include "Tests/LinuxSyscalls/x64/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include - +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #define SYSCALL_STUB(name) do { ERROR_AND_DIE("Syscall: " #name " stub!"); return -ENOSYS; } while(0) +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE { void RegisterStubs() { diff --git a/Source/Tests/LinuxSyscalls/x32/EPoll.cpp b/Source/Tests/LinuxSyscalls/x32/EPoll.cpp index ef613e1e1..ba651dc5e 100644 --- a/Source/Tests/LinuxSyscalls/x32/EPoll.cpp +++ b/Source/Tests/LinuxSyscalls/x32/EPoll.cpp @@ -5,23 +5,25 @@ tags: LinuxSyscalls|syscalls-x86-32 $end_info$ */ -#include "Common/MathUtils.h" - #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" -#include -#include +#include "Tests/LinuxSyscalls/x32/Types.h" #include #include #include -#include +#include +#include #include #include ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%lx") ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%lx") +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { void RegisterEpoll(FEX::HLE::SyscallHandler *const Handler) { REGISTER_SYSCALL_IMPL_X32(epoll_wait, [](FEXCore::Core::CpuStateFrame *Frame, int epfd, compat_ptr events, int maxevents, int timeout) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x32/FD.cpp b/Source/Tests/LinuxSyscalls/x32/FD.cpp index 11bb28fa1..fa2c49663 100644 --- a/Source/Tests/LinuxSyscalls/x32/FD.cpp +++ b/Source/Tests/LinuxSyscalls/x32/FD.cpp @@ -9,29 +9,40 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/IoctlEmulation.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/SyscallsEnum.h" +#include "Tests/LinuxSyscalls/x32/Types.h" #include #include #include -#include +#include +#include #include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include #include +#include #include -#include +#include #include +#include #include -#include +#include +#include +#include #include +#include ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%lx") +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { // Used to ensure no bogus values are passed into readv/writev family syscalls. // This is mainly to sanitize vector sizing. It's fine for the bogus value diff --git a/Source/Tests/LinuxSyscalls/x32/FS.cpp b/Source/Tests/LinuxSyscalls/x32/FS.cpp index 2d02f5142..a1d91a262 100644 --- a/Source/Tests/LinuxSyscalls/x32/FS.cpp +++ b/Source/Tests/LinuxSyscalls/x32/FS.cpp @@ -6,7 +6,10 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/SignalDelegator.h" +#include +#include #include #include diff --git a/Source/Tests/LinuxSyscalls/x32/Info.cpp b/Source/Tests/LinuxSyscalls/x32/Info.cpp index 3c664586e..f424f97b5 100644 --- a/Source/Tests/LinuxSyscalls/x32/Info.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Info.cpp @@ -6,11 +6,21 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" +#include +#include +#include +#include +#include +#include #include -#include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { struct rlimit32 { uint32_t rlim_cur; diff --git a/Source/Tests/LinuxSyscalls/x32/Memory.cpp b/Source/Tests/LinuxSyscalls/x32/Memory.cpp index 0c706c1f3..ce274454a 100644 --- a/Source/Tests/LinuxSyscalls/x32/Memory.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Memory.cpp @@ -6,17 +6,16 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include +#include #include -#include -#include #include #include +#include #include -#include -#include +#include #include -#include static std::string get_fdpath(int fd) { diff --git a/Source/Tests/LinuxSyscalls/x32/Msg.cpp b/Source/Tests/LinuxSyscalls/x32/Msg.cpp index 886eb2f55..23faf6cb2 100644 --- a/Source/Tests/LinuxSyscalls/x32/Msg.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Msg.cpp @@ -6,10 +6,13 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" #include +#include +#include +#include #include -#include namespace FEX::HLE::x32 { void RegisterMsg() { diff --git a/Source/Tests/LinuxSyscalls/x32/NotImplemented.cpp b/Source/Tests/LinuxSyscalls/x32/NotImplemented.cpp index a8f3bccb6..9dccf1009 100644 --- a/Source/Tests/LinuxSyscalls/x32/NotImplemented.cpp +++ b/Source/Tests/LinuxSyscalls/x32/NotImplemented.cpp @@ -4,10 +4,16 @@ tags: LinuxSyscalls|syscalls-x86-32 $end_info$ */ -#include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" #include +#include +#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { #define REGISTER_SYSCALL_NOT_IMPL_X32(name) REGISTER_SYSCALL_IMPL_X32(name, [](FEXCore::Core::CpuStateFrame *Frame) -> uint64_t { \ LogMan::Msg::D("Using deprecated/removed syscall: " #name); \ diff --git a/Source/Tests/LinuxSyscalls/x32/Sched.cpp b/Source/Tests/LinuxSyscalls/x32/Sched.cpp index 8442398c2..79ba86345 100644 --- a/Source/Tests/LinuxSyscalls/x32/Sched.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Sched.cpp @@ -6,14 +6,17 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" #include #include -#include -#include -#include +#include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { void RegisterSched() { REGISTER_SYSCALL_IMPL_X32(sched_rr_get_interval, [](FEXCore::Core::CpuStateFrame *Frame, pid_t pid, struct timespec32 *tp) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp b/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp index d5c31fa41..eba391e1c 100644 --- a/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp @@ -6,14 +6,25 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" #include +#include +#include +#include +#include #include #include #include #include -#include +#include +#include +#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} namespace FEX::HLE::x32 { // Define the IPC ops diff --git a/Source/Tests/LinuxSyscalls/x32/Signals.cpp b/Source/Tests/LinuxSyscalls/x32/Signals.cpp index 65fcacd83..50eda434e 100644 --- a/Source/Tests/LinuxSyscalls/x32/Signals.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Signals.cpp @@ -4,19 +4,19 @@ tags: LinuxSyscalls|syscalls-x86-32 $end_info$ */ +#include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Tests/LinuxSyscalls/Syscalls.h" -#include "Tests/LinuxSyscalls/Syscalls/Thread.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" -#include #include +#include +#include +#include +#include -#include -#include -#include - -namespace SignalDelegator { - struct GuestSigAction; +namespace FEXCore::Core { + struct CpuStateFrame; } namespace FEX::HLE::x32 { diff --git a/Source/Tests/LinuxSyscalls/x32/Socket.cpp b/Source/Tests/LinuxSyscalls/x32/Socket.cpp index 74b01052a..fcf2490fe 100644 --- a/Source/Tests/LinuxSyscalls/x32/Socket.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Socket.cpp @@ -6,16 +6,25 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" #include +#include +#include +#include #include +#include #include -#include #include +#include ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%lx") +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { enum SockOp { OP_SOCKET = 1, diff --git a/Source/Tests/LinuxSyscalls/x32/Syscalls.cpp b/Source/Tests/LinuxSyscalls/x32/Syscalls.cpp index 8d80cddb5..7b86eddc4 100644 --- a/Source/Tests/LinuxSyscalls/x32/Syscalls.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Syscalls.cpp @@ -8,20 +8,31 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/IoctlEmulation.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/SyscallsEnum.h" #include #include -#include +#include +#include +#include +#include #include +#include +#include #include #include -#include +#include +#include #ifndef MREMAP_DONTUNMAP #define MREMAP_DONTUNMAP 4 #endif +namespace FEXCore::Context { + struct Context; +} + namespace FEX::HLE::x32 { class MemAllocator32Bit final : public MemAllocator { private: diff --git a/Source/Tests/LinuxSyscalls/x32/Syscalls.h b/Source/Tests/LinuxSyscalls/x32/Syscalls.h index 9590c7737..28d085220 100644 --- a/Source/Tests/LinuxSyscalls/x32/Syscalls.h +++ b/Source/Tests/LinuxSyscalls/x32/Syscalls.h @@ -7,26 +7,25 @@ $end_info$ #pragma once #include "Tests/LinuxSyscalls/Syscalls.h" -#include "Tests/LinuxSyscalls/FileManagement.h" -#include -#include "Tests/LinuxSyscalls/x32/Types.h" -#include -#include -#include -#include #include -#include -#include +#include +#include +#include + +namespace FEXCore { + namespace Context { + struct Context; + } + namespace Core { + struct CpuStateFrame; + } +} namespace FEX::HLE { class SignalDelegator; } -namespace FEXCore::Core { -struct InternalThreadState; -} - namespace FEX::HLE::x32 { #include "SyscallsEnum.h" diff --git a/Source/Tests/LinuxSyscalls/x32/Thread.cpp b/Source/Tests/LinuxSyscalls/x32/Thread.cpp index 5a5ccdbf7..5465c1c9b 100644 --- a/Source/Tests/LinuxSyscalls/x32/Thread.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Thread.cpp @@ -4,23 +4,28 @@ tags: LinuxSyscalls|syscalls-x86-32 $end_info$ */ +#include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Tests/LinuxSyscalls/Syscalls.h" -#include "Tests/LinuxSyscalls/Syscalls/Thread.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Thread.h" +#include "Tests/LinuxSyscalls/x32/Types.h" -#include +#include #include +#include -#include -#include - +#include +#include +#include #include #include +#include #include -#include #include +#include +#include #include +#include ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%x") diff --git a/Source/Tests/LinuxSyscalls/x32/Thread.h b/Source/Tests/LinuxSyscalls/x32/Thread.h index 5223463ac..62c51ae60 100644 --- a/Source/Tests/LinuxSyscalls/x32/Thread.h +++ b/Source/Tests/LinuxSyscalls/x32/Thread.h @@ -8,7 +8,6 @@ $end_info$ #include namespace FEXCore::Core { -struct InternalThreadState; struct CpuStateFrame; } diff --git a/Source/Tests/LinuxSyscalls/x32/Time.cpp b/Source/Tests/LinuxSyscalls/x32/Time.cpp index 3ef061024..e3b8a5fc4 100644 --- a/Source/Tests/LinuxSyscalls/x32/Time.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Time.cpp @@ -6,19 +6,23 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" +#include "Tests/LinuxSyscalls/x32/Types.h" -#include +#include #include -#include -#include +#include +#include #include -#include -#include +#include #include -#include ARG_TO_STR(FEX::HLE::x32::compat_ptr, "%lx") +struct timespec; +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x32 { void RegisterTime() { REGISTER_SYSCALL_IMPL_X32(gettimeofday, [](FEXCore::Core::CpuStateFrame *Frame, timeval32 *tv, struct timezone *tz) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x32/Timer.cpp b/Source/Tests/LinuxSyscalls/x32/Timer.cpp index 34f6d641d..ed439d2c9 100644 --- a/Source/Tests/LinuxSyscalls/x32/Timer.cpp +++ b/Source/Tests/LinuxSyscalls/x32/Timer.cpp @@ -7,15 +7,14 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" -#include +#include #include -#include -#include -#include -#include +#include #include -#include -#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} namespace FEX::HLE::x32 { void RegisterTimer() { diff --git a/Source/Tests/LinuxSyscalls/x64/EPoll.cpp b/Source/Tests/LinuxSyscalls/x64/EPoll.cpp index a7424ae69..5585106e8 100644 --- a/Source/Tests/LinuxSyscalls/x64/EPoll.cpp +++ b/Source/Tests/LinuxSyscalls/x64/EPoll.cpp @@ -5,20 +5,22 @@ tags: LinuxSyscalls|syscalls-x86-64 $end_info$ */ -#include "Common/MathUtils.h" - #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include -#include #include #include +#include #include -#include +#include #include #include +struct timespec; +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { void RegisterEpoll(FEX::HLE::SyscallHandler *const Handler) { REGISTER_SYSCALL_IMPL_X64(epoll_wait, [](FEXCore::Core::CpuStateFrame *Frame, int epfd, epoll_event_x86 *events, int maxevents, int timeout) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x64/FD.cpp b/Source/Tests/LinuxSyscalls/x64/FD.cpp index 61ab2350c..e57a925c0 100644 --- a/Source/Tests/LinuxSyscalls/x64/FD.cpp +++ b/Source/Tests/LinuxSyscalls/x64/FD.cpp @@ -4,18 +4,24 @@ tags: LinuxSyscalls|syscalls-x86-64 $end_info$ */ +#include "Tests/LinuxSyscalls/FileManagement.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include #include +#include #include +#include +#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include namespace FEX::HLE::x64 { diff --git a/Source/Tests/LinuxSyscalls/x64/IO.cpp b/Source/Tests/LinuxSyscalls/x64/IO.cpp index 4d8b6046b..caed0b70d 100644 --- a/Source/Tests/LinuxSyscalls/x64/IO.cpp +++ b/Source/Tests/LinuxSyscalls/x64/IO.cpp @@ -8,9 +8,14 @@ $end_info$ #include "Tests/LinuxSyscalls/x64/Syscalls.h" #include -#include +#include +#include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { void RegisterIO() { REGISTER_SYSCALL_IMPL_X64(io_getevents, [](FEXCore::Core::CpuStateFrame *Frame, aio_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct timespec *timeout) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x64/Ioctl.cpp b/Source/Tests/LinuxSyscalls/x64/Ioctl.cpp index 28e05e617..926a4372b 100644 --- a/Source/Tests/LinuxSyscalls/x64/Ioctl.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Ioctl.cpp @@ -7,10 +7,13 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include #include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { void RegisterIoctl() { REGISTER_SYSCALL_IMPL_X64(ioctl, [](FEXCore::Core::CpuStateFrame *Frame, int fd, uint64_t request, void *args) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x64/Msg.cpp b/Source/Tests/LinuxSyscalls/x64/Msg.cpp index 5b372440b..42ccbf710 100644 --- a/Source/Tests/LinuxSyscalls/x64/Msg.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Msg.cpp @@ -6,11 +6,16 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include #include +#include +#include +#include #include -#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} namespace FEX::HLE::x64 { void RegisterMsg() { diff --git a/Source/Tests/LinuxSyscalls/x64/NotImplemented.cpp b/Source/Tests/LinuxSyscalls/x64/NotImplemented.cpp index 2694b7868..9a277af58 100644 --- a/Source/Tests/LinuxSyscalls/x64/NotImplemented.cpp +++ b/Source/Tests/LinuxSyscalls/x64/NotImplemented.cpp @@ -5,9 +5,15 @@ $end_info$ */ #include -#include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" +#include +#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { #define REGISTER_SYSCALL_NOT_IMPL_X64(name) REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame *Frame) -> uint64_t { \ LogMan::Msg::D("Using deprecated/removed syscall: " #name); \ diff --git a/Source/Tests/LinuxSyscalls/x64/Sched.cpp b/Source/Tests/LinuxSyscalls/x64/Sched.cpp index bcdbbebfb..a05c4ff7d 100644 --- a/Source/Tests/LinuxSyscalls/x64/Sched.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Sched.cpp @@ -6,15 +6,15 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include #include #include -#include -#include -#include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { void RegisterSched() { REGISTER_SYSCALL_IMPL_X64(sched_rr_get_interval, [](FEXCore::Core::CpuStateFrame *Frame, pid_t pid, struct timespec *tp) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x64/Semaphore.cpp b/Source/Tests/LinuxSyscalls/x64/Semaphore.cpp index 619fa469b..4b82d7372 100644 --- a/Source/Tests/LinuxSyscalls/x64/Semaphore.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Semaphore.cpp @@ -6,10 +6,15 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include +#include +#include #include +namespace FEXCore::Core { + struct CpuStateFrame; +} + namespace FEX::HLE::x64 { void RegisterSemaphore() { REGISTER_SYSCALL_IMPL_X64(semop, [](FEXCore::Core::CpuStateFrame *Frame, int semid, struct sembuf *sops, size_t nsops) -> uint64_t { diff --git a/Source/Tests/LinuxSyscalls/x64/Signals.cpp b/Source/Tests/LinuxSyscalls/x64/Signals.cpp index 0a5d5c35a..66c14f3e8 100644 --- a/Source/Tests/LinuxSyscalls/x64/Signals.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Signals.cpp @@ -4,8 +4,10 @@ tags: LinuxSyscalls|syscalls-x86-64 $end_info$ */ +#include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/Syscalls/Thread.h" + #include "Tests/LinuxSyscalls/x64/Syscalls.h" #include diff --git a/Source/Tests/LinuxSyscalls/x64/Socket.cpp b/Source/Tests/LinuxSyscalls/x64/Socket.cpp index 88a8abef9..1f6ed3821 100644 --- a/Source/Tests/LinuxSyscalls/x64/Socket.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Socket.cpp @@ -6,7 +6,13 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" -#include + +#include +#include + +namespace FEXCore::Core { + struct CpuStateFrame; +} namespace FEX::HLE::x64 { void RegisterSocket() { diff --git a/Source/Tests/LinuxSyscalls/x64/Syscalls.cpp b/Source/Tests/LinuxSyscalls/x64/Syscalls.cpp index d3cb0d2d3..7180fcffb 100644 --- a/Source/Tests/LinuxSyscalls/x64/Syscalls.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Syscalls.cpp @@ -6,8 +6,8 @@ $end_info$ #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" +#include "Tests/LinuxSyscalls/x64/SyscallsEnum.h" -#include #include #include diff --git a/Source/Tests/LinuxSyscalls/x64/Thread.cpp b/Source/Tests/LinuxSyscalls/x64/Thread.cpp index dae5e3425..2f9c1cd0a 100644 --- a/Source/Tests/LinuxSyscalls/x64/Thread.cpp +++ b/Source/Tests/LinuxSyscalls/x64/Thread.cpp @@ -4,23 +4,23 @@ tags: LinuxSyscalls|syscalls-x86-64 $end_info$ */ +#include "Tests/LinuxSyscalls/SignalDelegator.h" #include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Thread.h" -#include "Tests/LinuxSyscalls/Syscalls/Thread.h" -#include -#include +#include #include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include #include -#include +#include namespace FEX::HLE::x64 { uint64_t SetThreadArea(FEXCore::Core::CpuStateFrame *Frame, void *tls) { diff --git a/Source/Tests/LinuxSyscalls/x64/Thread.h b/Source/Tests/LinuxSyscalls/x64/Thread.h index 413c9a633..9fc013dd8 100644 --- a/Source/Tests/LinuxSyscalls/x64/Thread.h +++ b/Source/Tests/LinuxSyscalls/x64/Thread.h @@ -8,7 +8,6 @@ $end_info$ #include namespace FEXCore::Core { -struct InternalThreadState; struct CpuStateFrame; } diff --git a/Source/Tests/TestHarnessRunner.cpp b/Source/Tests/TestHarnessRunner.cpp index f8d552bf5..ba7e933eb 100644 --- a/Source/Tests/TestHarnessRunner.cpp +++ b/Source/Tests/TestHarnessRunner.cpp @@ -6,28 +6,32 @@ $end_info$ */ #include "Common/ArgumentLoader.h" -#include "Common/EnvironmentLoader.h" #include "CommonCore/HostFactory.h" #include "HarnessHelpers.h" +#include "Tests/LinuxSyscalls/Syscalls.h" #include "Tests/LinuxSyscalls/x32/Syscalls.h" #include "Tests/LinuxSyscalls/x64/Syscalls.h" #include "Tests/LinuxSyscalls/SignalDelegator.h" #include -#include #include #include #include -#include -#include -#include #include #include -#include #include -#include +#include +#include +#include +#include +#include #include +#include + +namespace FEXCore::Core { + struct InternalThreadState; +} void MsgHandler(LogMan::DebugLevels Level, char const *Message) { const char *CharLevel{nullptr}; diff --git a/Source/Tests/UnitTestGenerator.cpp b/Source/Tests/UnitTestGenerator.cpp index aa5ce114d..3f84c925a 100644 --- a/Source/Tests/UnitTestGenerator.cpp +++ b/Source/Tests/UnitTestGenerator.cpp @@ -6,12 +6,18 @@ $end_info$ */ #include "Common/ArgumentLoader.h" -#include "Common/EnvironmentLoader.h" -#include "Common/Config.h" -#include "FEXCore/Config/Config.h" +#include +#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/Source/Tools/FEXGetConfig/Main.cpp b/Source/Tools/FEXGetConfig/Main.cpp index 11ce9cbdb..bb3dd1d2c 100644 --- a/Source/Tools/FEXGetConfig/Main.cpp +++ b/Source/Tools/FEXGetConfig/Main.cpp @@ -1,11 +1,12 @@ #include "ConfigDefines.h" #include "OptionParser.h" -#include "Common/Config.h" #include "Common/RootFSSetup.h" #include "git_version.h" #include #include +#include +#include int main(int argc, char **argv, char **envp) { FEXCore::Config::Initialize(); diff --git a/Source/Tools/FEXMountDaemon/Main.cpp b/Source/Tools/FEXMountDaemon/Main.cpp index 5df7994b2..17927746d 100644 --- a/Source/Tools/FEXMountDaemon/Main.cpp +++ b/Source/Tools/FEXMountDaemon/Main.cpp @@ -1,20 +1,22 @@ #include +#include #include #include #include #include #include +#include #include #include #include #include #include #include -#include #include #include -#include #include +#include +#include #include namespace { diff --git a/Source/Tools/Opt.cpp b/Source/Tools/Opt.cpp index aed5450ec..ffa41828e 100644 --- a/Source/Tools/Opt.cpp +++ b/Source/Tools/Opt.cpp @@ -5,11 +5,10 @@ desc: Unused $end_info$ */ +#include #include "Common/ArgumentLoader.h" -#include "Common/EnvironmentLoader.h" -#include "Common/Config.h" -#include +#include int main(int argc, char **argv, char **const envp) { FEXCore::Config::Initialize();