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
7aee9076
Commit
7aee9076
authored
Oct 18, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged wine_call_to_16_long and wine_call_to_16_short into a single
function.
parent
9534d4f0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
58 deletions
+29
-58
kernel32.spec
dlls/kernel/kernel32.spec
+1
-2
wowthunk.c
dlls/kernel/wowthunk.c
+1
-1
relay.c
if1632/relay.c
+2
-10
winbase16.h
include/wine/winbase16.h
+1
-2
thread.c
scheduler/thread.c
+1
-1
relay.c
tools/winebuild/relay.c
+21
-38
spec16.c
tools/winebuild/spec16.c
+2
-4
No files found.
dlls/kernel/kernel32.spec
View file @
7aee9076
...
...
@@ -1026,8 +1026,7 @@ init MAIN_KernelInit
@ varargs __wine_call_from_16_word() __wine_call_from_16_word
@ varargs __wine_call_from_16_long() __wine_call_from_16_long
@ varargs __wine_call_from_16_regs() __wine_call_from_16_regs
@ stdcall wine_call_to_16_word(ptr long) wine_call_to_16_word
@ stdcall wine_call_to_16_long(ptr long) wine_call_to_16_long
@ stdcall wine_call_to_16(ptr long) wine_call_to_16
@ stdcall wine_call_to_16_regs_short(ptr long) wine_call_to_16_regs_short
@ stdcall wine_call_to_16_regs_long (ptr long) wine_call_to_16_regs_long
...
...
dlls/kernel/wowthunk.c
View file @
7aee9076
...
...
@@ -285,7 +285,7 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
* stack pointer is always reset to the position it had before.
*/
ret
=
wine_call_to_16
_long
(
(
FARPROC16
)
vpfn16
,
cbArgs
);
ret
=
wine_call_to_16
(
(
FARPROC16
)
vpfn16
,
cbArgs
);
if
(
pdwRetCode
)
*
pdwRetCode
=
ret
;
...
...
if1632/relay.c
View file @
7aee9076
...
...
@@ -80,17 +80,9 @@ BOOL RELAY_Init(void)
*/
#ifndef __i386__
/***********************************************************************
* wine_call_to_16
_word
(KERNEL32.@)
* wine_call_to_16 (KERNEL32.@)
*/
WORD
WINAPI
wine_call_to_16_word
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* wine_call_to_16_long (KERNEL32.@)
*/
LONG
WINAPI
wine_call_to_16_long
(
FARPROC16
target
,
INT
nArgs
)
LONG
WINAPI
wine_call_to_16
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
...
...
include/wine/winbase16.h
View file @
7aee9076
...
...
@@ -380,8 +380,7 @@ BOOL16 WINAPI WritePrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCST
BOOL16
WINAPI
WriteProfileSection16
(
LPCSTR
,
LPCSTR
);
/* Wine-specific functions */
WORD
WINAPI
wine_call_to_16_word
(
FARPROC16
target
,
INT
nArgs
);
LONG
WINAPI
wine_call_to_16_long
(
FARPROC16
target
,
INT
nArgs
);
LONG
WINAPI
wine_call_to_16
(
FARPROC16
target
,
INT
nArgs
);
void
WINAPI
wine_call_to_16_regs_short
(
CONTEXT86
*
context
,
INT
nArgs
);
void
WINAPI
wine_call_to_16_regs_long
(
CONTEXT86
*
context
,
INT
nArgs
);
...
...
scheduler/thread.c
View file @
7aee9076
...
...
@@ -337,7 +337,7 @@ static DWORD CALLBACK THREAD_StartThread16( LPVOID threadArgs )
HeapFree
(
GetProcessHeap
(),
0
,
threadArgs
);
((
LPDWORD
)
CURRENT_STACK16
)[
-
1
]
=
param
;
return
wine_call_to_16
_long
(
start
,
sizeof
(
DWORD
)
);
return
wine_call_to_16
(
start
,
sizeof
(
DWORD
)
);
}
HANDLE
WINAPI
CreateThread16
(
SECURITY_ATTRIBUTES
*
sa
,
DWORD
stack
,
FARPROC16
start
,
SEGPTR
param
,
...
...
tools/winebuild/relay.c
View file @
7aee9076
...
...
@@ -447,8 +447,7 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
*
* This routine builds the core routines used in 32->16 thunks:
*
* extern void WINAPI wine_call_to_16_word( SEGPTR target, int nb_args );
* extern void WINAPI wine_call_to_16_long( SEGPTR target, int nb_args );
* extern LONG WINAPI wine_call_to_16( SEGPTR target, int nb_args );
* extern void WINAPI wine_call_to_16_regs_short( const CONTEXT86 *context, int nb_args );
* extern void WINAPI wine_call_to_16_regs_long ( const CONTEXT86 *context, int nb_args );
*
...
...
@@ -469,17 +468,14 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
* core routine.
*
*/
static
void
BuildCallTo16Core
(
FILE
*
outfile
,
int
short_ret
,
int
reg_func
)
static
void
BuildCallTo16Core
(
FILE
*
outfile
,
int
reg_func
)
{
c
har
*
name
=
reg_func
==
2
?
"
regs_long"
:
reg_func
==
1
?
"
regs_short"
:
short_ret
?
"word"
:
"long
"
;
c
onst
char
*
name
=
reg_func
==
2
?
"wine_call_to_16_
regs_long"
:
reg_func
==
1
?
"wine_call_to_16_
regs_short"
:
"wine_call_to_16
"
;
/* Function header */
if
(
reg_func
==
2
)
function_header
(
outfile
,
"wine_call_to_16_regs_long"
);
else
if
(
reg_func
==
1
)
function_header
(
outfile
,
"wine_call_to_16_regs_short"
);
else
if
(
short_ret
)
function_header
(
outfile
,
"wine_call_to_16_word"
);
else
function_header
(
outfile
,
"wine_call_to_16_long"
);
function_header
(
outfile
,
name
);
/* Function entry sequence */
fprintf
(
outfile
,
"
\t
pushl %%ebp
\n
"
);
...
...
@@ -495,10 +491,10 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
if
(
UsePIC
)
{
/* Get Global Offset Table into %ebx */
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_
%s.getgot1
\n
"
,
name
);
fprintf
(
outfile
,
".L
wine_call_to_16_
%s.getgot1:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
call .L%s.getgot1
\n
"
,
name
);
fprintf
(
outfile
,
".L%s.getgot1:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
popl %%ebx
\n
"
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
wine_call_to_16_
%s.getgot1], %%ebx
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L%s.getgot1], %%ebx
\n
"
,
name
);
}
/* Print debugging info */
...
...
@@ -543,7 +539,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
/* Call the actual CallTo16 routine (simulate a lcall) */
fprintf
(
outfile
,
"
\t
pushl %%cs
\n
"
);
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_%s
\n
"
,
reg_func
?
name
:
"long"
);
fprintf
(
outfile
,
"
\t
call .L
%s
\n
"
,
name
);
/* Remove exception frame */
fprintf
(
outfile
,
"
\t
.byte 0x64
\n\t
popl (%d)
\n
"
,
STRUCTOFFSET
(
TEB
,
except
)
);
...
...
@@ -553,17 +549,9 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
if
(
!
reg_func
)
{
/* Convert and push return value */
if
(
short_ret
)
{
fprintf
(
outfile
,
"
\t
movzwl %%ax, %%eax
\n
"
);
fprintf
(
outfile
,
"
\t
pushl %%eax
\n
"
);
}
else
{
fprintf
(
outfile
,
"
\t
shll $16,%%edx
\n
"
);
fprintf
(
outfile
,
"
\t
movw %%ax,%%dx
\n
"
);
fprintf
(
outfile
,
"
\t
pushl %%edx
\n
"
);
}
fprintf
(
outfile
,
"
\t
shll $16,%%edx
\n
"
);
fprintf
(
outfile
,
"
\t
movw %%ax,%%dx
\n
"
);
fprintf
(
outfile
,
"
\t
pushl %%edx
\n
"
);
}
else
{
...
...
@@ -594,10 +582,10 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
if
(
UsePIC
)
{
/* Get Global Offset Table into %ebx (might have been overwritten) */
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_
%s.getgot2
\n
"
,
name
);
fprintf
(
outfile
,
".L
wine_call_to_16_
%s.getgot2:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
call .L%s.getgot2
\n
"
,
name
);
fprintf
(
outfile
,
".L%s.getgot2:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
popl %%ebx
\n
"
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
wine_call_to_16_
%s.getgot2], %%ebx
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L%s.getgot2], %%ebx
\n
"
,
name
);
}
/* Leave Win16 Mutex */
...
...
@@ -636,9 +624,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
/* Start of the actual CallTo16 routine */
if
(
!
reg_func
&&
short_ret
)
return
;
/* call_to_16_word uses call_to_16_long backend routine */
fprintf
(
outfile
,
".Lwine_call_to_16_%s:
\n
"
,
name
);
fprintf
(
outfile
,
".L%s:
\n
"
,
name
);
/* Switch to the 16-bit stack */
fprintf
(
outfile
,
"
\t
movl %%esp,%%edx
\n
"
);
...
...
@@ -1200,17 +1186,14 @@ void BuildRelays16( FILE *outfile )
/* C16ThkSL CallFrom16 routine */
BuildCallFrom16Core
(
outfile
,
FALSE
,
TRUE
,
FALSE
);
/* Standard CallTo16 routine (WORD return) */
BuildCallTo16Core
(
outfile
,
TRUE
,
FALSE
);
/* Standard CallTo16 routine (DWORD return) */
BuildCallTo16Core
(
outfile
,
FALSE
,
FALSE
);
/* Standard CallTo16 routine */
BuildCallTo16Core
(
outfile
,
0
);
/* Register CallTo16 routine (16:16 retf) */
BuildCallTo16Core
(
outfile
,
FALSE
,
1
);
BuildCallTo16Core
(
outfile
,
1
);
/* Register CallTo16 routine (16:32 retf) */
BuildCallTo16Core
(
outfile
,
FALSE
,
2
);
BuildCallTo16Core
(
outfile
,
2
);
/* CBClientThunkSL routine */
BuildCallTo32CBClient
(
outfile
,
FALSE
);
...
...
tools/winebuild/spec16.c
View file @
7aee9076
...
...
@@ -505,8 +505,7 @@ static void BuildCallTo16Func( FILE *outfile, const char *profile, const char *p
fprintf
(
outfile
,
" *)args = arg%d;
\n
"
,
i
+
1
);
}
fprintf
(
outfile
,
" return wine_call_to_16_%s( proc, %d );
\n
}
\n\n
"
,
short_ret
?
"word"
:
"long"
,
argsize
);
fprintf
(
outfile
,
" return wine_call_to_16( proc, %d );
\n
}
\n\n
"
,
argsize
);
#else
/* __i386__ */
fprintf
(
outfile
,
" assert(0);
\n
}
\n\n
"
);
#endif
/* __i386__ */
...
...
@@ -914,8 +913,7 @@ void BuildGlue( FILE *outfile, const char *srcdir, char **argv )
output_file_header
(
outfile
);
#ifdef __i386__
fprintf
(
outfile
,
"extern unsigned short __stdcall wine_call_to_16_word( void (*target)(), int args );
\n
"
);
fprintf
(
outfile
,
"extern unsigned int __stdcall wine_call_to_16_long( void (*target)(), int args );
\n\n
"
);
fprintf
(
outfile
,
"extern unsigned int __stdcall wine_call_to_16( void (*target)(), int args );
\n\n
"
);
#else
fprintf
(
outfile
,
"#include <assert.h>
\n\n
"
);
#endif
...
...
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