public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* TARGET_PROMOTE_PROTOTYPES on the SPARC
@ 2010-11-02 19:21 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2010-11-02 19:21 UTC (permalink / raw)
  To: rth, davem, jakub; +Cc: Jorge PEREZ, gcc

The current definition of TARGET_PROMOTE_PROTOTYPES on the SPARC is:

static bool
sparc_promote_prototypes (const_tree fntype ATTRIBUTE_UNUSED)
{
  return TARGET_ARCH32 ? true : false;
}


As Jorge pointed out, in 32-bit mode this generates extensions of the argument 
registers in the callee that are redundant, at least according to the latest 
version (3rd) of the psABI: it says that the argument registers are already 
extended by the caller if there is a prototype.  Therefore, Jorge suggests 
that we return false in 32-bit mode too (this is PR target/46208).

Ironically enough, returning true in 32-bit mode is partly used to implement 
the psABI; you cannot simply toggle the return value, further adjustments are 
needed to compensate.  But this should ultimately work, as in 64-bit mode.

Are there still any good reasons to keep the old setting at this point?

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-02 18:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02 19:21 TARGET_PROMOTE_PROTOTYPES on the SPARC Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).