Rebase against 976c2aa649a526188afd9c0647869ccc82068341.

This commit is contained in:
Sebastian Lackner 2017-07-26 23:45:35 +02:00
parent 2e99d9e465
commit 9f5d2cab05
6 changed files with 185 additions and 139 deletions

View File

@ -1,98 +1,115 @@
From 4a1a9adcee0e4c3bf81437ebd0a1361ac2b8ce3d Mon Sep 17 00:00:00 2001
From 24730a3c3015b70bbf0685653c44dcbd768f4fd5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 10 Apr 2015 07:51:16 +0200
Subject: msvcrt: Calculate sinh/cosh/exp/pow with higher precision. (v2)
Based on a patch by Zheng Chen.
---
dlls/msvcrt/math.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
dlls/msvcrt/math.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 59 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 7c971d3..0e62215 100644
index 079446d04ed..924e3432881 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -393,8 +393,19 @@ double CDECL MSVCRT_cos( double x )
*/
@@ -59,6 +59,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
static BOOL sse2_supported;
static BOOL sse2_enabled;
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+
+static inline double precise_cosh( double x )
+{
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = cosh( x );
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+}
+
+static inline double precise_exp( double x )
+{
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = exp( x );
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+}
+
+static inline double precise_pow( double x, double y )
+{
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = pow( x, y );
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+}
+
+static inline double precise_sinh( double x )
+{
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = sinh( x );
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+}
+
+#else
+
+#define precise_cosh cosh
+#define precise_exp exp
+#define precise_pow pow
+#define precise_sinh sinh
+
+#endif
+
void msvcrt_init_math(void)
{
sse2_supported = sse2_enabled = IsProcessorFeaturePresent( PF_XMMI64_INSTRUCTIONS_AVAILABLE );
@@ -398,7 +453,7 @@ double CDECL MSVCRT_cos( double x )
double CDECL MSVCRT_cosh( double x )
{
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = cosh(x);
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+#else
if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
return cosh(x);
+#endif
- return cosh(x);
+ return precise_cosh(x);
}
/*********************************************************************
@@ -402,8 +413,19 @@ double CDECL MSVCRT_cosh( double x )
@@ -406,7 +461,7 @@ double CDECL MSVCRT_cosh( double x )
*/
double CDECL MSVCRT_exp( double x )
{
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ if (isnan(x)) *MSVCRT__errno() = MSVCRT_EDOM;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = exp(x);
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+#else
- double ret = exp(x);
+ double ret = precise_exp(x);
if (isnan(x)) *MSVCRT__errno() = MSVCRT_EDOM;
return exp(x);
+#endif
}
/*********************************************************************
@@ -441,9 +463,20 @@ double CDECL MSVCRT_log10( double x )
else if (isfinite(x) && !isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
return ret;
@@ -447,7 +502,7 @@ double CDECL MSVCRT_log10( double x )
double CDECL MSVCRT_pow( double x, double y )
{
/* FIXME: If x < 0 and y is not integral, set EDOM */
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = pow(x,y);
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ if (!isfinite(z)) *MSVCRT__errno() = MSVCRT_EDOM;
+ return z;
+#else
double z = pow(x,y);
- double z = pow(x,y);
+ double z = precise_pow(x, y);
if (!isfinite(z)) *MSVCRT__errno() = MSVCRT_EDOM;
return z;
+#endif
}
/*********************************************************************
@@ -460,8 +493,19 @@ double CDECL MSVCRT_sin( double x )
*/
@@ -467,7 +522,7 @@ double CDECL MSVCRT_sin( double x )
double CDECL MSVCRT_sinh( double x )
{
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ WORD precise_cw = 0x37f, pre_cw;
+ double z;
+ if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
+ __asm__ __volatile__( "fnstcw %0" : "=m" (pre_cw) );
+ __asm__ __volatile__( "fldcw %0" : : "m" (precise_cw) );
+ z = sinh(x);
+ __asm__ __volatile__( "fldcw %0" : : "m" (pre_cw) );
+ return z;
+#else
if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
return sinh(x);
+#endif
- return sinh(x);
+ return precise_sinh(x);
}
/*********************************************************************
--
2.3.7
2.13.1

View File

@ -0,0 +1,33 @@
From 9701b29e87bc913b95e26ec8f7d26ba404dc1bce Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 26 Jul 2017 23:44:32 +0200
Subject: ntdll: Add back SS segment prefixes in set_full_cpu_context.
---
dlls/ntdll/signal_i386.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index bee08275340..75c6654a7f5 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1274,12 +1274,16 @@ __ASM_GLOBAL_FUNC( set_full_cpu_context,
"movl 0xc4(%ecx),%eax\n\t" /* Esp */
"leal -4*4(%eax),%eax\n\t"
"movl 0xc0(%ecx),%edx\n\t" /* EFlags */
+ ".byte 0x36\n\t"
"movl %edx,3*4(%eax)\n\t"
"movl 0xbc(%ecx),%edx\n\t" /* SegCs */
+ ".byte 0x36\n\t"
"movl %edx,2*4(%eax)\n\t"
"movl 0xb8(%ecx),%edx\n\t" /* Eip */
+ ".byte 0x36\n\t"
"movl %edx,1*4(%eax)\n\t"
"movl 0xb0(%ecx),%edx\n\t" /* Eax */
+ ".byte 0x36\n\t"
"movl %edx,0*4(%eax)\n\t"
"pushl 0x98(%ecx)\n\t" /* SegDs */
"movl 0xa8(%ecx),%edx\n\t" /* Edx */
--
2.13.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "4a70f67ffcc57e82c22cc349da01d3aa5db84c71"
echo "976c2aa649a526188afd9c0647869ccc82068341"
}
# Show version information
@ -292,6 +292,7 @@ patch_enable_all ()
enable_ntdll_Zero_mod_name="$1"
enable_ntdll__aulldvrm="$1"
enable_ntdll_call_thread_func_wrapper="$1"
enable_ntdll_set_full_cpu_context="$1"
enable_ntdll_x86_64_ExceptionInformation="$1"
enable_ntoskrnl_DriverTest="$1"
enable_ntoskrnl_Stubs="$1"
@ -1141,6 +1142,9 @@ patch_enable ()
ntdll-call_thread_func_wrapper)
enable_ntdll_call_thread_func_wrapper="$2"
;;
ntdll-set_full_cpu_context)
enable_ntdll_set_full_cpu_context="$2"
;;
ntdll-x86_64_ExceptionInformation)
enable_ntdll_x86_64_ExceptionInformation="$2"
;;
@ -6779,6 +6783,18 @@ if test "$enable_ntdll_call_thread_func_wrapper" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-set_full_cpu_context
# |
# | Modified files:
# | * dlls/ntdll/signal_i386.c
# |
if test "$enable_ntdll_set_full_cpu_context" -eq 1; then
patch_apply ntdll-set_full_cpu_context/0001-ntdll-Add-back-SS-segment-prefixes-in-set_full_cpu_c.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Add back SS segment prefixes in set_full_cpu_context.", 1 },';
) >> "$patchlist"
fi
# Patchset nvcuda-CUDA_Support
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,69 +1,48 @@
From cd7620bf0752a46d6f29d24e7dc173a87bb6aa01 Mon Sep 17 00:00:00 2001
From 6e095ddd83997fe8e1389d1b29471d20526f56f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 6 May 2017 00:10:01 +0200
Subject: server: Reset debug registers when creating threads.
---
dlls/ntdll/tests/exception.c | 29 ++++++++++++++++++++++++-----
dlls/ntdll/tests/exception.c | 10 +++++-----
server/thread.c | 6 ++++++
2 files changed, 30 insertions(+), 5 deletions(-)
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index ab4b3e42941..cf3b235b2f3 100644
index e24bd54f00c..ab193267528 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -2002,8 +2002,23 @@ static void test___C_specific_handler(void)
#if defined(__i386__) || defined(__x86_64__)
-static DWORD WINAPI dummy_thread(void *arg)
+static DWORD WINAPI register_check_thread(void *arg)
{
+ NTSTATUS status;
+ CONTEXT ctx;
+
+ memset(&ctx, 0, sizeof(ctx));
+ ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
+
+ status = pNtGetContextThread(GetCurrentThread(), &ctx);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
+ ok(!ctx.Dr0, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr0);
+ ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
+ ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
+ ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
+ ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
+ ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
+
return 0;
}
@@ -2060,8 +2075,10 @@ static void test_debug_registers(void)
ctx.Dr7 = 0x00000400;
status = pNtSetContextThread(GetCurrentThread(), &ctx);
ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", status);
- thread = CreateThread(NULL, 0, dummy_thread, NULL, CREATE_SUSPENDED, NULL);
+
+ thread = CreateThread(NULL, 0, register_check_thread, NULL, CREATE_SUSPENDED, NULL);
ok(thread != INVALID_HANDLE_VALUE, "CreateThread failed with %d\n", GetLastError());
+
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(thread, &ctx);
ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
@@ -2069,9 +2086,11 @@ static void test_debug_registers(void)
@@ -905,7 +905,7 @@ static void test_exceptions(void)
res = pNtGetContextThread( h, &ctx );
ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res );
ok( ctx.Dr0 == 0, "dr0 %x\n", ctx.Dr0 );
- todo_wine ok( ctx.Dr7 == 0, "dr7 %x\n", ctx.Dr7 );
+ ok( ctx.Dr7 == 0, "dr7 %x\n", ctx.Dr7 );
ctx.Dr0 = (DWORD)code_mem;
ctx.Dr7 = 3;
res = pNtSetContextThread( h, &ctx );
@@ -2181,8 +2181,8 @@ static DWORD WINAPI register_check_thread(void *arg)
ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
- todo_wine ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
- todo_wine ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
- TerminateThread(thread, 0);
+ ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
+ ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
+
+ ResumeThread(thread);
+ WaitForSingleObject(thread, INFINITE);
CloseHandle(thread);
}
return 0;
}
@@ -2251,8 +2251,8 @@ static void test_debug_registers(void)
ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
- todo_wine ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
- todo_wine ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
+ ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
+ ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
ResumeThread(thread);
WaitForSingleObject(thread, 10000);
diff --git a/server/thread.c b/server/thread.c
index 211d0050b09..933eb35e07c 100644
--- a/server/thread.c

View File

@ -1,11 +1,11 @@
From fce736fd0ec3a9d497cbbe4cd7ac7a6ca146f544 Mon Sep 17 00:00:00 2001
From d90e665acff3eb52f000d00fc846f8be6be3a751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 11 May 2017 05:32:55 +0200
Subject: winebuild: Generate syscall thunks for ntdll exports.
Based on a patch by Erich E. Hoover.
---
dlls/ntdll/signal_i386.c | 5 +++-
dlls/ntdll/signal_i386.c | 6 +++-
dlls/ntdll/tests/exception.c | 2 ++
include/winternl.h | 2 +-
tools/winebuild/build.h | 6 ++++
@ -14,22 +14,23 @@ Based on a patch by Erich E. Hoover.
tools/winebuild/spec16.c | 22 +-------------
tools/winebuild/spec32.c | 68 ++++++++++++++++++++++++++++++++++++++++++++
tools/winebuild/utils.c | 21 ++++++++++++++
9 files changed, 168 insertions(+), 27 deletions(-)
9 files changed, 169 insertions(+), 27 deletions(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index ef45e37c5fd..d015c4ea831 100644
index 09a37f242f1..6a37bd68228 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -481,6 +481,8 @@ static wine_signal_handler handlers[256];
@@ -480,6 +480,9 @@ static wine_signal_handler handlers[256];
static BOOL fpux_support; /* whether the CPU supports extended fpu context */
extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context );
+extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
+extern NTSTATUS WINAPI __syscall_NtGetContextThread( HANDLE handle, CONTEXT *context );
+
enum i386_trap_code
{
@@ -1499,7 +1501,7 @@ NTSTATUS CDECL __regs_NtGetContextThread( DWORD edi, DWORD esi, DWORD ebx, DWORD
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
@@ -1553,7 +1556,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
{
context->Ebp = ebp;
context->Esp = (DWORD)&retaddr;
@ -38,7 +39,7 @@ index ef45e37c5fd..d015c4ea831 100644
context->SegCs = wine_get_cs();
context->SegSs = wine_get_ss();
context->EFlags = eflags;
@@ -2469,6 +2471,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
@@ -2488,6 +2491,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
*teb = addr;
(*teb)->Tib.Self = &(*teb)->Tib;
(*teb)->Tib.ExceptionList = (void *)~0UL;
@ -47,10 +48,10 @@ index ef45e37c5fd..d015c4ea831 100644
if (!(thread_data->fs = wine_ldt_alloc_fs()))
{
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 90490871f36..f614ef0edb8 100644
index 7cb704c2644..ac57f8de667 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1544,6 +1544,8 @@ static void test_thread_context(void)
@@ -1569,6 +1569,8 @@ static void test_thread_context(void)
ok( (char *)context.Eip >= (char *)pNtGetContextThread - 0x10000 &&
(char *)context.Eip <= (char *)pNtGetContextThread + 0x10000,
"wrong Eip %08x/%08x\n", context.Eip, (DWORD)pNtGetContextThread );
@ -60,10 +61,10 @@ index 90490871f36..f614ef0edb8 100644
ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
diff --git a/include/winternl.h b/include/winternl.h
index 404730ddbb6..b1871e689fa 100644
index 52087b1bd85..5e38f853b76 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -323,7 +323,7 @@ typedef struct _TEB
@@ -322,7 +322,7 @@ typedef struct _TEB
PVOID CsrClientThread; /* 03c/0070 */
PVOID Win32ThreadInfo; /* 040/0078 */
ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
@ -73,7 +74,7 @@ index 404730ddbb6..b1871e689fa 100644
ULONG FpSoftwareStatusRegister; /* 0c8/010c */
PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 398d54200c7..e338c9c8024 100644
index f01ae4f04ff..588fbfb7f05 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -102,6 +102,7 @@ typedef struct
@ -108,7 +109,7 @@ index 398d54200c7..e338c9c8024 100644
#define FLAG_CPU(cpu) (0x01000 << (cpu))
#define FLAG_CPU_MASK (FLAG_CPU(CPU_LAST + 1) - FLAG_CPU(0))
@@ -313,6 +317,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
@@ -312,6 +316,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
extern int parse_spec_file( FILE *file, DLLSPEC *spec );
extern int parse_def_file( FILE *file, DLLSPEC *spec );
@ -158,10 +159,10 @@ index e7bad72c37b..cc8c422a33c 100644
}
}
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index 2762a8cd10e..402c0d60368 100644
index ad996547a5b..c4b9abfc9fc 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -507,6 +507,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
@@ -519,6 +519,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
}
@ -186,7 +187,7 @@ index 2762a8cd10e..402c0d60368 100644
/*******************************************************************
* parse_spec_ordinal
*
@@ -575,6 +593,14 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
@@ -587,6 +605,14 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
assert( 0 );
}
@ -201,7 +202,7 @@ index 2762a8cd10e..402c0d60368 100644
if ((odp->flags & FLAG_CPU_MASK) && !(odp->flags & FLAG_CPU(target_cpu)))
{
/* ignore this entry point */
@@ -771,6 +797,37 @@ static void assign_ordinals( DLLSPEC *spec )
@@ -783,6 +809,37 @@ static void assign_ordinals( DLLSPEC *spec )
}
@ -239,7 +240,7 @@ index 2762a8cd10e..402c0d60368 100644
/*******************************************************************
* add_16bit_exports
*
@@ -872,6 +929,8 @@ int parse_spec_file( FILE *file, DLLSPEC *spec )
@@ -884,6 +941,8 @@ int parse_spec_file( FILE *file, DLLSPEC *spec )
current_line = 0; /* no longer parsing the input file */
assign_names( spec );
assign_ordinals( spec );
@ -289,10 +290,10 @@ index 85bcf099999..54aad5d95b4 100644
entry_point->u.func.nb_args = 0;
assert( !spec->ordinals[0] );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 39733b2b0b5..b1e71ef99be 100644
index 4a01238e0fb..e4bc1c603b2 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -311,6 +311,73 @@ static void output_relay_debug( DLLSPEC *spec )
@@ -299,6 +299,73 @@ static void output_relay_debug( DLLSPEC *spec )
}
/*******************************************************************
@ -366,7 +367,7 @@ index 39733b2b0b5..b1e71ef99be 100644
* output_exports
*
* Output the export table for a Win32 module.
@@ -660,6 +727,7 @@ void BuildSpec32File( DLLSPEC *spec )
@@ -648,6 +715,7 @@ void BuildSpec32File( DLLSPEC *spec )
resolve_imports( spec );
output_standard_file_header();
output_module( spec );

View File

@ -1,4 +1,4 @@
From 8b6289e7db2f6ac871aa46afa2177285d0e48760 Mon Sep 17 00:00:00 2001
From b96844dcc3a0845422e8392614e41148241f54ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 8 Jun 2017 23:38:38 +0200
Subject: win32k.sys: Add stub driver.
@ -85,7 +85,7 @@ index 00000000000..a1ec2d4fa3f
+}
diff --git a/dlls/win32k.sys/win32k.sys.spec b/dlls/win32k.sys/win32k.sys.spec
new file mode 100644
index 00000000000..6a01143f408
index 00000000000..c79439151e4
--- /dev/null
+++ b/dlls/win32k.sys/win32k.sys.spec
@@ -0,0 +1,246 @@
@ -296,7 +296,7 @@ index 00000000000..6a01143f408
+@ stub RtlRestoreContext
+@ stdcall RtlUnicodeToMultiByteN(ptr long ptr ptr long) ntoskrnl.exe.RtlUnicodeToMultiByteN
+@ stdcall RtlUnicodeToMultiByteSize(ptr ptr long) ntoskrnl.exe.RtlUnicodeToMultiByteSize
+@ stdcall -register RtlUnwind(ptr ptr ptr ptr) ntoskrnl.exe.RtlUnwind
+@ stdcall -norelay RtlUnwind(ptr ptr ptr ptr) ntoskrnl.exe.RtlUnwind
+@ stdcall -arch=x86_64 RtlUnwindEx(ptr ptr ptr ptr ptr ptr) ntoskrnl.exe.RtlUnwindEx
+@ stdcall RtlUpcaseUnicodeChar(long) ntoskrnl.exe.RtlUpcaseUnicodeChar
+@ stdcall RtlUpcaseUnicodeToMultiByteN(ptr long ptr ptr long) ntoskrnl.exe.RtlUpcaseUnicodeToMultiByteN