[clang] [RISCV] Disable rounding of aggregate return/arguments to iXLen. (PR #184736)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 12:06:23 PST 2026
================
@@ -721,18 +721,22 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
if (Size <= 2 * XLen) {
unsigned Alignment = getContext().getTypeAlign(Ty);
- // Use a single XLen int if possible, 2*XLen if 2*XLen alignment is
- // required, and a 2-element XLen array if only XLen alignment is required.
if (Size <= XLen) {
+ // For big endian, we need to extend the type to XLen.
----------------
efriedma-quic wrote:
Could you explain a little more why endianness matters here? Does big-endian RISCV pass `short` differently from `struct X { short x; }`?
https://github.com/llvm/llvm-project/pull/184736
More information about the cfe-commits
mailing list