Skip to content

Commit 7930366

Browse files
asbaswaterman
authored andcommitted
Fix contradictory description of extension requirements for int in int+fp structs for the FP ABI (#89)
Pull request #74 clarified that when an int+fp struct is passed in a GPR+FPR in the floating point ABI, the integer isn't extended to XLEN (i.e. it is anyext, just as if it were passed on the stack). Unfortunately, a previous part of the sentence which mandated sign/zero-extension was left in. This patch removes the contradictory information.
1 parent 29b3661 commit 7930366

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

riscv-elf.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This RISC-V ELF psABI specification document is
3333
&copy; 2016 Kito Cheng <[email protected]>
3434
&copy; 2016-2017 Andrew Waterman <[email protected]>
3535
&copy; 2016-2017 Michael Clark <[email protected]>
36-
&copy; 2017-2018 Alex Bradbury <[email protected]>
36+
&copy; 2017-2019 Alex Bradbury <[email protected]>
3737
&copy; 2017 David Horner <[email protected]>
3838
&copy; 2017 Max Nordlund <[email protected]>
3939
&copy; 2017 Karsten Merker <[email protected]>
@@ -208,12 +208,11 @@ floating-point reals.
208208

209209
A struct containing one floating-point real and one integer (or bitfield), in
210210
either order, is passed in a floating-point register and an integer register,
211-
with the integer zero- or sign-extended as though it were a scalar, provided
212-
the floating-point real is no more than FLEN bits wide and the integer is no
213-
more than XLEN bits wide, and at least one floating-point argument register
214-
and at least one integer argument register is available, with the integer
215-
placed in its argument register without extension to XLEN bits. Otherwise,
216-
it is passed according to the integer calling convention.
211+
without extending the integer to XLEN bits, provided the floating-point real
212+
is no more than FLEN bits wide and the integer is no more than XLEN bits wide,
213+
and at least one floating-point argument register and at least one integer
214+
argument register is available. Otherwise, it is passed according to the
215+
integer calling convention.
217216

218217
Unions are never flattened and are always passed according to the integer
219218
calling convention.

0 commit comments

Comments
 (0)