public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>,
	'Tom de Vries' <tdevries@suse.de>,
	'Richard Biener' <rguenther@suse.de>,
	'Tobias Burnus' <tobias@codesourcery.com>
Cc: richard.sandiford@arm.com, 'Jeff Law' <law@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.
Date: Mon, 14 Mar 2022 09:08:15 -0600	[thread overview]
Message-ID: <3a1be084-94f0-d14d-7dbd-0dd190484421@gmail.com> (raw)
In-Reply-To: <01d301d8377f$0d94a7d0$28bdf770$@nextmovesoftware.com>



On 3/14/2022 2:39 AM, Roger Sayle wrote:
>
> The only (other?) possible point of contention is the (arbitrary) decision that
> when passing floating point values in a larger integer register, the code is
> hardwired to use zero-extension.  This in theory could be turned into a target
> hook to support sign-extension, but given these are padding bits, zero seems
> appropriate. [On x86_64, if passing DFmode argument in a V2DFmode vector,
> say, it seems reasonable to use movq and zero the high bits].
I'm not terribly concerned about the zero vs sign extension.

>
> The final point is that at the moment, the only affected target is nvptx-none,
> as I don't believe any other backend specifies an ABI that requires passing
> floating point values in wider integer registers.  Having said that, most targets
> don't yet support HFmode, and their ABI specifications haven't yet been
> updated as what to do in that eventuality.  If they choose to treat these like
> HImode, they'll run into the same issues, as most ABIs pass HImode in
> wider word_mode registers.
The plan for our target has been to pass around HFmode in the GPF 
registers, but in general HFmode is new enough that not many targets 
have them handled explicitly in their ABI.

Passing HFmode objects around in GPRs is odd, but not crazy so. We've 
certainly had targets where FP values would get passed around in the 
integer registers -- for example the 32 bit PA ABI mandated this kind of 
behavior in some circumstances.  Of course they also relied on the 
linker to look at the caller & callee and add a stub in between them to 
deal with mismatches :(

jeff


  parent reply	other threads:[~2022-03-14 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 20:12 Roger Sayle
2022-02-17 14:35 ` PING - " Tobias Burnus
2022-02-23  8:42   ` PING**2 " Tobias Burnus
2022-02-28  9:41     ` PING**3 " Tobias Burnus
2022-02-28 12:54       ` Richard Biener
2022-03-02 19:18         ` Jeff Law
2022-03-14  8:06           ` PING**4 " Tom de Vries
2022-03-14  8:39             ` Roger Sayle
2022-03-14  9:09               ` Richard Biener
2022-03-14  9:46                 ` Roger Sayle
2022-03-14 10:14                   ` Richard Biener
2022-03-14 11:49                     ` Roger Sayle
2022-03-14 13:27                       ` Richard Biener
2022-03-14 14:30                         ` Roger Sayle
2022-03-14 14:40                           ` Richard Biener
2022-03-14 15:31                           ` Richard Sandiford
2022-03-14 14:59                 ` Jeff Law
2022-03-14 15:08               ` Jeff Law [this message]
2022-02-22 15:42 ` Tom de Vries
2022-02-22 16:08   ` Roger Sayle
2022-02-22 22:09     ` Tom de Vries
2022-02-22 23:19       ` Roger Sayle
2022-03-14 15:30 ` Jeff Law
2022-03-14 17:24   ` Roger Sayle

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=3a1be084-94f0-d14d-7dbd-0dd190484421@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.com \
    --cc=roger@nextmovesoftware.com \
    --cc=tdevries@suse.de \
    --cc=tobias@codesourcery.com \
    /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).