public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [RFC PATCH, alpha]: ABI change: pass SFmode and SCmode variable arguments by reference
Date: Sun, 04 Sep 2016 08:04:00 -0000	[thread overview]
Message-ID: <CAFULd4ZcC82tKn_71VBHpSn9x+7Pf+5ZZj3pMsA1nmr2fMR6-Q@mail.gmail.com> (raw)
In-Reply-To: <e2406a76-e343-082a-b731-29838e397cc4@twiddle.net>

On Fri, Sep 2, 2016 at 7:17 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 09/02/2016 02:35 AM, Uros Bizjak wrote:
>> --q--
>>   /* Pass float and _Complex float variable arguments by reference.
>>      This avoids 64-bit store from a FP register to a pretend args save area
>>      and subsequent 32-bit load from the saved location to a FP register.
>>
>>      Note that 32-bit loads and stores to/from a FP register on alpha reorder
>>      bits to form a canonical 64-bit value in the FP register.  This fact
>>      invalidates compiler assumption that 32-bit FP value lives in the lower
>>      32-bits of the passed 64-bit FP value, so loading the 32-bit value from
>>      the stored 64-bit location using 32-bit FP load is invalid on alpha.
>>
>>      This introduces sort of ABI incompatibility, but until _Float32 was
>>      introduced, C-family languages promoted 32-bit float variable arg to
>>      a 64-bit double, and it was not allowed to pass float as a varible
>>      argument.  Passing _Complex float as a variable argument never
>>      worked on alpha.  Thus, we have no backward compatibility issues
>>      to worry about, and passing un-promoted _Float32 and _Complex float
>>      as a variable argument will actually work in the future.  */
>> --/q--
>
> This sounds like a good plan to me.

Thanks!

>> (I was not able to find the
>> authoritative OSF/1 ABI document on the net...)
>
> As far as I know, it was never available online.
> I have a paper copy.

FYI, after some more involved deep searching (and luck ;) I found one
at [1]. It is under "Programming Documentation Bookshelf" section, the
document is called "Calling Standard for Alpha Systems" [2].

[1] http://h41361.www4.hpe.com/docs/pub_page/V51B_DOCS/v51b_doclist.htm
[2] http://h41361.www4.hpe.com/docs/base_doc/DOCUMENTATION/V51B_ACRO_DUX/ARH9MCTE.PDF

Uros.

      reply	other threads:[~2016-09-04  7:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  9:35 Uros Bizjak
2016-09-02 12:09 ` Joseph Myers
2016-09-02 12:12   ` Jakub Jelinek
2016-09-02 12:37     ` Uros Bizjak
2016-09-02 12:49       ` Uros Bizjak
2016-09-02 13:32       ` Joseph Myers
2016-09-02 16:15         ` Mike Stump
2016-09-02 17:17 ` Richard Henderson
2016-09-04  8:04   ` Uros Bizjak [this message]

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=CAFULd4ZcC82tKn_71VBHpSn9x+7Pf+5ZZj3pMsA1nmr2fMR6-Q@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=rth@twiddle.net \
    /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).