diff --git a/src/xenia/kernel/util/shim_utils.h b/src/xenia/kernel/util/shim_utils.h index 5717be1d9..460ef93b9 100644 --- a/src/xenia/kernel/util/shim_utils.h +++ b/src/xenia/kernel/util/shim_utils.h @@ -422,7 +422,7 @@ xe::cpu::Export* RegisterExport(R (*fn)(Ps&...), const char* name, static const auto export_entry = new cpu::Export( ORDINAL, xe::cpu::Export::Type::kFunction, name, tags | xe::cpu::ExportTag::kImplemented | xe::cpu::ExportTag::kLog); - static R (*FN)(Ps&...) = fn; + static R (*FN)(Ps & ...) = fn; struct X { static void Trampoline(PPCContext* ppc_context) { ++export_entry->function_data.call_count; @@ -455,7 +455,7 @@ xe::cpu::Export* RegisterExport(void (*fn)(Ps&...), const char* name, static const auto export_entry = new cpu::Export( ORDINAL, xe::cpu::Export::Type::kFunction, name, tags | xe::cpu::ExportTag::kImplemented | xe::cpu::ExportTag::kLog); - static void (*FN)(Ps&...) = fn; + static void (*FN)(Ps & ...) = fn; struct X { static void Trampoline(PPCContext* ppc_context) { ++export_entry->function_data.call_count; diff --git a/src/xenia/kernel/util/xex2.cc b/src/xenia/kernel/util/xex2.cc index 2525d6c39..dbbea04f3 100644 --- a/src/xenia/kernel/util/xex2.cc +++ b/src/xenia/kernel/util/xex2.cc @@ -854,20 +854,20 @@ int xe_xex2_load_pe(xe_xex2_ref xex) { return 1; } - // Linker version - likely 8+ - // Could be useful for recognizing certain patterns - // opthdr->MajorLinkerVersion; opthdr->MinorLinkerVersion; +// Linker version - likely 8+ +// Could be useful for recognizing certain patterns +// opthdr->MajorLinkerVersion; opthdr->MinorLinkerVersion; - // Data directories of interest: - // EXPORT IMAGE_EXPORT_DIRECTORY - // IMPORT IMAGE_IMPORT_DESCRIPTOR[] - // EXCEPTION IMAGE_CE_RUNTIME_FUNCTION_ENTRY[] - // BASERELOC - // DEBUG IMAGE_DEBUG_DIRECTORY[] - // ARCHITECTURE /IMAGE_ARCHITECTURE_HEADER/ ----- import thunks! - // TLS IMAGE_TLS_DIRECTORY - // IAT Import Address Table ptr - // opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_X].VirtualAddress / .Size +// Data directories of interest: +// EXPORT IMAGE_EXPORT_DIRECTORY +// IMPORT IMAGE_IMPORT_DESCRIPTOR[] +// EXCEPTION IMAGE_CE_RUNTIME_FUNCTION_ENTRY[] +// BASERELOC +// DEBUG IMAGE_DEBUG_DIRECTORY[] +// ARCHITECTURE /IMAGE_ARCHITECTURE_HEADER/ ----- import thunks! +// TLS IMAGE_TLS_DIRECTORY +// IAT Import Address Table ptr +// opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_X].VirtualAddress / .Size // The macros in pe_image.h don't work with clang, for some reason. // offsetof seems to be unable to find OptionalHeader. diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_audio.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_audio.cc index 7d93bbd4c..615cc5d19 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_audio.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_audio.cc @@ -7,13 +7,13 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/apu/audio_system.h" #include "xenia/base/logging.h" #include "xenia/emulator.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_crypt.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_crypt.cc index c5cf8c0ca..170a59781 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_crypt.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_crypt.cc @@ -7,11 +7,11 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" -#include "xenia/xbox.h" #include "third_party/crypto/TinySHA1.hpp" diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc index 64e7d466e..454038e88 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc @@ -7,13 +7,13 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/debugging.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" #include "xenia/kernel/xthread.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_hal.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_hal.cc index 658275483..b1426ee8d 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_hal.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_hal.cc @@ -7,11 +7,11 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc index 2ebc63258..bda239e48 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc @@ -7,6 +7,7 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/base/memory.h" #include "xenia/cpu/processor.h" @@ -18,7 +19,6 @@ #include "xenia/kernel/xiocompletion.h" #include "xenia/kernel/xthread.h" #include "xenia/vfs/device.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_misc.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_misc.cc index 8ef7664be..72a6e7882 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_misc.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_misc.cc @@ -7,12 +7,12 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" #include "xenia/kernel/xthread.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc index 80d78939f..614962081 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc @@ -7,6 +7,7 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/cpu/processor.h" #include "xenia/kernel/kernel_state.h" @@ -14,7 +15,6 @@ #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/util/xex2.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_ob.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_ob.cc index 15ee29804..4813792e5 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_ob.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_ob.cc @@ -7,6 +7,7 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" @@ -14,7 +15,6 @@ #include "xenia/kernel/xobject.h" #include "xenia/kernel/xsemaphore.h" #include "xenia/kernel/xthread.h" -#include "xenia/xbox.h" namespace xe { namespace kernel { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_usbcam.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_usbcam.cc index 28c85abb1..bda5d4b7a 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_usbcam.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_usbcam.cc @@ -7,11 +7,11 @@ ****************************************************************************** */ +#include "xenia/xbox.h" #include "xenia/base/logging.h" #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/util/shim_utils.h" #include "xenia/kernel/xboxkrnl/xboxkrnl_private.h" -#include "xenia/xbox.h" namespace xe { namespace kernel {