Commit c0d23775 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent a83c19f4
...@@ -504,7 +504,7 @@ static int add_extra_symbol( const char **extras, int *count, const char *name, ...@@ -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 ) static void add_extra_undef_symbols( const DLLSPEC *spec )
{ {
const char *extras[10]; 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; int kernel_imports = 0, ntdll_imports = 0;
sort_symbols( undef_symbols, nb_undef_symbols ); sort_symbols( undef_symbols, nb_undef_symbols );
...@@ -513,7 +513,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec ) ...@@ -513,7 +513,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
{ {
ORDDEF *odp = &spec->entry_points[i]; ORDDEF *odp = &spec->entry_points[i];
if (odp->type == TYPE_STUB) nb_stubs++; 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 */ /* add symbols that will be contained in the spec file itself */
...@@ -536,8 +535,6 @@ static void add_extra_undef_symbols( const DLLSPEC *spec ) ...@@ -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, "GetProcAddress", spec );
kernel_imports += add_extra_symbol( extras, &count, "RaiseException", 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) if (nb_stubs)
ntdll_imports += add_extra_symbol( extras, &count, "RtlRaiseException", spec ); ntdll_imports += add_extra_symbol( extras, &count, "RtlRaiseException", spec );
......
...@@ -513,6 +513,12 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec ) ...@@ -513,6 +513,12 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
odp->ordinal = ordinal; 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 (odp->type == TYPE_STDCALL && !(odp->flags & FLAG_PRIVATE))
{ {
if (!strcmp( odp->name, "DllRegisterServer" ) || if (!strcmp( odp->name, "DllRegisterServer" ) ||
......
...@@ -175,9 +175,7 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec ) ...@@ -175,9 +175,7 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
case TYPE_CDECL: case TYPE_CDECL:
if (!(odp->flags & FLAG_FORWARD)) if (!(odp->flags & FLAG_FORWARD))
{ {
fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") "\\n\"\n", fprintf( outfile, " \"\\t.long " __ASM_NAME("%s") "\\n\"\n", odp->link_name );
(odp->flags & FLAG_REGISTER) ? make_internal_name( odp, spec, "regs" )
: odp->link_name );
} }
else else
{ {
...@@ -260,7 +258,6 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec ) ...@@ -260,7 +258,6 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
{ {
ORDDEF *odp = spec->ordinals[i]; ORDDEF *odp = spec->ordinals[i];
unsigned int j, args, mask = 0; unsigned int j, args, mask = 0;
const char *name;
/* skip nonexistent entry points */ /* skip nonexistent entry points */
if (!odp) goto ignore; if (!odp) goto ignore;
...@@ -276,22 +273,20 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec ) ...@@ -276,22 +273,20 @@ static int output_exports( FILE *outfile, int nr_exports, DLLSPEC *spec )
} }
if ((odp->flags & FLAG_RET64) && (j < 16)) mask |= 0x80000000; if ((odp->flags & FLAG_RET64) && (j < 16)) mask |= 0x80000000;
name = odp->link_name;
args = strlen(odp->u.func.arg_types) * sizeof(int); args = strlen(odp->u.func.arg_types) * sizeof(int);
if (odp->flags & FLAG_REGISTER) name = make_internal_name( odp, spec, "regs" );
switch(odp->type) switch(odp->type)
{ {
case TYPE_STDCALL: 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, " \"\\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; break;
case TYPE_CDECL: 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, " \"\\tret\\n\"\n" );
fprintf( outfile, " \"\\t" __ASM_SHORT " %d\\n\"\n", args ); 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; break;
default: default:
assert(0); assert(0);
...@@ -367,38 +362,6 @@ static void output_stub_funcs( FILE *outfile, DLLSPEC *spec ) ...@@ -367,38 +362,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 * output_dll_init
* *
* Output code for calling a dll constructor and destructor. * Output code for calling a dll constructor and destructor.
...@@ -560,10 +523,6 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec ) ...@@ -560,10 +523,6 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf( outfile, "static void __asm__dummy(void) {\n" ); fprintf( outfile, "static void __asm__dummy(void) {\n" );
fprintf( outfile, "#endif /* !defined(__GNUC__) */\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 */ /* Output the exports and relay entry points */
exports_size = output_exports( outfile, nr_exports, spec ); exports_size = output_exports( outfile, nr_exports, spec );
...@@ -863,7 +822,6 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec ) ...@@ -863,7 +822,6 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec )
int is_data = 0; int is_data = 0;
if (!odp) continue; if (!odp) continue;
if (odp->flags & FLAG_REGISTER) continue;
if (odp->type == TYPE_STUB) continue; if (odp->type == TYPE_STUB) continue;
if (odp->name) name = odp->name; if (odp->name) name = odp->name;
......
...@@ -250,7 +250,7 @@ The function returns a 64-bit value (Win32 only). ...@@ -250,7 +250,7 @@ The function returns a 64-bit value (Win32 only).
The entry point is only available on i386 platforms. The entry point is only available on i386 platforms.
.TP .TP
.B -register .B -register
The function uses CPU register to pass arguments. The function uses CPU register to pass arguments (Win16 only).
.TP .TP
.B -private .B -private
The function cannot be imported from other dlls, it can only be The function cannot be imported from other dlls, it can only be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment