================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to