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
a50df817
Commit
a50df817
authored
Nov 20, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Get rid of the thread exit frame on i386.
parent
3e421c66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
28 deletions
+5
-28
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+5
-28
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
a50df817
...
...
@@ -480,16 +480,14 @@ struct x86_thread_data
UINT
dr3
;
/* 1e8 */
UINT
dr6
;
/* 1ec */
UINT
dr7
;
/* 1f0 */
void
*
exit_frame
;
/* 1f4 exit frame pointer
*/
SYSTEM_SERVICE_TABLE
*
syscall_table
;
/* 1f4 syscall table
*/
struct
syscall_frame
*
syscall_frame
;
/* 1f8 frame pointer on syscall entry */
SYSTEM_SERVICE_TABLE
*
syscall_table
;
/* 1fc syscall table */
};
C_ASSERT
(
sizeof
(
struct
x86_thread_data
)
<=
sizeof
(((
struct
ntdll_thread_data
*
)
0
)
->
cpu_data
)
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
gs
)
==
0x1d8
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
exit_fram
e
)
==
0x1f4
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
syscall_tabl
e
)
==
0x1f4
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
syscall_frame
)
==
0x1f8
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
syscall_table
)
==
0x1fc
);
/* flags to control the behavior of the syscall dispatcher */
#define SYSCALL_HAVE_XSAVE 1
...
...
@@ -2508,10 +2506,8 @@ __ASM_GLOBAL_FUNC( signal_start_thread,
"pushl %edi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %edi,-12
\n\t
"
)
"leal 8(%ebp),%edx
\n\t
"
/* syscall_cfa */
/* store exit frame */
"movl 20(%ebp),%ecx
\n\t
"
/* teb */
"movl %ebp,0x1f4(%ecx)
\n\t
"
/* x86_thread_data()->exit_frame */
/* set syscall frame */
"movl 20(%ebp),%ecx
\n\t
"
/* teb */
"movl 0x1f8(%ecx),%eax
\n\t
"
/* x86_thread_data()->syscall_frame */
"orl %eax,%eax
\n\t
"
"jnz 1f
\n\t
"
...
...
@@ -2532,26 +2528,7 @@ __ASM_GLOBAL_FUNC( signal_start_thread,
/***********************************************************************
* signal_exit_thread
*/
__ASM_GLOBAL_FUNC
(
signal_exit_thread
,
"movl 8(%esp),%ecx
\n\t
"
"movl 12(%esp),%esi
\n\t
"
"xorl %edx,%edx
\n\t
"
/* fetch exit frame */
"xchgl %edx,0x1f4(%esi)
\n\t
"
/* x86_thread_data()->exit_frame */
"testl %edx,%edx
\n\t
"
"jnz 1f
\n\t
"
"jmp *%ecx
\n\t
"
/* switch to exit frame stack */
"1:
\t
movl 4(%esp),%eax
\n\t
"
"movl %edx,%ebp
\n\t
"
__ASM_CFI
(
".cfi_def_cfa %ebp,4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebp,0
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebx,-4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %esi,-8
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %edi,-12
\n\t
"
)
"leal -20(%ebp),%esp
\n\t
"
"pushl %eax
\n\t
"
"call *%ecx"
)
__ASM_GLOBAL_FUNC
(
signal_exit_thread
,
"jmp *8(%esp)"
)
/***********************************************************************
...
...
@@ -2597,7 +2574,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"movl %eax,%ebx
\n\t
"
"shrl $8,%ebx
\n\t
"
"andl $0x30,%ebx
\n\t
"
/* syscall table number */
"addl %fs:0x1f
c
,%ebx
\n\t
"
/* x86_thread_data()->syscall_table */
"addl %fs:0x1f
4
,%ebx
\n\t
"
/* x86_thread_data()->syscall_table */
"testl $3,(%ecx)
\n\t
"
/* frame->syscall_flags & (SYSCALL_HAVE_XSAVE | SYSCALL_HAVE_XSAVEC) */
"jz 2f
\n\t
"
"movl $7,%eax
\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