public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "rehn at rivosinc dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug backends/31142] riscv pass_by_flattened_arg not implemented
Date: Tue, 12 Dec 2023 12:26:57 +0000	[thread overview]
Message-ID: <bug-31142-10460-qTUTbfRCzh@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31142-10460@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31142

Robbin Ehn <rehn at rivosinc dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rehn at rivosinc dot com

--- Comment #1 from Robbin Ehn <rehn at rivosinc dot com> ---
I'm no expert in RV ABI, but from 18.2 RVG Calling Convention:

"Values are returned from functions in integer registers a0 and a1 and
floating-point registers fa0 and fa1. Floating-point values are returned in
floating-point registers only if they are primitives or members of a struct
consisting of only one or two floating-point values. Other return values that
fit into two pointer-words are returned in a0 and a1. Larger return values are
passed entirely
in memory; the caller allocates this memory region and passes a pointer to it
as an implicit first parameter to the callee."

AFAICT they should be packed into a0+a1 seen as 8/16 byte field.

rv32 a0 would be quot and a1 would be rem
rv64 a0 low 32-bit would be quot and a0 high 32-bit would be rem

This seems to be inline with what clang do, removes sign extension, shift and
or the values in.

Did this help ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2023-12-12 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 22:47 [Bug backends/31142] New: " mark at klomp dot org
2023-12-12 12:26 ` rehn at rivosinc dot com [this message]
2023-12-12 12:50 ` [Bug backends/31142] " palmer at gcc dot gnu.org
2023-12-13 15:01 ` mark at klomp dot org
2023-12-21  1:41 ` mark at klomp dot org
2024-03-20 15:10 ` mark at klomp dot org
2024-03-20 19:40 ` mark at klomp dot org

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=bug-31142-10460-qTUTbfRCzh@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /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).