Skip to content

Commit

Permalink
Revert "include: Don't align the stack for PE builds."
Browse files Browse the repository at this point in the history
This reverts commit 87fbf33.

We saw hangs in Phasmophobia with the commit, and then discovered this commit is
not strictly necessary for ntlea, so we revert it.
  • Loading branch information
Yuxuan Shui authored and ivyl committed Sep 29, 2023
1 parent 4fb9230 commit 95ebcfa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
9 changes: 6 additions & 3 deletions include/msvcrt/corecrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#define __has_attribute(x) 0
#endif

#if !defined(_MSC_VER) && !defined(__MINGW32__)
#ifndef _MSC_VER
# undef __stdcall
# ifdef __i386__
# ifdef __GNUC__
Expand All @@ -100,13 +100,16 @@
# else
# define __stdcall __attribute__((ms_abi))
# endif
# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__CYGWIN__)
# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
#endif /* __stdcall */

#ifndef _MSC_VER
# undef __cdecl
# if defined(__i386__) && defined(__GNUC__)
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
Expand All @@ -117,7 +120,7 @@
# else
# define __cdecl __stdcall
# endif
#endif /* _MSC_VER || __MINGW32__ */
#endif

#if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
# include <stdarg.h>
Expand Down
23 changes: 14 additions & 9 deletions include/windef.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern "C" {
# endif
#endif

#if !defined(_MSC_VER) && !defined(__MINGW32__)
#ifndef _MSC_VER
# undef __stdcall
# ifdef __i386__
# ifdef __GNUC__
Expand All @@ -72,13 +72,16 @@ extern "C" {
# else
# define __stdcall __attribute__((ms_abi))
# endif
# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__CYGWIN__)
# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
#endif /* __stdcall */

#ifndef _MSC_VER
# undef __cdecl
# if defined(__i386__) && defined(__GNUC__)
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
Expand All @@ -89,13 +92,15 @@ extern "C" {
# else
# define __cdecl __stdcall
# endif
# ifndef __fastcall
# define __fastcall __stdcall
# endif
# ifndef __thiscall
# define __thiscall __stdcall
# endif
#endif /* _MSC_VER || __MINGW32__ */
#endif

#if !defined(_MSC_VER) && !defined(__fastcall)
# define __fastcall __stdcall
#endif

#if (!defined(_MSC_VER) || !defined(__clang__)) && !defined(__thiscall)
# define __thiscall __stdcall
#endif

#ifndef __ms_va_list
# if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
Expand Down

0 comments on commit 95ebcfa

Please sign in to comment.