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
7954b86f
Commit
7954b86f
authored
Jun 11, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Switch to the kernel stack for syscalls on ARM.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08c4419a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
14 deletions
+38
-14
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+0
-0
import.c
tools/winebuild/import.c
+38
-14
No files found.
dlls/ntdll/unix/signal_arm.c
View file @
7954b86f
This diff is collapsed.
Click to expand it.
tools/winebuild/import.c
View file @
7954b86f
...
...
@@ -1665,15 +1665,27 @@ static void output_syscall_dispatcher(void)
output
(
"
\t
jmp 2b
\n
"
);
break
;
case
CPU_ARM
:
output
(
"
\t
push {r4-r11}
\n
"
);
output
(
"
\t
add r6, sp, #40
\n
"
);
/* stack parameters */
output
(
"
\t
sub sp, sp, #8
\n
"
);
output
(
"
\t
mrc p15, 0, r7, c13, c0, 2
\n
"
);
/* NtCurrentTeb() */
output
(
"
\t
add r7, #0x1d8
\n
"
);
/* arm_thread_data()->syscall_frame */
output
(
"
\t
mrc p15, 0, r1, c13, c0, 2
\n
"
);
/* NtCurrentTeb() */
output
(
"
\t
ldr r1, [r1, #0x1d8]
\n
"
);
/* arm_thread_data()->syscall_frame */
output
(
"
\t
add r0, r1, #0x10
\n
"
);
output
(
"
\t
stm r0, {r4-r12,lr}
\n
"
);
output
(
"
\t
str sp, [r1, #0x38]
\n
"
);
output
(
"
\t
str r3, [r1, #0x3c]
\n
"
);
output
(
"
\t
mrs r0, CPSR
\n
"
);
output
(
"
\t
bfi r0, lr, #5, #1
\n
"
);
/* set thumb bit */
output
(
"
\t
str r0, [sp, #4]
\n
"
);
output
(
"
\t
str sp, [r7]
\n
"
);
/* syscall frame */
output
(
"
\t
str r0, [r1, #0x40]
\n
"
);
output
(
"
\t
mov r0, #0
\n
"
);
output
(
"
\t
str r0, [r1, #0x44]
\n
"
);
/* frame->restore_flags */
if
(
strcmp
(
float_abi_option
,
"soft"
))
{
output
(
"
\t
vmrs r0, fpscr
\n
"
);
output
(
"
\t
str r0, [r1, #0x48]
\n
"
);
output
(
"
\t
add r0, r1, #0x50
\n
"
);
output
(
"
\t
vstm r0, {d0-d15}
\n
"
);
}
output
(
"
\t
mov r6, sp
\n
"
);
output
(
"
\t
mov sp, r1
\n
"
);
output
(
"
\t
mov r8, r1
\n
"
);
output
(
"
\t
ldr r5, 6f
\n
"
);
if
(
UsePIC
)
output
(
"1:
\t
add r5, pc
\n
"
);
output
(
"
\t
ubfx r4, ip, #12, #2
\n
"
);
/* syscall table number */
...
...
@@ -1698,11 +1710,24 @@ static void output_syscall_dispatcher(void)
output
(
"
\t
ldr r5, [r4]
\n
"
);
/* table->ServiceTable */
output
(
"
\t
ldr ip, [r5, ip, lsl #2]
\n
"
);
output
(
"
\t
blx ip
\n
"
);
output
(
"4:
\t
mov ip, #0
\n
"
);
output
(
"
\t
str ip, [r7]
\n
"
);
output
(
"
\t
sub ip, r6, #40
\n
"
);
output
(
"
\t
mov sp, ip
\n
"
);
output
(
"
\t
pop {r4-r12,pc}
\n
"
);
output
(
"
\t
ldr ip, [r8, #0x44]
\n
"
);
/* frame->restore_flags */
if
(
strcmp
(
float_abi_option
,
"soft"
))
{
output
(
"
\t
tst ip, #4
\n
"
);
/* CONTEXT_FLOATING_POINT */
output
(
"
\t
beq 3f
\n
"
);
output
(
"
\t
ldr r4, [r8, #0x48]
\n
"
);
output
(
"
\t
vmsr fpscr, r4
\n
"
);
output
(
"
\t
add r4, r8, #0x50
\n
"
);
output
(
"
\t
vldm r4, {d0-d15}
\n
"
);
output
(
"3:
\n
"
);
}
output
(
"
\t
tst ip, #2
\n
"
);
/* CONTEXT_INTEGER */
output
(
"
\t
it ne
\n
"
);
output
(
"
\t
ldmne r8, {r0-r3}
\n
"
);
output
(
"4:
\t
ldr lr, [r8, #0x3c]
\n
"
);
output
(
"
\t
ldr sp, [r8, #0x38]
\n
"
);
output
(
"
\t
add r8, r8, #0x10
\n
"
);
output
(
"
\t
ldm r8, {r4-r12,pc}
\n
"
);
output
(
"5:
\t
movw r0, #0x%x
\n
"
,
invalid_param
&
0xffff
);
output
(
"
\t
movt r0, #0x%x
\n
"
,
invalid_param
>>
16
);
output
(
"
\t
b 4b
\n
"
);
...
...
@@ -1940,7 +1965,7 @@ void output_syscalls( DLLSPEC *spec )
output
(
"
\t
mov r3, lr
\n
"
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_syscall"
)
);
output
(
"
\t
add sp, #16
\n
"
);
output
(
"
\t
bx
ip
\n
"
);
output
(
"
\t
bx
lr
\n
"
);
break
;
case
CPU_ARM64
:
output
(
"
\t
mov x8, #%u
\n
"
,
i
);
...
...
@@ -1969,7 +1994,6 @@ void output_syscalls( DLLSPEC *spec )
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
16
)
);
output
(
"
\t
%s
\n
"
,
func_declaration
(
"__wine_syscall"
)
);
output
(
"%s:
\n
"
,
asm_name
(
"__wine_syscall"
)
);
output
(
"
\t
push {r3,lr}
\n
"
);
if
(
UsePIC
)
{
output
(
"
\t
ldr r0, 2f
\n
"
);
...
...
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