Alexandre Julliard : include: Use the hard-float calling convention for Windows APIs on ARM

Alexandre Julliard julliard at winehq.org
Thu Nov 2 17:28:48 CDT 2017


Module: wine
Branch: master
Commit: 644f497e87c51f1a1c62b26ea9f588e7bc97d13b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=644f497e87c51f1a1c62b26ea9f588e7bc97d13b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Nov  2 10:22:56 2017 +0100

include: Use the hard-float calling convention for Windows APIs on ARM

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msvcrt/crtdefs.h | 10 +++++++++-
 include/windef.h         | 11 ++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h
index 9ec2082..ff0f4bd 100644
--- a/include/msvcrt/crtdefs.h
+++ b/include/msvcrt/crtdefs.h
@@ -60,6 +60,8 @@
 #  else
 #   define __stdcall __attribute__((ms_abi))
 #  endif
+# elif defined(__arm__) && defined (__GNUC__)
+#   define __stdcall __attribute__((pcs("aapcs-vfp")))
 # else  /* __i386__ */
 #  define __stdcall
 # endif  /* __i386__ */
@@ -78,6 +80,8 @@
 #  else
 #   define __cdecl __attribute__((ms_abi))
 #  endif
+# elif defined(__arm__) && defined (__GNUC__)
+#   define __cdecl __attribute__((pcs("aapcs-vfp")))
 # elif !defined(_MSC_VER)
 #  define __cdecl
 # endif
@@ -102,7 +106,11 @@
 #endif
 
 #ifndef WINAPIV
-# define WINAPIV __cdecl
+# if defined(__arm__) && defined (__GNUC__)
+#  define WINAPIV __attribute__((pcs("aapcs")))
+# else
+#  define WINAPIV __cdecl
+# endif
 #endif
 
 #ifndef DECLSPEC_ALIGN
diff --git a/include/windef.h b/include/windef.h
index e77b1ca..d2afcf4 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -69,6 +69,8 @@ extern "C" {
 #  else
 #   define __stdcall __attribute__((ms_abi))
 #  endif
+# elif defined(__arm__) && defined (__GNUC__)
+#   define __stdcall __attribute__((pcs("aapcs-vfp")))
 # else  /* __i386__ */
 #  define __stdcall
 # endif  /* __i386__ */
@@ -87,6 +89,8 @@ extern "C" {
 #  else
 #   define __cdecl __attribute__((ms_abi))
 #  endif
+# elif defined(__arm__) && defined (__GNUC__)
+#   define __cdecl __attribute__((pcs("aapcs-vfp")))
 # elif !defined(_MSC_VER)
 #  define __cdecl
 # endif
@@ -110,6 +114,12 @@ extern "C" {
 # endif
 #endif
 
+#if defined(__arm__) && defined (__GNUC__)
+# define WINAPIV __attribute__((pcs("aapcs")))
+#else
+# define WINAPIV __cdecl
+#endif
+
 #ifdef __WINESRC__
 #define __ONLY_IN_WINELIB(x)	do_not_use_this_in_wine
 #else
@@ -179,7 +189,6 @@ extern "C" {
 #define PASCAL      __stdcall
 #define CDECL       __cdecl
 #define _CDECL      __cdecl
-#define WINAPIV     __cdecl
 #define APIENTRY    WINAPI
 #define CONST       __ONLY_IN_WINELIB(const)
 




More information about the wine-cvs mailing list