Removed no longer used support for 32-bit register entry points.

This commit is contained in:
Alexandre Julliard 2005-05-07 18:47:22 +00:00
parent a83c19f48c
commit c0d2377565
4 changed files with 13 additions and 52 deletions

View File

@ -504,7 +504,7 @@ static int add_extra_symbol( const char **extras, int *count, const char *name,
static void add_extra_undef_symbols( const DLLSPEC *spec )
{
const char *extras[10];
int i, count = 0, nb_stubs = 0, nb_regs = 0;
int i, count = 0, nb_stubs = 0;
int kernel_imports = 0, ntdll_imports = 0;
sort_symbols( undef_symbols, nb_undef_symbols );
@ -513,7 +513,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
{
ORDDEF *odp = &spec->entry_points[i];
if (odp->type == TYPE_STUB) nb_stubs++;
if (odp->flags & FLAG_REGISTER) nb_regs++;
}
/* add symbols that will be contained in the spec file itself */
@ -536,8 +535,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
kernel_imports += add_extra_symbol( extras, &count, "GetProcAddress", spec );
kernel_imports += add_extra_symbol( extras, &count, "RaiseException", spec );
}
if (nb_regs)
ntdll_imports += add_extra_symbol( extras, &count, "__wine_call_from_32_regs", spec );
if (nb_stubs)
ntdll_imports += add_extra_symbol( extras, &count, "RtlRaiseException", spec );

View File

@ -513,6 +513,12 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
odp->ordinal = ordinal;
}
if (spec->type == SPEC_WIN32 && odp->flags & FLAG_REGISTER)
{
error( "-register flag not supported for Win32 entry points\n" );
goto error;
}
if (odp->type == TYPE_STDCALL && !(odp->flags & FLAG_PRIVATE))
{
if (!strcmp( odp->name, "DllRegisterServer" ) ||

View File

@ -175,9 +175,7 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
case TYPE_CDECL:
if (!(odp->flags & FLAG_FORWARD))
{
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") "\\n\"\n",
(odp->flags & FLAG_REGISTER) ? make_internal_name( odp, spec, "regs" )
: odp->link_name );
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") "\\n\"\n", odp->link_name );
}
else
{
@ -260,7 +258,6 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
{
ORDDEF *odp = spec->ordinals[i];
unsigned int j, args, mask = 0;
const char *name;
/* skip nonexistent entry points */
if (!odp) goto ignore;
@ -276,22 +273,20 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
}
if ((odp->flags & FLAG_RET64) && (j < 16)) mask |= 0x80000000;
name = odp->link_name;
args = strlen(odp->u.func.arg_types) * sizeof(int);
if (odp->flags & FLAG_REGISTER) name = make_internal_name( odp, spec, "regs" );
switch(odp->type)
{
case TYPE_STDCALL:
fprintf( outfile, " \"\\tjmp " __ASM_NAME("%s") "\\n\"\n", name );
fprintf( outfile, " \"\\tjmp " __ASM_NAME("%s") "\\n\"\n", odp->link_name );
fprintf( outfile, " \"\\tret $%d\\n\"\n", args );
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") ",0x%08x\\n\"\n", name, mask );
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") ",0x%08x\\n\"\n", odp->link_name, mask );
break;
case TYPE_CDECL:
fprintf( outfile, " \"\\tjmp " __ASM_NAME("%s") "\\n\"\n", name );
fprintf( outfile, " \"\\tjmp " __ASM_NAME("%s") "\\n\"\n", odp->link_name );
fprintf( outfile, " \"\\tret\\n\"\n" );
fprintf( outfile, " \"\\t" __ASM_SHORT " %d\\n\"\n", args );
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") ",0x%08x\\n\"\n", name, mask );
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") ",0x%08x\\n\"\n", odp->link_name, mask );
break;
default:
assert(0);
@ -366,38 +361,6 @@ static void output_stub_funcs( FILE *outfile, DLLSPEC *spec )
}
/*******************************************************************
* output_register_funcs
*
* Output the functions for register entry points
*/
static void output_register_funcs( FILE *outfile, DLLSPEC *spec )
{
const char *name;
int i;
for (i = 0; i < spec->nb_entry_points; i++)
{
const ORDDEF *odp = &spec->entry_points[i];
if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL) continue;
if (!(odp->flags & FLAG_REGISTER)) continue;
if (odp->flags & FLAG_FORWARD) continue;
name = make_internal_name( odp, spec, "regs" );
fprintf( outfile,
"asm(\".align %d\\n\\t\"\n"
" \"" __ASM_FUNC("%s") "\\n\\t\"\n"
" \"" __ASM_NAME("%s") ":\\n\\t\"\n"
" \"call " __ASM_NAME("__wine_call_from_32_regs") "\\n\\t\"\n"
" \".long " __ASM_NAME("%s") "\\n\\t\"\n"
" \".byte %d,%d\");\n",
get_alignment(4),
name, name, odp->link_name,
strlen(odp->u.func.arg_types) * sizeof(int),
(odp->type == TYPE_CDECL) ? 0 : (strlen(odp->u.func.arg_types) * sizeof(int)) );
}
}
/*******************************************************************
* output_dll_init
*
@ -560,10 +523,6 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf( outfile, "static void __asm__dummy(void) {\n" );
fprintf( outfile, "#endif /* !defined(__GNUC__) */\n" );
/* Output code for all register functions */
output_register_funcs( outfile, spec );
/* Output the exports and relay entry points */
exports_size = output_exports( outfile, nr_exports, spec );
@ -863,7 +822,6 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec )
int is_data = 0;
if (!odp) continue;
if (odp->flags & FLAG_REGISTER) continue;
if (odp->type == TYPE_STUB) continue;
if (odp->name) name = odp->name;

View File

@ -250,7 +250,7 @@ The function returns a 64-bit value (Win32 only).
The entry point is only available on i386 platforms.
.TP
.B -register
The function uses CPU register to pass arguments.
The function uses CPU register to pass arguments (Win16 only).
.TP
.B -private
The function cannot be imported from other dlls, it can only be