Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a6bb3662
Commit
a6bb3662
authored
Nov 30, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement a faster Unix call dispatcher on ARM.
parent
2332fe79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
5 deletions
+39
-5
loader.c
dlls/ntdll/unix/loader.c
+0
-2
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+39
-3
No files found.
dlls/ntdll/unix/loader.c
View file @
a6bb3662
...
...
@@ -2190,9 +2190,7 @@ static void start_main_thread(void)
if
(
main_image_info
.
Machine
!=
current_machine
)
load_wow64_ntdll
(
main_image_info
.
Machine
);
load_apiset_dll
();
ntdll_init_syscalls
(
0
,
&
syscall_table
,
p__wine_syscall_dispatcher
);
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
*
p__wine_unix_call_dispatcher
=
__wine_unix_call_dispatcher
;
#endif
server_init_process_done
();
}
...
...
dlls/ntdll/unix/signal_arm.c
View file @
a6bb3662
...
...
@@ -1701,7 +1701,8 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"ldr r5, [r4]
\n\t
"
/* table->ServiceTable */
"ldr ip, [r5, ip, lsl #2]
\n\t
"
"blx ip
\n
"
"4:
\t
ldr ip, [r8, #0x44]
\n\t
"
/* frame->restore_flags */
".L__wine_syscall_dispatcher_return:
\n\t
"
"ldr ip, [r8, #0x44]
\n\t
"
/* frame->restore_flags */
#ifndef __SOFTFP__
"tst ip, #4
\n\t
"
/* CONTEXT_FLOATING_POINT */
"beq 3f
\n\t
"
...
...
@@ -1721,12 +1722,47 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"5:
\t
movw r0, #0x000d
\n\t
"
/* STATUS_INVALID_PARAMETER */
"movt r0, #0xc000
\n\t
"
"add sp, sp, #0x10
\n\t
"
"b
4b
\n\t
"
"b
.L__wine_syscall_dispatcher_return
\n\t
"
".globl "
__ASM_NAME
(
"__wine_syscall_dispatcher_return"
)
"
\n
"
__ASM_NAME
(
"__wine_syscall_dispatcher_return"
)
":
\n\t
"
"mov r8, r0
\n\t
"
"mov r0, r1
\n\t
"
"b 4b"
)
"b .L__wine_syscall_dispatcher_return"
)
/***********************************************************************
* __wine_unix_call_dispatcher
*/
__ASM_GLOBAL_FUNC
(
__wine_unix_call_dispatcher
,
__ASM_EHABI
(
".cantunwind
\n\t
"
)
"mrc p15, 0, r1, c13, c0, 2
\n\t
"
/* NtCurrentTeb() */
"ldr r1, [r1, #0x1d8]
\n\t
"
/* arm_thread_data()->syscall_frame */
"add ip, r1, #0x10
\n\t
"
"stm ip, {r4-r12,lr}
\n\t
"
"str sp, [r1, #0x38]
\n\t
"
"str lr, [r1, #0x3c]
\n\t
"
"mrs r4, CPSR
\n\t
"
"bfi r4, lr, #5, #1
\n\t
"
/* set thumb bit */
"str r4, [r1, #0x40]
\n\t
"
"mov r4, #0
\n\t
"
"str r4, [r1, #0x44]
\n\t
"
/* frame->restore_flags */
#ifndef __SOFTFP__
"vmrs r4, fpscr
\n\t
"
"str r4, [r1, #0x48]
\n\t
"
"add r4, r1, #0x60
\n\t
"
"vstm r4, {d0-d15}
\n\t
"
#endif
"ldr ip, [r0, r2, lsl #2]
\n\t
"
"mov sp, r1
\n\t
"
"mov r0, r3
\n\t
"
/* args */
"blx ip
\n
"
"mov r8, sp
\n\t
"
"ldr r1, [r8, #0x44]
\n\t
"
/* frame->restore_flags */
"cbnz r1, 1f
\n\t
"
"ldr sp, [r8, #0x38]
\n\t
"
"add r8, r8, #0x10
\n\t
"
"ldm r8, {r4-r12,pc}
\n\t
"
"1:
\t
b .L__wine_syscall_dispatcher_return"
)
/***********************************************************************
...
...
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