mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-07 09:08:44 +00:00
winebuild: Only allow the stdcall calling convention for system calls.
This commit is contained in:
parent
4a0f3fbcb5
commit
921367fc57
|
@ -1437,7 +1437,7 @@ void output_syscalls( DLLSPEC *spec )
|
||||||
output( "\tmovl $%s,%%edx\n", asm_name("__wine_syscall") );
|
output( "\tmovl $%s,%%edx\n", asm_name("__wine_syscall") );
|
||||||
}
|
}
|
||||||
output( "\tcall *%%edx\n" );
|
output( "\tcall *%%edx\n" );
|
||||||
output( "\tret $%u\n", odp->type == TYPE_STDCALL ? get_args_size( odp ) : 0 );
|
output( "\tret $%u\n", get_args_size( odp ));
|
||||||
break;
|
break;
|
||||||
case CPU_x86_64:
|
case CPU_x86_64:
|
||||||
/* Chromium depends on syscall thunks having the same form as on
|
/* Chromium depends on syscall thunks having the same form as on
|
||||||
|
|
|
@ -315,9 +315,9 @@ static int parse_spec_arguments( ORDDEF *odp, DLLSPEC *spec, int optional )
|
||||||
}
|
}
|
||||||
if (odp->flags & FLAG_SYSCALL)
|
if (odp->flags & FLAG_SYSCALL)
|
||||||
{
|
{
|
||||||
if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL)
|
if (odp->type != TYPE_STDCALL)
|
||||||
{
|
{
|
||||||
error( "A syscall function must use either the stdcall or the cdecl convention\n" );
|
error( "A syscall function must use the stdcall convention\n" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue