Alexandre Julliard
d969d02e21
tools: Move target CPU and platform handling to the common tools.h header.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:50:30 +01:00
Alexandre Julliard
61e210f196
winebuild: Get rid of PowerPC support.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:16:19 +01:00
Alexandre Julliard
414e1c8ad5
winebuild: Avoid resolving standard C functions with static importlibs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:19:33 +01:00
Alexandre Julliard
32cfdb5496
winebuild: Escape invalid characters in the dll name for static import libraries.
...
This is necessary for things like vulkan-1.dll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 16:44:19 +01:00
Martin Storsjö
77e9095435
ntdll: Remove stack gap in syscalls on arm.
...
Store the original stack pointer (on entry to the syscall dispatcher)
in syscall_frame; the stack pointer itself is incremented by
"pop {r0-r3}" right before calling the syscall itself.
This fixes unwinding from functions set up by syscalls, like
KiUserExceptionDispatcher.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:56 +01:00
Alexandre Julliard
f9ee0d2f05
tools: Avoid using wine/port.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Alexandre Julliard
9e3959bd9b
tools: Add a few helper functions for file names and extensions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard
c878a0a4c0
winebuild: Use strarrays for the argument lists.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 14:45:39 +02:00
Alexandre Julliard
d6d5a21721
winebuild: Unify the strarray implementation with the one from makedep.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 14:45:39 +02:00
Alexandre Julliard
ea6308e364
ntdll: Declare the syscall functions array explicitly.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard
7ae1c396ac
ntdll: Store the syscall argument table on the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard
3513a176fd
winebuild: Add an option to set the syscall table id.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard
ff04d8a4c2
ntdll: Move the syscall dispatcher implementation to the platform-specific files.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 11:25:38 +02:00
Alexandre Julliard
847db3c1d3
ntdll: Store the syscall table in the syscall frame on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard
77f5e2963f
ntdll: Store the syscall flags in the syscall frame on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard
94f63ea23f
ntdll: Add support for user callbacks.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:43 +02:00
Martin Storsjo
9d619b1fb0
winebuild: Spell out "x30" instead of "lr" for arm64.
...
This fixes building with older binutils versions.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 11:31:48 +02:00
Alexandre Julliard
216d241178
winebuild: Save/restore the %fs register in the syscall dispatcher on Linux.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 15:50:26 +02:00
Alexandre Julliard
db26df5934
ntdll: Go through the syscall return path for syscall faults.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 18:35:20 +02:00
Alexandre Julliard
0702d6b886
ntdll: Don't allow single-stepping through syscalls.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51273
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 15:05:24 +02:00
Alexandre Julliard
7954b86f6b
ntdll: Switch to the kernel stack for syscalls on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
08c4419a49
ntdll: Switch to the kernel stack for syscalls on ARM64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
25b093f384
ntdll: Switch to the kernel stack for syscalls on x86-64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard
308a5e7c4d
ntdll: Switch to the kernel stack for syscalls on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 15:49:29 +02:00
Alexandre Julliard
050378d4d7
ntdll: Only restore the modified parts of the syscall frame on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 17:16:21 +02:00
Alexandre Julliard
32f1bfd0f0
ntdll: Only restore the modified parts of the syscall frame on x86-64.
...
Based on a patch by Jacek Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 17:16:21 +02:00
Alexandre Julliard
42e42e9085
ntdll: Use a single syscall dispatcher controlled by global flags on i386.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Alexandre Julliard
3d9cb5e4f8
ntdll: Use a single syscall dispatcher controlled by global flags on x86-64.
...
Based on a patch by Jacek Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Alexandre Julliard
e79fa1866c
winebuild: Add support for multiple syscall descriptor tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-28 21:53:07 +02:00
Alexandre Julliard
543e49397f
winebuild: Store all parameters on the stack for syscall thunks on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:13:18 +02:00
Jacek Caban
e979ee96b6
ntdll: Use xsave compaction in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Jacek Caban
af74bd3122
ntdll: Use syscall dispatcher to restore context in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:39 +01:00
Jacek Caban
5d228d6fc9
ntdll: Store x86 YMM context insyscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:40:49 +01:00
Jacek Caban
ce5f17c892
ntdll: Store FPU and XMM contexts in x86 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
e341d1f695
ntdll: Restore all non-volatile i386 registers in syscall dispatcher.
...
Based on set_full_cpu_context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
b04f2689a2
ntdll: Store all non-volatile i386 registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:44:18 +01:00
Jacek Caban
c6d303ca23
ntdll: Reserve space for full i386 context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:43:19 +01:00
Alexandre Julliard
abf4747ba7
winebuild: Simplify constant loading on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Alexandre Julliard
4ef8e946f1
winebuild: Set Thumb bit in CPSR register on syscall entry.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
a8856381ed
ntdll: Use xsavec in x86_64 syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:17 +01:00
Jacek Caban
437bef6ac1
ntdll: Use syscall dispatcher for restoring context in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:15 +01:00
Jacek Caban
11e3d43c26
ntdll: Store x86_64 YMM context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
a06d60bd5f
winebuild: Factor out output_syscall_dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
be8729c9f5
winebuild: Restore x86_64 FPU context and nonvolatile registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:47:28 +01:00
Jacek Caban
9b6f715b28
winebuild: Restore all x86_64 control registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:46:37 +01:00
Jacek Caban
f72940de8e
ntdll: Store segment registers in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:51 +01:00
Jacek Caban
4e5b61bb06
ntdll: Store stack pointer in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:34 +01:00
Jacek Caban
accf7a0908
ntdll: Store instruction pointer register in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:29 +01:00
Jacek Caban
9bdd02de0c
ntdll: Store eflags in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:14 +01:00
Jacek Caban
6d2f08cfcb
ntdll: Reserve space for all registers in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:11 +01:00