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 via email to