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
1e6ff42d
Commit
1e6ff42d
authored
Jan 27, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement set_cpu_context for x86_64 directly instead of using the winebuild-generated code.
parent
33e6238f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
6 deletions
+47
-6
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+47
-6
No files found.
dlls/ntdll/signal_x86_64.c
View file @
1e6ff42d
...
...
@@ -1515,12 +1515,53 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext,
*
* Set the new CPU context.
*/
void
set_cpu_context
(
const
CONTEXT
*
context
)
{
extern
void
CDECL
__wine_restore_regs
(
const
CONTEXT
*
)
DECLSPEC_NORETURN
;
__wine_restore_regs
(
context
);
}
__ASM_GLOBAL_FUNC
(
set_cpu_context
,
"subq $40,%rsp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 40
\n\t
"
)
"ldmxcsr 0x34(%rdi)
\n\t
"
/* context->MxCsr */
"movw 0x38(%rdi),%ax
\n\t
"
/* context->SegCs */
"movq %rax,8(%rsp)
\n\t
"
"movw 0x42(%rdi),%ax
\n\t
"
/* context->SegSs */
"movq %rax,32(%rsp)
\n\t
"
"movq 0x44(%rdi),%rax
\n\t
"
/* context->Eflags */
"movq %rax,16(%rsp)
\n\t
"
"movq 0x80(%rdi),%rcx
\n\t
"
/* context->Rcx */
"movq 0x88(%rdi),%rdx
\n\t
"
/* context->Rdx */
"movq 0x90(%rdi),%rbx
\n\t
"
/* context->Rbx */
"movq 0x98(%rdi),%rax
\n\t
"
/* context->Rsp */
"movq %rax,24(%rsp)
\n\t
"
"movq 0xa0(%rdi),%rbp
\n\t
"
/* context->Rbp */
"movq 0xa8(%rdi),%rsi
\n\t
"
/* context->Rsi */
"movq 0xb8(%rdi),%r8
\n\t
"
/* context->R8 */
"movq 0xc0(%rdi),%r9
\n\t
"
/* context->R9 */
"movq 0xc8(%rdi),%r10
\n\t
"
/* context->R10 */
"movq 0xd0(%rdi),%r11
\n\t
"
/* context->R11 */
"movq 0xd8(%rdi),%r12
\n\t
"
/* context->R12 */
"movq 0xe0(%rdi),%r13
\n\t
"
/* context->R13 */
"movq 0xe8(%rdi),%r14
\n\t
"
/* context->R14 */
"movq 0xf0(%rdi),%r15
\n\t
"
/* context->R15 */
"movq 0xf8(%rdi),%rax
\n\t
"
/* context->Rip */
"movq %rax,(%rsp)
\n\t
"
"fxrstor 0x100(%rdi)
\n\t
"
/* context->FtlSave */
"movdqa 0x1a0(%rdi),%xmm0
\n\t
"
/* context->Xmm0 */
"movdqa 0x1b0(%rdi),%xmm1
\n\t
"
/* context->Xmm1 */
"movdqa 0x1c0(%rdi),%xmm2
\n\t
"
/* context->Xmm2 */
"movdqa 0x1d0(%rdi),%xmm3
\n\t
"
/* context->Xmm3 */
"movdqa 0x1e0(%rdi),%xmm4
\n\t
"
/* context->Xmm4 */
"movdqa 0x1f0(%rdi),%xmm5
\n\t
"
/* context->Xmm5 */
"movdqa 0x200(%rdi),%xmm6
\n\t
"
/* context->Xmm6 */
"movdqa 0x210(%rdi),%xmm7
\n\t
"
/* context->Xmm7 */
"movdqa 0x220(%rdi),%xmm8
\n\t
"
/* context->Xmm8 */
"movdqa 0x230(%rdi),%xmm9
\n\t
"
/* context->Xmm9 */
"movdqa 0x240(%rdi),%xmm10
\n\t
"
/* context->Xmm10 */
"movdqa 0x250(%rdi),%xmm11
\n\t
"
/* context->Xmm11 */
"movdqa 0x260(%rdi),%xmm12
\n\t
"
/* context->Xmm12 */
"movdqa 0x270(%rdi),%xmm13
\n\t
"
/* context->Xmm13 */
"movdqa 0x280(%rdi),%xmm14
\n\t
"
/* context->Xmm14 */
"movdqa 0x290(%rdi),%xmm15
\n\t
"
/* context->Xmm15 */
"movq 0x78(%rdi),%rax
\n\t
"
/* context->Rax */
"movq 0xb0(%rdi),%rdi
\n\t
"
/* context->Rdi */
"iretq"
);
/***********************************************************************
* copy_context
...
...
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