From c0fb300a05c56d27921513c4aa4d8c407396db68 Mon Sep 17 00:00:00 2001 From: Joel Linn Date: Fri, 21 May 2021 00:23:16 +0200 Subject: [PATCH] [Kernel] Remove explicit SHIM calling convention Shim exports are called from GuestToHostThunk which dictates the calling convention. The default system calling convention is different depending on OS (Windows vs. everything else) and architecture. PR #1339 addresses this for x64 Linux. There is no reason for explicit `__cdecl`. Also, it is not available in GCC. We could use `__attribute__((ms_abi))` or `__attribute__((sysv_abi))` but that just adds complexity. --- src/xenia/kernel/util/shim_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/kernel/util/shim_utils.h b/src/xenia/kernel/util/shim_utils.h index 405cdda95..964845be9 100644 --- a/src/xenia/kernel/util/shim_utils.h +++ b/src/xenia/kernel/util/shim_utils.h @@ -29,7 +29,7 @@ namespace kernel { using PPCContext = xe::cpu::ppc::PPCContext; -#define SHIM_CALL void __cdecl +#define SHIM_CALL void #define SHIM_SET_MAPPING(library_name, export_name, shim_data) \ export_resolver->SetFunctionMapping( \ library_name, ordinals::export_name, \