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
ad1077f9
Commit
ad1077f9
authored
Jul 16, 2015
by
Dan Kegel
Committed by
Alexandre Julliard
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Implement stub for _vcomp_fork.
parent
4a1629c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
3 deletions
+98
-3
main.c
dlls/vcomp/main.c
+95
-0
vcomp.spec
dlls/vcomp/vcomp.spec
+1
-1
vcomp100.spec
dlls/vcomp100/vcomp100.spec
+1
-1
vcomp90.spec
dlls/vcomp90/vcomp90.spec
+1
-1
No files found.
dlls/vcomp/main.c
View file @
ad1077f9
...
...
@@ -3,6 +3,7 @@
* vcomp implementation
*
* Copyright 2011 Austin English
* Copyright 2012 Dan Kegel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -40,6 +41,89 @@ struct vcomp_thread_data
int
fork_threads
;
};
#if defined(__i386__)
extern
void
CDECL
_vcomp_fork_call_wrapper
(
void
*
wrapper
,
int
nargs
,
__ms_va_list
args
);
__ASM_GLOBAL_FUNC
(
_vcomp_fork_call_wrapper
,
"pushl %ebp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebp,0
\n\t
"
)
"movl %esp,%ebp
\n\t
"
__ASM_CFI
(
".cfi_def_cfa_register %ebp
\n\t
"
)
"pushl %esi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %esi,-4
\n\t
"
)
"pushl %edi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %edi,-8
\n\t
"
)
"movl 12(%ebp),%edx
\n\t
"
"movl %esp,%edi
\n\t
"
"shll $2,%edx
\n\t
"
"jz 1f
\n\t
"
"subl %edx,%edi
\n\t
"
"andl $~15,%edi
\n\t
"
"movl %edi,%esp
\n\t
"
"movl 12(%ebp),%ecx
\n\t
"
"movl 16(%ebp),%esi
\n\t
"
"cld
\n\t
"
"rep; movsl
\n
"
"1:
\t
call *8(%ebp)
\n\t
"
"leal -8(%ebp),%esp
\n\t
"
"popl %edi
\n\t
"
__ASM_CFI
(
".cfi_same_value %edi
\n\t
"
)
"popl %esi
\n\t
"
__ASM_CFI
(
".cfi_same_value %esi
\n\t
"
)
"popl %ebp
\n\t
"
__ASM_CFI
(
".cfi_def_cfa %esp,4
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %ebp
\n\t
"
)
"ret"
)
#elif defined(__x86_64__)
extern
void
CDECL
_vcomp_fork_call_wrapper
(
void
*
wrapper
,
int
nargs
,
__ms_va_list
args
);
__ASM_GLOBAL_FUNC
(
_vcomp_fork_call_wrapper
,
"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
"
"movq $4,%rcx
\n\t
"
"cmp %rcx,%rdx
\n\t
"
"cmovgq %rdx,%rcx
\n\t
"
"leaq 0(,%rcx,8),%rdx
\n\t
"
"subq %rdx,%rsp
\n\t
"
"andq $~15,%rsp
\n\t
"
"movq %rsp,%rdi
\n\t
"
"movq %r8,%rsi
\n\t
"
"rep; movsq
\n\t
"
"movq 0(%rsp),%rcx
\n\t
"
"movq 8(%rsp),%rdx
\n\t
"
"movq 16(%rsp),%r8
\n\t
"
"movq 24(%rsp),%r9
\n\t
"
"callq *%rax
\n\t
"
"leaq -16(%rbp),%rsp
\n\t
"
"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
static
void
CDECL
_vcomp_fork_call_wrapper
(
void
*
wrapper
,
int
nargs
,
__ms_va_list
args
)
{
ERR
(
"Not implemented for this architecture
\n
"
);
}
#endif
static
inline
struct
vcomp_thread_data
*
vcomp_get_thread_data
(
void
)
{
return
(
struct
vcomp_thread_data
*
)
TlsGetValue
(
vcomp_context_tls
);
...
...
@@ -160,6 +244,17 @@ void CDECL _vcomp_single_end(void)
TRACE
(
"stub
\n
"
);
}
void
WINAPIV
_vcomp_fork
(
BOOL
ifval
,
int
nargs
,
void
*
wrapper
,
...)
{
__ms_va_list
valist
;
TRACE
(
"(%d, %d, %p, ...)
\n
"
,
ifval
,
nargs
,
wrapper
);
__ms_va_start
(
valist
,
wrapper
);
_vcomp_fork_call_wrapper
(
wrapper
,
nargs
,
valist
);
__ms_va_end
(
valist
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
LPVOID
reserved
)
{
TRACE
(
"(%p, %d, %p)
\n
"
,
instance
,
reason
,
reserved
);
...
...
dlls/vcomp/vcomp.spec
View file @
ad1077f9
...
...
@@ -64,7 +64,7 @@
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
@
stub _vcomp_fork
@
varargs _vcomp_fork(long long ptr)
@ stub _vcomp_get_thread_num
@ stub _vcomp_leave_critsect
@ stub _vcomp_master_barrier
...
...
dlls/vcomp100/vcomp100.spec
View file @
ad1077f9
...
...
@@ -64,7 +64,7 @@
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
@
stub
_vcomp_fork
@
varargs _vcomp_fork(long long ptr) vcomp.
_vcomp_fork
@ stub _vcomp_get_thread_num
@ stub _vcomp_leave_critsect
@ stub _vcomp_master_barrier
...
...
dlls/vcomp90/vcomp90.spec
View file @
ad1077f9
...
...
@@ -64,7 +64,7 @@
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
@
stub
_vcomp_fork
@
varargs _vcomp_fork(long long ptr) vcomp.
_vcomp_fork
@ stub _vcomp_get_thread_num
@ stub _vcomp_leave_critsect
@ stub _vcomp_master_barrier
...
...
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