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
43682ce1
Commit
43682ce1
authored
Feb 01, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid copying and restoring the context in RtlCaptureContext for i386.
parent
f7385699
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
signal_i386.c
dlls/ntdll/signal_i386.c
+28
-7
No files found.
dlls/ntdll/ntdll.spec
View file @
43682ce1
...
...
@@ -435,7 +435,7 @@
# @ stub RtlAssert2
@ stdcall RtlAssert(ptr ptr long long)
# @ stub RtlCancelTimer
@ stdcall -
register
RtlCaptureContext(ptr)
@ stdcall -
norelay
RtlCaptureContext(ptr)
@ stdcall RtlCaptureStackBackTrace(long long ptr ptr)
# @ stub RtlCaptureStackContext
@ stdcall RtlCharToInteger(ptr long ptr)
...
...
dlls/ntdll/signal_i386.c
View file @
43682ce1
...
...
@@ -1151,13 +1151,34 @@ static inline void restore_context( const CONTEXT *context, SIGCONTEXT *sigconte
/***********************************************************************
* RtlCaptureContext (NTDLL.@)
*/
void
WINAPI
__regs_RtlCaptureContext
(
CONTEXT
*
context
,
CONTEXT
*
regs
)
{
*
context
=
*
regs
;
if
(
fpux_support
)
save_fpux
(
context
);
else
save_fpu
(
context
);
}
DEFINE_REGS_ENTRYPOINT
(
RtlCaptureContext
,
1
)
__ASM_STDCALL_FUNC
(
RtlCaptureContext
,
4
,
"pushl %eax
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
"movl 8(%esp),%eax
\n\t
"
/* context */
"movl $0x10007,(%eax)
\n\t
"
/* context->ContextFlags */
"movw %gs,0x8c(%eax)
\n\t
"
/* context->SegGs */
"movw %fs,0x90(%eax)
\n\t
"
/* context->SegFs */
"movw %es,0x94(%eax)
\n\t
"
/* context->SegEs */
"movw %ds,0x98(%eax)
\n\t
"
/* context->SegDs */
"movl %edi,0x9c(%eax)
\n\t
"
/* context->Edi */
"movl %esi,0xa0(%eax)
\n\t
"
/* context->Esi */
"movl %ebx,0xa4(%eax)
\n\t
"
/* context->Ebx */
"movl %edx,0xa8(%eax)
\n\t
"
/* context->Edx */
"movl %ecx,0xac(%eax)
\n\t
"
/* context->Ecx */
"movl %ebp,0xb4(%eax)
\n\t
"
/* context->Ebp */
"movl 4(%esp),%edx
\n\t
"
"movl %edx,0xb8(%eax)
\n\t
"
/* context->Eip */
"movw %cs,0xbc(%eax)
\n\t
"
/* context->SegCs */
"pushfl
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
"popl 0xc0(%eax)
\n\t
"
/* context->EFlags */
__ASM_CFI
(
".cfi_adjust_cfa_offset -4
\n\t
"
)
"leal 8(%esp),%edx
\n\t
"
"movl %edx,0xc4(%eax)
\n\t
"
/* context->Esp */
"movw %ss,0xc8(%eax)
\n\t
"
/* context->SegSs */
"popl 0xb0(%eax)
\n\t
"
/* context->Eax */
__ASM_CFI
(
".cfi_adjust_cfa_offset -4
\n\t
"
)
"ret $4"
)
/***********************************************************************
...
...
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