This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Fix PR target/36834 by adding new -mms-aggregate-return option for MS compatibility
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Jul 2008 21:10:04 -0400 (EDT)
- Subject: Re: [Patch] Fix PR target/36834 by adding new -mms-aggregate-return option for MS compatibility
Mark Mitchell writes:
>I don't understand the objection. It seems "ms_abi" could have the same
>meaning in 32-bit mode: use the ABI that Microsoft uses.
No, it couldn't. The badly named "ms_abi" attribute means to use the
calling convention Microsoft uses for 64-bit code, distinct from the one
GCC uses for 64-bit Linux code. Microsoft's 64-bit compiler only supports
a single calling convention and there's only a single calling convention
defined by the System V ABI. These are two very different conventions,
and they are the only two 64-bit GCC supports. However, as I've said many
times now, IN 32-BIT CODE THERE ARE MORE THAN TWO CALLING CONVENTIONS
TO CHOOSE FROM. Microsoft's C compiler supports at least three, and GCC
currently supports 18. There isn't a single, sole Microsoft convention
for the "ms_abi" attribute to select. If you were to use this attribute
in the 32-bit compiler, you would necessarily be giving it a different
meaning.
Ross Ridge