This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SH-ELF: SFmode calling convention bug with -m4/-m4-single-only -ml


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]