[PATCH 04/23] include: PPC64 relies on long calls being generated for thunks
André Hentschel
nerv at dawncrow.de
Sun Jan 31 11:34:14 CST 2021
From: Timothy Pearson <tpearson at raptorengineering.com>
Signed-off-by: André Hentschel <nerv at dawncrow.de>
---
include/msvcrt/corecrt.h | 3 +++
include/windef.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h
index 4adbe0920f6..7559d68ab79 100644
--- a/include/msvcrt/corecrt.h
+++ b/include/msvcrt/corecrt.h
@@ -83,6 +83,9 @@
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
+# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__)
+ /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */
+# define __stdcall __attribute__((__longcall__))
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
diff --git a/include/windef.h b/include/windef.h
index ac2ec619fbd..b69cbe51f6d 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -76,6 +76,9 @@ extern "C" {
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
+# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__)
+ /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */
+# define __stdcall __attribute__((__longcall__))
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
--
2.25.1
More information about the wine-devel
mailing list