Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0abbb467
Commit
0abbb467
authored
Feb 26, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add SEH information to ARM64EC syscalls.
parent
79b9b609
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
signal_arm64ec.c
dlls/ntdll/signal_arm64ec.c
+5
-5
main.c
dlls/win32u/main.c
+1
-1
asm.h
include/wine/asm.h
+10
-8
No files found.
dlls/ntdll/signal_arm64ec.c
View file @
0abbb467
...
@@ -48,7 +48,7 @@ ALL_SYSCALLS64
...
@@ -48,7 +48,7 @@ ALL_SYSCALLS64
};
};
#define SYSCALL_API __attribute__((naked))
#define SYSCALL_API __attribute__((naked))
#define SYSCALL_FUNC(name) __ASM_SYSCALL_FUNC( __id_##name )
#define SYSCALL_FUNC(name) __ASM_SYSCALL_FUNC( __id_##name
, name
)
NTSTATUS
SYSCALL_API
NtAcceptConnectPort
(
HANDLE
*
handle
,
ULONG
id
,
LPC_MESSAGE
*
msg
,
BOOLEAN
accept
,
NTSTATUS
SYSCALL_API
NtAcceptConnectPort
(
HANDLE
*
handle
,
ULONG
id
,
LPC_MESSAGE
*
msg
,
BOOLEAN
accept
,
LPC_SECTION_WRITE
*
write
,
LPC_SECTION_READ
*
read
)
LPC_SECTION_WRITE
*
write
,
LPC_SECTION_READ
*
read
)
...
@@ -203,7 +203,7 @@ NTSTATUS SYSCALL_API NtConnectPort( HANDLE *handle, UNICODE_STRING *name, SECURI
...
@@ -203,7 +203,7 @@ NTSTATUS SYSCALL_API NtConnectPort( HANDLE *handle, UNICODE_STRING *name, SECURI
static
NTSTATUS
SYSCALL_API
syscall_NtContinue
(
ARM64_NT_CONTEXT
*
context
,
BOOLEAN
alertable
)
static
NTSTATUS
SYSCALL_API
syscall_NtContinue
(
ARM64_NT_CONTEXT
*
context
,
BOOLEAN
alertable
)
{
{
__ASM_SYSCALL_FUNC
(
__id_NtContinue
);
__ASM_SYSCALL_FUNC
(
__id_NtContinue
,
syscall_NtContinue
);
}
}
NTSTATUS
WINAPI
NtContinue
(
CONTEXT
*
context
,
BOOLEAN
alertable
)
NTSTATUS
WINAPI
NtContinue
(
CONTEXT
*
context
,
BOOLEAN
alertable
)
...
@@ -502,7 +502,7 @@ NTSTATUS SYSCALL_API NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTI
...
@@ -502,7 +502,7 @@ NTSTATUS SYSCALL_API NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTI
static
NTSTATUS
SYSCALL_API
syscall_NtGetContextThread
(
HANDLE
handle
,
ARM64_NT_CONTEXT
*
context
)
static
NTSTATUS
SYSCALL_API
syscall_NtGetContextThread
(
HANDLE
handle
,
ARM64_NT_CONTEXT
*
context
)
{
{
__ASM_SYSCALL_FUNC
(
__id_NtGetContextThread
);
__ASM_SYSCALL_FUNC
(
__id_NtGetContextThread
,
syscall_NtGetContextThread
);
}
}
NTSTATUS
WINAPI
NtGetContextThread
(
HANDLE
handle
,
CONTEXT
*
context
)
NTSTATUS
WINAPI
NtGetContextThread
(
HANDLE
handle
,
CONTEXT
*
context
)
...
@@ -995,7 +995,7 @@ NTSTATUS SYSCALL_API NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR
...
@@ -995,7 +995,7 @@ NTSTATUS SYSCALL_API NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR
static
NTSTATUS
SYSCALL_API
syscall_NtRaiseException
(
EXCEPTION_RECORD
*
rec
,
ARM64_NT_CONTEXT
*
context
,
BOOL
first_chance
)
static
NTSTATUS
SYSCALL_API
syscall_NtRaiseException
(
EXCEPTION_RECORD
*
rec
,
ARM64_NT_CONTEXT
*
context
,
BOOL
first_chance
)
{
{
__ASM_SYSCALL_FUNC
(
__id_NtRaiseException
);
__ASM_SYSCALL_FUNC
(
__id_NtRaiseException
,
syscall_NtRaiseException
);
}
}
NTSTATUS
WINAPI
NtRaiseException
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
)
NTSTATUS
WINAPI
NtRaiseException
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
,
BOOL
first_chance
)
...
@@ -1137,7 +1137,7 @@ NTSTATUS SYSCALL_API NtSecureConnectPort( HANDLE *handle, UNICODE_STRING *name,
...
@@ -1137,7 +1137,7 @@ NTSTATUS SYSCALL_API NtSecureConnectPort( HANDLE *handle, UNICODE_STRING *name,
static
NTSTATUS
SYSCALL_API
syscall_NtSetContextThread
(
HANDLE
handle
,
const
ARM64_NT_CONTEXT
*
context
)
static
NTSTATUS
SYSCALL_API
syscall_NtSetContextThread
(
HANDLE
handle
,
const
ARM64_NT_CONTEXT
*
context
)
{
{
__ASM_SYSCALL_FUNC
(
__id_NtSetContextThread
);
__ASM_SYSCALL_FUNC
(
__id_NtSetContextThread
,
syscall_NtSetContextThread
);
}
}
NTSTATUS
WINAPI
NtSetContextThread
(
HANDLE
handle
,
const
CONTEXT
*
context
)
NTSTATUS
WINAPI
NtSetContextThread
(
HANDLE
handle
,
const
CONTEXT
*
context
)
...
...
dlls/win32u/main.c
View file @
0abbb467
...
@@ -46,7 +46,7 @@ ALL_SYSCALLS64
...
@@ -46,7 +46,7 @@ ALL_SYSCALLS64
};
};
#define SYSCALL_API __attribute__((naked))
#define SYSCALL_API __attribute__((naked))
#define SYSCALL_FUNC(name) __ASM_SYSCALL_FUNC( __id_##name )
#define SYSCALL_FUNC(name) __ASM_SYSCALL_FUNC( __id_##name
, name
)
INT
SYSCALL_API
NtGdiAbortDoc
(
HDC
hdc
)
INT
SYSCALL_API
NtGdiAbortDoc
(
HDC
hdc
)
{
{
...
...
include/wine/asm.h
View file @
0abbb467
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
#elif defined __aarch64__
#elif defined __aarch64__
# define __ASM_SYSCALL_FUNC(id,name) \
# define __ASM_SYSCALL_FUNC(id,name) \
__ASM_GLOBAL_FUNC( name, \
__ASM_GLOBAL_FUNC( name, \
__ASM_SEH(".seh_endprologue\n\t")
\
".seh_endprologue\n\t"
\
"mov x8, #(" #id ")\n\t" \
"mov x8, #(" #id ")\n\t" \
"mov x9, x30\n\t" \
"mov x9, x30\n\t" \
"ldr x16, 1f\n\t" \
"ldr x16, 1f\n\t" \
...
@@ -218,13 +218,16 @@
...
@@ -218,13 +218,16 @@
"ret\n" \
"ret\n" \
"1:\t.quad " __ASM_NAME("__wine_syscall_dispatcher") )
"1:\t.quad " __ASM_NAME("__wine_syscall_dispatcher") )
#elif defined __arm64ec__
#elif defined __arm64ec__
# define __ASM_SYSCALL_FUNC(id) \
# define __ASM_SYSCALL_FUNC(id,name) \
asm( "mov x8, #%0\n\t" \
asm( ".seh_proc " #name "\n\t" \
".seh_endprologue\n\t" \
"mov x8, #%0\n\t" \
"mov x9, x30\n\t" \
"mov x9, x30\n\t" \
"adr
x16, " __ASM_NAME("__wine_syscall_dispatcher") "
\n\t" \
"adr
p x16, __wine_syscall_dispatcher
\n\t" \
"ldr x16, [x16]\n\t" \
"ldr x16, [x16
, :lo12:__wine_syscall_dispatcher
]\n\t" \
"blr x16\n\t" \
"blr x16\n\t" \
"ret" :: "i" (id) )
"ret\n\t" \
".seh_endproc" :: "i" (id) )
#elif defined __x86_64__
#elif defined __x86_64__
/* Chromium depends on syscall thunks having the same form as on
/* Chromium depends on syscall thunks having the same form as on
* Windows. For 64-bit systems the only viable form we can emulate is
* Windows. For 64-bit systems the only viable form we can emulate is
...
@@ -234,7 +237,7 @@
...
@@ -234,7 +237,7 @@
# ifdef __WINE_PE_BUILD
# ifdef __WINE_PE_BUILD
# define __ASM_SYSCALL_FUNC(id,name) \
# define __ASM_SYSCALL_FUNC(id,name) \
__ASM_GLOBAL_FUNC( name, \
__ASM_GLOBAL_FUNC( name, \
__ASM_SEH(".seh_endprologue\n\t")
\
".seh_endprologue\n\t"
\
".byte 0x4c,0x8b,0xd1\n\t"
/* movq %rcx,%r10 */
\
".byte 0x4c,0x8b,0xd1\n\t"
/* movq %rcx,%r10 */
\
".byte 0xb8\n\t"
/* movl $i,%eax */
\
".byte 0xb8\n\t"
/* movl $i,%eax */
\
".long (" #id ")\n\t" \
".long (" #id ")\n\t" \
...
@@ -250,7 +253,6 @@
...
@@ -250,7 +253,6 @@
# else
# else
# define __ASM_SYSCALL_FUNC(id,name) \
# define __ASM_SYSCALL_FUNC(id,name) \
__ASM_GLOBAL_FUNC( name, \
__ASM_GLOBAL_FUNC( name, \
__ASM_SEH(".seh_endprologue\n\t") \
".byte 0x4c,0x8b,0xd1\n\t"
/* movq %rcx,%r10 */
\
".byte 0x4c,0x8b,0xd1\n\t"
/* movq %rcx,%r10 */
\
".byte 0xb8\n\t"
/* movl $i,%eax */
\
".byte 0xb8\n\t"
/* movl $i,%eax */
\
".long (" #id ")\n\t" \
".long (" #id ")\n\t" \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment