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
0ce27385
Commit
0ce27385
authored
Jun 13, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement calling server functions on x86_64.
parent
b6599bd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
ndr_stubless.c
dlls/rpcrt4/ndr_stubless.c
+42
-0
No files found.
dlls/rpcrt4/ndr_stubless.c
View file @
0ce27385
...
...
@@ -1003,6 +1003,48 @@ __ASM_GLOBAL_FUNC(call_server_func,
__ASM_CFI
(
".cfi_def_cfa %esp,4
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %ebp
\n\t
"
)
"ret"
)
#elif defined __x86_64__
LONG_PTR
__cdecl
call_server_func
(
SERVER_ROUTINE
func
,
unsigned
char
*
args
,
unsigned
int
stack_size
);
__ASM_GLOBAL_FUNC
(
call_server_func
,
"pushq %rbp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 8
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %rbp,0
\n\t
"
)
"movq %rsp,%rbp
\n\t
"
__ASM_CFI
(
".cfi_def_cfa_register %rbp
\n\t
"
)
"pushq %rsi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %rsi,-8
\n\t
"
)
"pushq %rdi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %rdi,-16
\n\t
"
)
"movq %rcx,%rax
\n\t
"
/* function to call */
"movq $32,%rcx
\n\t
"
/* allocate max(32,stack_size) bytes of stack space */
"cmpq %rcx,%r8
\n\t
"
"cmovgq %r8,%rcx
\n\t
"
"subq %rcx,%rsp
\n\t
"
"andq $~15,%rsp
\n\t
"
"movq %r8,%rcx
\n\t
"
"shrq $3,%rcx
\n\t
"
"movq %rsp,%rdi
\n\t
"
"movq %rdx,%rsi
\n\t
"
"rep; movsq
\n\t
"
/* copy arguments */
"movq 0(%rsp),%rcx
\n\t
"
"movq 8(%rsp),%rdx
\n\t
"
"movq 16(%rsp),%r8
\n\t
"
"movq 24(%rsp),%r9
\n\t
"
"movq %rcx,%xmm0
\n\t
"
"movq %rdx,%xmm1
\n\t
"
"movq %r8,%xmm2
\n\t
"
"movq %r9,%xmm3
\n\t
"
"callq *%rax
\n\t
"
"leaq -16(%rbp),%rsp
\n\t
"
/* restore stack */
"popq %rdi
\n\t
"
__ASM_CFI
(
".cfi_same_value %rdi
\n\t
"
)
"popq %rsi
\n\t
"
__ASM_CFI
(
".cfi_same_value %rsi
\n\t
"
)
__ASM_CFI
(
".cfi_def_cfa_register %rsp
\n\t
"
)
"popq %rbp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset -8
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %rbp
\n\t
"
)
"ret"
)
#else
#warning call_server_func not implemented for your architecture
LONG_PTR
__cdecl
call_server_func
(
SERVER_ROUTINE
func
,
unsigned
char
*
args
,
unsigned
short
stack_size
)
...
...
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