https://git.reactos.org/?p=reactos.git;a=commitdiff;h=719c13083f2db9b3637414...
commit 719c13083f2db9b363741489955ccd337a8001fc Author: winesync ros-dev@reactos.org AuthorDate: Fri Sep 11 15:55:24 2020 +0200 Commit: Jérôme Gardou jerome.gardou@reactos.org CommitDate: Wed Sep 16 10:35:39 2020 +0200
[WINESYNC] dbghelp: Avoid using inline assembly in do_x86cpuid().
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id b7f3e6ba317bec299e43156efcdb5469f39a8a3c by Zebediah Figura z.figura12@gmail.com --- dll/win32/dbghelp/minidump.c | 36 +++++++++++++++++++++++++----------- sdk/tools/winesync/dbghelp.cfg | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/dll/win32/dbghelp/minidump.c b/dll/win32/dbghelp/minidump.c index 975bb45c9a4..d01b44484b8 100644 --- a/dll/win32/dbghelp/minidump.c +++ b/dll/win32/dbghelp/minidump.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include "config.h" #include <time.h>
#define NONAMELESSUNION @@ -542,20 +543,33 @@ static unsigned dump_modules(struct dump_context* dc, BOOL dump_elf) return sz; }
-/* Calls cpuid with an eax of 'ax' and returns the 16 bytes in *p - * We are compiled with -fPIC, so we can't clobber ebx. - */ -static inline void do_x86cpuid(unsigned int ax, unsigned int *p) +#ifdef __i386__ +#ifndef __REACTOS__ +extern void do_x86cpuid(unsigned int ax, unsigned int *p); +__ASM_GLOBAL_FUNC( do_x86cpuid, + "pushl %esi\n\t" + "pushl %ebx\n\t" + "movl 12(%esp),%eax\n\t" + "movl 16(%esp),%esi\n\t" + "cpuid\n\t" + "movl %eax,(%esi)\n\t" + "movl %ebx,4(%esi)\n\t" + "movl %ecx,8(%esi)\n\t" + "movl %edx,12(%esi)\n\t" + "popl %ebx\n\t" + "popl %esi\n\t" + "ret" ) +#else +static void do_x86cpuid(unsigned int ax, unsigned int *p) { -#if defined(__GNUC__) && defined(__i386__) - __asm__("pushl %%ebx\n\t" - "cpuid\n\t" - "movl %%ebx, %%esi\n\t" - "popl %%ebx" - : "=a" (p[0]), "=S" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (ax)); + __cpuid((int*)p, ax); +} #endif +#else +static void do_x86cpuid(unsigned int ax, unsigned int *p) +{ } +#endif
/* From xf86info havecpuid.c 1.11 */ static inline int have_x86cpuid(void) diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg index 0db6fe0d30d..9bc1bc767d6 100644 --- a/sdk/tools/winesync/dbghelp.cfg +++ b/sdk/tools/winesync/dbghelp.cfg @@ -4,4 +4,4 @@ files: include/dbghelp.h: sdk/include/psdk/dbghelp.h include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h tags: - wine: 74f425e70dfbc43da1eaf9048f45bed52ef1d66c + wine: b7f3e6ba317bec299e43156efcdb5469f39a8a3c