772 . [ Procedure Calling Convention] ( #procedure-calling-convention )
88 * [Integer Calling Convention](#integer-calling-convention)
99 * [Hardware Floating-point Calling Convention](#hardware-floating-point-calling-convention)
10- * [RV32E Calling Convention](#rv32e-calling-convention)
10+ * [ILP32E Calling Convention](#ilp32e-calling-convention)
11+ * [Named ABIs](#named-abis)
1112 * [Default ABIs](#default-abis)
12133 . [ C type details] ( #c-types )
1314 * [C type sizes and alignments](#c-type-sizes)
@@ -184,9 +185,9 @@ whether or not the integer registers have been exhausted.
184185The remainder of this section applies only to named arguments. Variadic
185186arguments are passed according to the integer calling convention.
186187
187- For the purposes of this section, FLEN refers to the width of a
188- floating-point register in the ABI. The ISA might have wider
189- floating-point registers than the ABI.
188+ For the purposes of this section, FLEN refers to the width of a floating-point
189+ register in the ABI. The ABI's FLEN must be no wider than the ISA's FLEN. The
190+ ISA might have wider floating-point registers than the ABI.
190191
191192For the purposes of this section, "struct" refers to a C struct with its
192193hierarchy flattened, including any array fields. That is, `struct { struct
@@ -235,18 +236,58 @@ type would be passed.
235236Floating-point registers fs0-fs11 shall be preserved across procedure calls,
236237provided they hold values no more than FLEN bits wide.
237238
238- ## <a name =rv32e -calling-convention ></a > RV32E Calling Convention
239+ ## <a name =ilp32e -calling-convention ></a > ILP32E Calling Convention
239240
240- The RV32E calling convention is designed to be usable with the RV32E ISA.
241- This calling convention is the same as the integer calling convention,
242- except for the following differences. The stack pointer need only be aligned
243- to a 32-bit boundary. Registers x16-x31 do not participate in the ABI , so
241+ The ILP32E calling convention is designed to be usable with the RV32E ISA. This
242+ calling convention is the same as the integer calling convention, except for the
243+ following differences. The stack pointer need only be aligned to a 32-bit
244+ boundary. Registers x16-x31 do not participate in the calling convention , so
244245there are only six argument registers, a0-a5, only two callee-saved registers,
245246s0-s1, and only three temporaries, t0-t2.
246247
247248If used with an ISA that has any of the registers x16-x31 and f0-f31, then
248249these registers are considered temporaries.
249250
251+ ## <a name =named-abis ></a > Named ABIs
252+
253+ This specification defines the following named ABIs:
254+
255+ * <a name =abi-ilp32 ></a > ** ILP32** : Integer calling-convention only, hardware
256+ floating-point calling convention is not used (i.e. ELFCLASS32 and
257+ EF_RISCV_FLOAT_ABI_SOFT).
258+
259+ * <a name =abi-ilp32f ></a > ** ILP32F** : ILP32 with hardware floating-point calling
260+ convention for FLEN=32 (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_SINGLE).
261+
262+ * <a name =abi-ilp32d ></a > ** ILP32D** : ILP32 with hardware floating-point calling
263+ convention for FLEN=64 (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_DOUBLE).
264+
265+ * <a name =abi-ilp32e ></a > ** ILP32E** : [ ILP32E
266+ calling-convention] ( #ilp32e-calling-convention ) only, hardware floating-point
267+ calling convention is not used (i.e. ELFCLASS32, EF_RISCV_FLOAT_ABI_SOFT, and
268+ EF_RISCV_RVE).
269+
270+ * <a name =abi-lp64 ></a > ** LP64** : Integer calling-convention only, hardware
271+ floating-point calling convention is not used (i.e. ELFCLASS64 and
272+ EF_RISCV_FLOAT_ABI_SOFT).
273+
274+ * <a name =abi-lp64f ></a > ** LP64F** : LP64 with hardware floating-point calling
275+ convention for FLEN=32 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_SINGLE).
276+
277+ * <a name =abi-lp64d ></a > ** LP64D** : LP64 with hardware floating-point calling
278+ convention for FLEN=64 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_DOUBLE).
279+
280+ * <a name =abi-lp64q ></a > ** LP64Q** : LP64 with hardware floating-point calling
281+ convention for FLEN=128 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_QUAD).
282+
283+ The ILP32\* ABIs are only compatible with RV32\* ISAs, and the LP64\* ABIs are
284+ only compatible with RV64\* ISAs. A future version of this specification may
285+ define an ILP32 ABI for the RV64 ISA, but currently this is not a supported
286+ operating mode.
287+
288+ The \* F ABIs require the \* F ISA extension, the \* D ABIs require the \* D ISA
289+ extension, and the LP64Q ABI requires the Q ISA extension.
290+
250291## <a name =default-abis ></a > Default ABIs
251292
252293While various different ABIs are technically possible, for software
@@ -264,16 +305,13 @@ default ABIs for specific architectures:
264305 * ** on RV32G** : ILP32D, with floats and doubles passed in floating point
265306 registers (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_DOUBLE).
266307
267- A future version of this specification may define an ILP32 ABI for
268- RV64G, but currently this is not a supported operating mode.
269-
270308# <a name =c-types ></a > C type details
271309## <a name =c-type-sizes ></a > C type sizes and alignments
272310
273311There are two conventions for C type sizes and alignments.
274312
275- * ** LP64, LP64F, and LP64D ** : use the following type sizes and alignments
276- (based on the LP64 convention):
313+ * ** LP64, LP64F, LP64D, and LP64Q ** : use the following type sizes and
314+ alignments (based on the LP64 convention):
277315
278316 Type | Size (Bytes) | Alignment (Bytes)
279317 ---------------------|---------------|------------------
@@ -292,8 +330,8 @@ There are two conventions for C type sizes and alignments.
292330 double _ Complex | 16 | 8
293331 long double _ Complex | 32 | 16
294332
295- * ** ILP32, ILP32F, and ILP32D ** : use the following type sizes and alignments
296- (based on the ILP32 convention):
333+ * ** ILP32, ILP32F, ILP32D, and ILP32E ** : use the following type sizes and
334+ alignments (based on the ILP32 convention):
297335
298336 Type | Size (Bytes) | Alignment (Bytes)
299337 ---------------------|---------------|------------------
0 commit comments