Commit 9cda4233 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Pass 16-byte structures by value on ARM64.

parent cc88d917
...@@ -431,7 +431,18 @@ static unsigned int get_stack_size( const var_t *var, int *by_value ) ...@@ -431,7 +431,18 @@ static unsigned int get_stack_size( const var_t *var, int *by_value )
case TGT_UNION: case TGT_UNION:
case TGT_USER_TYPE: case TGT_USER_TYPE:
stack_size = type_memsize( var->declspec.type ); stack_size = type_memsize( var->declspec.type );
by_val = (pointer_size < 8 || stack_size <= pointer_size); /* FIXME: should be platform-specific */ switch (target.cpu)
{
case CPU_x86_64:
by_val = (stack_size <= pointer_size);
break;
case CPU_ARM64:
by_val = (stack_size <= 2 * pointer_size);
break;
default:
by_val = 1;
break;
}
break; break;
default: default:
by_val = 0; by_val = 0;
......
...@@ -89,7 +89,7 @@ static const char usage[] = ...@@ -89,7 +89,7 @@ static const char usage[] =
static const char version_string[] = "Wine IDL Compiler version " PACKAGE_VERSION "\n" static const char version_string[] = "Wine IDL Compiler version " PACKAGE_VERSION "\n"
"Copyright 2002 Ove Kaaven\n"; "Copyright 2002 Ove Kaaven\n";
static struct target target; struct target target = { 0 };
int debuglevel = DEBUGLEVEL_NONE; int debuglevel = DEBUGLEVEL_NONE;
int parser_debug, yy_flex_debug; int parser_debug, yy_flex_debug;
......
...@@ -71,6 +71,7 @@ extern const char *prefix_client; ...@@ -71,6 +71,7 @@ extern const char *prefix_client;
extern const char *prefix_server; extern const char *prefix_server;
extern unsigned int packing; extern unsigned int packing;
extern unsigned int pointer_size; extern unsigned int pointer_size;
extern struct target target;
extern time_t now; extern time_t now;
extern int open_typelib( const char *name ); extern int open_typelib( const char *name );
......
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