https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82717
--- Comment #4 from palmer at gcc dot gnu.org --- (In reply to Alex Bradbury from comment #2) > (In reply to palmer from comment #1) > > Thanks Alex -- you're correct that this is a documentation/code mismatch. I > > just talked to Andrew and we think it's best to change the documentation. > > How does this sound: > > > > """ > > @item -mabi=@var{ABI-string} > > @opindex mabi > > Specify integer and floating-point calling convention. The default for this > > argument is system dependent, users who want a specific calling convention > > should specify one explicitly. The valid calling conventions are: ilp32, > > ilp32f, ilp32d, lp64, lp64f, and lp64d. > > """ > > I can see how a doc fix probably makes most sense at this point, as the > behaviour has been shipping in GCC for a while. Although I like the idea of > less typing it could be that inferring a default ABI from the target -march > was a little too magic in the first place. We kicked around the idea of making GCC match the docs, but decided that the whole reason we have two arguments here is because there's no way to guess at the ABI from the ISA. For example, what happens if you pass "-march=rv64imafc" on a Linux system? The "use the natural ABI" convention would say you get "-mabi=lp64f", but we don't build as part of the multilib set of Linux. > I'd also suggest adding another sentence or two to explain that ilp32 and > lp64 describe soft-float calling conventions, while the f and d suffixes > indicate hard single or double precision floating point calling conventions. """ @item -mabi=@var{ABI-string} @opindex mabi Specify integer and floating-point calling convention. @var{ABI-string} contains two parts: the size of integer types and the registers used for floating-point types. For example "-march=rv64ifd -mabi=lp64d" means that "long" and pointers are 64-bit (implicitly defining "int" to be 32-bit), and that floating-point values up to 64 bits wide are passed in F registers. Contrast this with "-march=rv64ifd -mabi=lp64f", which still allows the compiler to generate code that uses the F and D extensions but only allows floating-point values up to 32 bits long to be passed in registers; or "-march=rv64ifd -mabi=lp64", in which no floating-point arguments will be passed in registers. The default for this argument is system dependent, users who want a specific calling convention should specify one explicitly. The valid calling conventions are: ilp32, ilp32f, ilp32d, lp64, lp64f, and lp64d. Some calling conventions are impossible to implement on some ISAs: for example, "-march=rv32if -mabi=ilp32d" is invalid because the ABI requires 64-bit values be passed in F registers, but F registers are only 32 bits wide. """