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

Palmer Dabbelt <palmer at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palmer at gcc dot gnu.org

--- Comment #2 from Palmer Dabbelt <palmer at gcc dot gnu.org> ---
(In reply to Robbin Ehn from comment #1)
> 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 ?

FWIW, that looks right to me.  I haven't really poked around elfutils before,
though, so I'm not really sure how to implement it...

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

Reply via email to