From 2fe83a0c9f923c21c75498982c2606beacc3f5d6 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 27 Jul 2011 17:33:50 +0200 Subject: i386.c (ix86_option_override_internal): Allow -mabi for 32-bit, too. * config/i386/i386.c (ix86_option_override_internal): Allow -mabi for 32-bit, too. (ix86_handle_abi_attribute): Allow function attributes ms_abi/sysv_abi in 32-bit mode, too. * doc/extend.texi: Adjust attribute documentation. * gcc.target/i386/aggregate-ret3.c: New test. * gcc.target/i386/aggregate-ret4.c: New test. From-SVN: r176828 --- gcc/doc/extend.texi | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'gcc/doc') diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index dcbf29f..0c95a79 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2819,15 +2819,15 @@ defined by shared libraries. @cindex @code{ms_abi} attribute @cindex @code{sysv_abi} attribute -On 64-bit x86_64-*-* targets, you can use an ABI attribute to indicate -which calling convention should be used for a function. The @code{ms_abi} -attribute tells the compiler to use the Microsoft ABI, while the -@code{sysv_abi} attribute tells the compiler to use the ABI used on -GNU/Linux and other systems. The default is to use the Microsoft ABI -when targeting Windows. On all other systems, the default is the AMD ABI. +On 32-bit and 64-bit (i?86|x86_64)-*-* targets, you can use an ABI attribute +to indicate which calling convention should be used for a function. The +@code{ms_abi} attribute tells the compiler to use the Microsoft ABI, +while the @code{sysv_abi} attribute tells the compiler to use the ABI +used on GNU/Linux and other systems. The default is to use the Microsoft ABI +when targeting Windows. On all other systems, the default is the x86/AMD ABI. -Note, the @code{ms_abi} attribute for Windows targets currently requires -the @option{-maccumulate-outgoing-args} option. +Note, the @code{ms_abi} attribute for Windows 64-bit targets currently +requires the @option{-maccumulate-outgoing-args} option. @item callee_pop_aggregate_return (@var{number}) @cindex @code{callee_pop_aggregate_return} attribute @@ -2839,6 +2839,9 @@ zero -, or if the callee is responsible to pop hidden pointer - @var{number} equal to one. The default i386 ABI assumes that the callee pops the stack for hidden pointer. +Note, that on 32-bit i386 Windows targets the compiler assumes that the +caller pops the stack for hidden pointer. + @item ms_hook_prologue @cindex @code{ms_hook_prologue} attribute -- cgit v1.1