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
e56d9dea
Commit
e56d9dea
authored
Jul 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added vararg argument type so that the relay code can distinguish from
a normal cdecl function. Don't rely on the relay thunk preserving the stack pointer.
parent
1943208e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
relay16.c
dlls/kernel/relay16.c
+6
-0
winbase16.h
include/wine/winbase16.h
+2
-1
relay.c
tools/winebuild/relay.c
+2
-1
spec16.c
tools/winebuild/spec16.c
+2
-1
No files found.
dlls/kernel/relay16.c
View file @
e56d9dea
...
...
@@ -334,6 +334,9 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
debugstr_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
args16
+=
sizeof
(
SEGPTR
);
break
;
case
ARG_VARARG
:
DPRINTF
(
"..."
);
break
;
default:
break
;
}
...
...
@@ -374,6 +377,9 @@ void RELAY_DebugCallFrom16( CONTEXT86 *context )
DPRINTF
(
"%04x:%04x %s"
,
*
(
WORD
*
)(
args16
+
2
),
*
(
WORD
*
)
args16
,
debugstr_a
(
MapSL
(
*
(
SEGPTR
*
)
args16
))
);
break
;
case
ARG_VARARG
:
DPRINTF
(
"..."
);
break
;
default:
break
;
}
...
...
include/wine/winbase16.h
View file @
e56d9dea
...
...
@@ -213,7 +213,8 @@ enum arg_types
ARG_LONG
,
/* long or segmented pointer */
ARG_PTR
,
/* linear pointer */
ARG_STR
,
/* linear pointer to null-terminated string */
ARG_SEGSTR
/* segmented pointer to null-terminated string */
ARG_SEGSTR
,
/* segmented pointer to null-terminated string */
ARG_VARARG
/* start of varargs */
};
/* flags added to arg_types[0] */
...
...
tools/winebuild/relay.c
View file @
e56d9dea
...
...
@@ -369,7 +369,8 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
if
(
reg_func
)
{
fprintf
(
outfile
,
"
\t
movl %%esp, %%ebx
\n
"
);
fprintf
(
outfile
,
"
\t
leal -%d(%%ebp), %%ebx
\n
"
,
sizeof
(
CONTEXT
)
+
STRUCTOFFSET
(
STACK32FRAME
,
ebp
)
);
/* Switch stack back */
fprintf
(
outfile
,
"
\t
.byte 0x64
\n\t
movw (%d), %%ss
\n
"
,
STACKOFFSET
+
2
);
...
...
tools/winebuild/spec16.c
View file @
e56d9dea
...
...
@@ -254,7 +254,7 @@ static void BuildCallFrom16Func( FILE *outfile, const char *profile, const char
fprintf
(
outfile
,
"void"
);
fprintf
(
outfile
,
" );
\n
"
);
fprintf
(
outfile
,
"static %s __
stdcall __
wine_%s_CallFrom16_%s( proc_%s_t proc, unsigned char *args%s )
\n
"
,
fprintf
(
outfile
,
"static %s __wine_%s_CallFrom16_%s( proc_%s_t proc, unsigned char *args%s )
\n
"
,
ret_type
,
make_c_identifier
(
prefix
),
profile
,
profile
,
reg_func
?
", void *context"
:
""
);
...
...
@@ -781,6 +781,7 @@ void BuildSpec16File( FILE *outfile, DLLSPEC *spec )
}
arg_types
[
j
/
10
]
|=
type
<<
(
3
*
(
j
%
10
));
}
if
(
typelist
[
i
]
->
type
==
TYPE_VARARGS
)
arg_types
[
j
/
10
]
|=
ARG_VARARG
<<
(
3
*
(
j
%
10
));
if
(
typelist
[
i
]
->
flags
&
FLAG_REGISTER
)
arg_types
[
0
]
|=
ARG_REGISTER
;
if
(
typelist
[
i
]
->
flags
&
FLAG_RET16
)
arg_types
[
0
]
|=
ARG_RET16
;
...
...
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