This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: SH-ELF: SFmode calling convention bug with -m4/-m4-single-only -ml
- To: amylaar at onetel dot net dot uk
- Subject: Re: SH-ELF: SFmode calling convention bug with -m4/-m4-single-only -ml
- From: Stephen Clarke <Stephen dot Clarke at st dot com>
- Date: Fri, 02 Nov 2001 11:45:08 -0800
- Cc: tm at kloo dot net, gcc-bugs at gcc dot gnu dot org, aoliva at redhat dot com
- Organization: STMicroelectronics
- References: <200111020036.AAA10142@meolyon.local>
amylaar@onetel.net.uk wrote:
>
> -m4-single-only is not an issue; -m4/-m4-single is.
>
> It is possible to put SFmode arguments in unnamed positions by
> using a frontend without the default promotions of C,
When does this occur?
If you're calling a C variadic
fn from another language, then you should take the C default promotions
into account.
If you're working entirely in another language, then it's
up to that language to sort out its untyped parameter rules within the
established ABI.
> or in C by using
> a prototype that pretends the arguments are named (although the latter
> would indeed be nonconforming and you can argue that you deserve whatever
> you get when you do this).
You deserve whatever you get when you do this ;-)
> Another issue are complex float (SCmode) arguments; they are not promoted
> to DCmode.
But this is a problem ...
Nevertheless, I agree with Toshi: gcc ought to follow the established SH-4
ABI, even if this means va_arg() gets more complicated for complex float.
Steve.
--
Stephen Clarke, Principal Engineer, SuperH Inc.
Phone:1-408-922-4062, Fax:1-408-954-8507, mailto:Stephen.Clarke@st.com
Mail: SuperH Inc., 3801 Zanker Rd., San Jose, CA 95134, USA.