Nikolay Sivov
c58a10c163
server: Implement inherited handles list.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 14:04:45 +02:00
Paul Gofman
ba2924a64d
ntdll/tests: Test named pipe with empty name.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 13:18:48 +02:00
Alexandre Julliard
9c8dce2155
ntdll: Don't lock mutexes during process exit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:41 +02:00
Alexandre Julliard
d8f7d54573
ntdll: Add inline wrappers for pthread mutex locking.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:25 +02:00
Jacek Caban
54e117018c
kernelbase: Use conhost to handle Unix consoles.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
0957f9302c
ntdll: Fill console size in get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
6bcc1b9225
ntdll: Pass RTL_USER_PROCESS_PARAMETERS to get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Francois Gouget
cdfec11e42
ntdll/tests: Fix the spelling of a couple of ok_() messages.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Francois Gouget
a9722145a8
ntdll: Fix the spelling of the arch_context_parameters variable.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Alexandre Julliard
a014f413d6
ntdll: Add support for loading a Unix helper library from builtin dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 13:41:28 +02:00
Sven Baars
123a4a884f
ntdll: Fix some memory leaks (Valgrind).
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:57:37 +02:00
Alexandre Julliard
2eed0cdb8f
include: Don't use IsBadStringPtr in debug functions for Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 15:13:42 +02:00
Martin Storsjo
2693e6662d
ntdll: Implement __C_specific_handler and _local_unwind for arm64.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-17 20:54:16 +02:00
Stefan Dösinger
4d33a0410e
ntdll: Use the MacOS file handle limit workaround from libs/wine/loader.c.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49624
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Alexandre Julliard
3cd3b77522
ntdll: Update argc when changing process name.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49834
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Alexandre Julliard
1dd3051cca
makefiles: Generate a single non-recursive makefile at the top level.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:39 +02:00
Chao Long
655ab7a84f
ntdll: Fix a ImagePathName memory leak (Valgrind).
...
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-10 21:56:34 +02:00
Chao Long
d0946955ec
ntdll: Fix a memory leak (Valgrind).
...
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:50 +02:00
Hans Leidekker
ec02224941
ntdll: Return buffer filled with random values from NtQuerySystemInformation(SystemInterruptInformation).
...
Based on a patch by Sebastian Lackner.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Alexandre Julliard
a204ad557d
makefiles: Expand makedep path at compile time.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Paul Gofman
7ec069d85f
ntdll/tests: Fix virtual test failures on win10pro.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:09:36 +02:00
Paul Gofman
0c857e92cb
ntdll/tests: Fix exception test failures on win10pro.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:09:31 +02:00
Martin Storsjo
3395ee3631
ntdll: Fix more corner cases for arm64 packed info unwinding.
...
Make sure to restore sp from fp for CR == 3.
Fix unwinding of partial prologues/epilogues - the previous logic
had an off-by-one for the pos/skip handling; fix a few more
corner cases with odd number of saved registers.
Functions with the H flag set (saving x0-x7 on the stack) should
be considred having 4 nops (for the instructions saving the
registers) in the prologue for unwind purposes. When unwinding
through a partial epilogue, the same 4 nops should also be
considered to be there (even though no sane epilogue would restore
the registers there) based on how windows handles partial epilogue
unwinding in those cases.
Uncomment prologue/epilogue cases in an existing test and add
tests for many more cases.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:08:26 +02:00
Alexandre Julliard
cc9d69b20b
ntdll: Pop the Unix stack completely in call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 21:16:49 +02:00
Martin Storsjo
36ebdfc6b6
ntdll: Add ARM64 SEH unwind directives for assembly functions in PE builds.
...
This fixes unwinding through RtlRaiseException and
call_consolidate_callback in PE builds.
Adjust the call_consolidate_callback function to store the whole
context on the stack, and use the seh "context" opcode for
unwinding to that context instead of the parent. Adjust the dwarf
escape codes for reading from the context on the stack.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:47:27 +02:00
Martin Storsjo
5bbd8130ad
ntdll: Don't truncate SP in arm64 handle_syscall_fault.
...
This seems to be a copypaste typo from 0b3db9dfa2
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:18 +02:00
Martin Storsjo
d99a454a6b
ntdll: Fix arm64 regression from "Clear the syscall frame on return".
...
The restoring of registers in call_user_exception_dispatcher
was broken in 75e616d52b
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:15 +02:00
Alexandre Julliard
2d91f7def1
ntdll: Load libwine dynamically.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 12:30:41 +02:00
Alexandre Julliard
4e80f2ea5e
ntdll: Add a helper function to try an mmap at a fixed address.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:54:17 +02:00
Alexandre Julliard
72b97eeba0
ntdll: Add a helper function for memory allocations through mmap().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:52:11 +02:00
Alexandre Julliard
74deee7df0
ntdll: Add a helper function for fixed anonymous mmaps.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:51:09 +02:00
Paul Gofman
61f3b3dcdf
ntdll/tests: Add tests for capturing context with xstate.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Paul Gofman
30e5250622
ntdll: Implement saving AVX registers in NtGetContextThread().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Alexandre Julliard
5b4b877488
ntdll: Move the reserved area functions to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
7b96e82fd5
ntdll: Make the reserved area functions static.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
4c45348f78
ntdll: Get rid of the exec_process() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:24:01 +02:00
Alexandre Julliard
f51cd0a1b5
ntdll: Use the process parameters directly in exec_process().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:09:33 +02:00
Alexandre Julliard
52e9baddbc
ntdll: Move the NT path conversion for exec process to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 14:46:14 +02:00
Alexandre Julliard
9e973954fd
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
This time without setting Eip to 0.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 18:40:08 +02:00
Alexandre Julliard
f7e4fd0cf8
kernel32: Remove the no longer used __wine_start_process() function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
c2c330532e
ntdll: Call the process entry point through RtlUserThreadStart().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
1a9558cf9b
ntdll: Call the thread entry point through BaseThreadInitThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Paul Gofman
81a08cea79
kernel32: Implement CopyContext().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:34:43 +02:00
Paul Gofman
85a33ff731
kernel32: Implement GetXStateFeaturesMask().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:47 +02:00
Paul Gofman
541b06747a
kernel32: Implement SetXStateFeaturesMask().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:44 +02:00
Louis Lenders
518d06404a
ntdll: RtlConvertToAutoInheritSecurityObject is NTSTATUS, not BOOL.
...
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 22:09:20 +02:00
Paul Gofman
8aa370e991
ntdll: Clear CONTEXT_XSTATE flag in RtlUnwindEx().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49749
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:07 +02:00
Paul Gofman
3803997349
ntdll: Implement RtlLocateLegacyContext().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman
ff88ed8b06
kernel32: Implement LocateXStateFeature().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman
2d544ff8a0
kernel32: Implement InitializeContext[2]().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman
2de4f12b33
ntdll: Implement RtlGetExtendedContextLength().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Alexandre Julliard
2b40969c58
kernel32: Move the initial process breakpoint to LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 11:36:24 +02:00
Alexandre Julliard
2b9a0550bc
Revert "ntdll: Get rid of the server_init_process_done() Unix library callback."
...
This partially reverts commit 1581fb619b
.
Steam wants Eip to be valid even before LdrInitializeThunk.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 21:08:45 +02:00
Alexandre Julliard
3863b243fe
ntdll: Clear the thread stack by hand instead of remapping zero pages.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:24:05 +02:00
Alexandre Julliard
75e616d52b
ntdll: Clear the syscall frame on return instead of popping the previous one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:14:35 +02:00
Alexandre Julliard
65c37cee24
ntdll: Use exported APIs instead of virtual_map_section() to load PE modules.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 14:16:54 +02:00
Alexandre Julliard
1581fb619b
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 13:04:09 +02:00
Martin Storsjo
a9639dd605
ntdll: Capture vector registers in arm64 RtlCaptureContext.
...
Since 5b3842451b
we set the flag indicating that the context
contained float registers, but we didn't actually populate them yet.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:44 +02:00
Martin Storsjo
99a6ae5b86
ntdll: Fix arm64 jump buffer float restoration.
...
Fix a typo in copying fields from the jump buffer to the context,
use the right type of long in the struct.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:44 +02:00
Alexandre Julliard
a8ddcf7dfe
ntdll: Use syscalls for a couple of Wine internal functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
af1a328fa0
ntdll: Use syscalls for the Wine version functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
482b64effd
ntdll: Use syscalls for the file path conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:57:19 +02:00
Alexandre Julliard
4e5811637a
ntdll: Use syscalls for the server functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:55:40 +02:00
Martin Storsjo
a12e308eba
ntdll/tests: Add a larger testcase covering most arm64 unwinding opcodes.
...
These all seem to be implemented correctly as no changes to the
wine implementation is needed.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo
bc3284f818
ntdll: Implement the arm64 machine frame and context unwind opcodes.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo
41d1fd3229
ntdll/tests: Support testing float registers in the arm64 virtual unwind test.
...
Only testing d0-d15, not d16-d31, for keeping the test references
a bit smaller.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo
8c0c70dd0f
ntdll/tests: Add defines for the complete set of arm64 unwidning opcodes.
...
Also correct the previous definition of UWOP_NOP which was a typo
(but it wasn't used in any testcase yet).
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:21:07 +02:00
Martin Storsjo
a729af0e9c
ntdll: Set handler_data correctly in arm64 RtlVirtualUnwind.
...
This matches what tests show is done on actual windows, in the
current testcases; in all currently tested cases, handler_data is
reset to NULL when no handler is returned.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:21:01 +02:00
Zebediah Figura
aaea13a128
server: Report named pipe device files as type "File".
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Arkadiusz Hiler
9012096b47
Revert "ntdll/tests: Add test to check if GetTickCount is updated after sleeping.".
...
This reverts commit 4617f83fcf
.
The assumption that GetTickCount() gets updated after Sleep(1) holds only
when there is no other software running on the system. If any program uses
timeBeginPeriod() with values 1-15 then this assumption breaks.
A lot of common user software calls timeBeginPeriod() - this includes browsers,
media players, voice communicators, IDEs and store fronts.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
97847eeee8
ntdll: Avoid referencing winecrt0 exception handlers from the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
6844ff8a0b
ntdll: Stop resolving imports for the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
0b3db9dfa2
ntdll: Handle page faults happening during a syscall without dispatching the exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:46:22 +02:00
Zebediah Figura
8bd95a80f2
ntdll: Read the condition variable and manipulate the lock on the PE side.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49712
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:17:04 +02:00
Paul Gofman
057e7f1940
ntdll: Also save unwind info for rbp in call_consolidate_callback() on x64.
...
Fixes Bloons TD 6 crash on start.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:16:40 +02:00
Martin Storsjo
32c618b7c5
ntdll: Add initial tests for arm64 RtlVirtualUnwind.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:16:03 +02:00
Paul Gofman
601175822e
ntdll: Restore AVX registers in NtSetContextThread() on i386.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:39 +02:00
Paul Gofman
9aa885bf37
ntdll: Support AVX context in fault exceptions on Linux i386.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman
2c3719c7a9
ntdll: Restore AVX registers in NtSetContextThread() on x86_64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman
16ed88a952
ntdll: Support AVX context in fault exceptions on Linux x86_64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman
3f562e0b91
ntdll/tests: Add test for xstate in extended context.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:36:49 +02:00
Martin Storsjo
5b3842451b
include: Update ARM64 context flag definitions to match current SDKs.
...
CONTEXT_FLOATING_POINT should be included in CONTEXT_FULL, and
there's a new flag CONTEXT_ARM64_X18 (not available without
the arch specific prefix) that only is part of CONTEXT_ALL.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:01:56 +02:00
Paul Gofman
a4af2b2b70
kernel32: Implement GetEnabledXStateFeatures().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 21:14:15 +02:00
Paul Gofman
97b5ad7597
wineboot: Initialize XState features in user_shared_data.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:50:02 +02:00
Paul Gofman
de1cb029f6
include: Define _XSAVE_FORMAT structure.
...
The structure is defined for both x86_64 and i386 (along with
M128A) in (newer) Windows SDK.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:38 +02:00
Paul Gofman
25d4c50db3
ntdll: Remove redundant ldmxcsr in set_full_cpu_context() on x86_64.
...
Mxcsr will be overwritten anyway by consequent fxrstor.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:26 +02:00
Alexandre Julliard
77fbf3a9fd
ntdll: Unwind the syscall frame in NtSetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
a686759f1d
ntdll: Unwind the syscall frame when calling KiUserApcDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
53e0bf2f9f
ntdll: Don't expect LdrInitializeThunk() to return to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
4a7cd0f492
ntdll: Call NtContinue() from LdrInitializeThunk() instead of returning.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:23:44 +02:00
Paul Gofman
f332f2e4e2
ntdll: Don't transfer xmm registers explicitly during context save and restore on x64.
...
fxsave / fxrstor already do that.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:16:57 +02:00
Paul Gofman
525e7078a8
ntdll: Report newer vector processor features on x86 / x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:15:45 +02:00
Martin Storsjo
8f3bd63b52
ntdll: Fix arm64 sigcontext access for darwin.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:39 +02:00
Martin Storsjo
7f8224411c
ntdll: Fix the arm64 use of libunwind for macOS.
...
MacOS uses the LLVM libunwind, which doesn't expose quite as much
internals of the cursor as GNU libunwind, and uses slightly different
names for the arch specific register enums (for get/set registers).
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:34 +02:00
Martin Storsjo
cffd06ea67
ntdll: Trust libunwind's returned pc value on arm64.
...
Use this instead of manually copying LR to PC. With GNU libunwind,
both registers are equal after unw_step.
With the LLVM libunwind (which Apple uses), the return address isn't
reflected at all in LR, only in UNW_REG_IP.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:32:27 +02:00
Serge Gautherie
743ed29af5
winapi_test: Update generated.c files.
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:03 +02:00
Martin Storsjo
e8f2c2464a
ntdll: Only call putenv() if we are going to call exec().
...
If we aren't going to exec (if pre_exec() returns zero), we will
continue using the envp pointer we got from the caller. However,
the putenv() call does update the environment, and this can in
some cases overwrite the array that the old (stale, potentially
dangling) envp pointer points to.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:02 +02:00
Martin Storsjo
00b4a51fcc
ntdll: Remove a stray duplicate instruction.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Paul Gofman
71090bdc2f
ntdll: Don't mind epilog in RtlVirtualUnwind() in case of zero op count on x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Paul Gofman
ae07938ba6
ntdll: Support nested exceptions on x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00