public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de
Subject: Re: [PING] Fix PR46399 - missing mode promotion for libcall args
Date: Wed, 13 Apr 2011 14:53:00 -0000	[thread overview]
Message-ID: <mcr8vve19vb.fsf@google.com> (raw)
In-Reply-To: <4DA5AC25.8030209@linux.vnet.ibm.com> (Andreas Krebbel's message	of "Wed, 13 Apr 2011 15:59:01 +0200")

Andreas Krebbel <krebbel@linux.vnet.ibm.com> writes:

> On 04/13/2011 03:31 PM, Ian Lance Taylor wrote:
>> "Andreas Krebbel" <krebbel@linux.vnet.ibm.com> writes:
>> 
>>> This fixes a wrong code generation bug for sw DFP:
>>>
>>> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00141.html
>> 
>> Why do we need a new target hook just for libcalls?  Why not just use
>> the existing TARGET_PROMOTE_FUNCTION_MODE hook?  We could say that for a
>> libcall functype is passed as NULL.  Only the SH cares about the
>> function type at all, and it is already prepared to handle NULL.
>
> But in order to preserve current behaviour all targets defining the hook then would have
> to be modified not to do any promotions if funtype is NULL.  As I understand it a target
> usually does not want the normal promotions for libcalls since libcalls follow their own ABI.

In the good old days libcalls followed their own ABI, but that is no
longer really true.  E.g., you are talking about functions in
libdecnumber, which are written in C, and follow the ordinary C ABI.  In
general gcc has been moving away from libcall-specific code and moving
toward treating libcalls and ordinary functions the same.

If there are cases where promoting is different between ordinary
libcalls and functions, those cases are most likely bugs.  The only
cases where it would not be a bug would be targets which provide libgcc
functions written in assembler.  So look at those to see if any
behaviour would change.

Ian

  reply	other threads:[~2011-04-13 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 10:54 Andreas Krebbel
2011-04-13 13:31 ` Ian Lance Taylor
2011-04-13 13:59   ` Andreas Krebbel
2011-04-13 14:53     ` Ian Lance Taylor [this message]
2011-04-18  9:23       ` Andreas Krebbel
2011-04-25 19:46         ` Ian Lance Taylor
2011-05-04 13:45         ` Richard Guenther
2011-05-04 13:45           ` Kai Tietz
2011-05-04 13:58             ` Richard Guenther
2011-05-06 16:20               ` NightStrike
  -- strict thread matches above, loose matches on Subject: below --
2011-03-28 13:14 Andreas Krebbel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mcr8vve19vb.fsf@google.com \
    --to=iant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=krebbel@linux.vnet.ibm.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).