================
@@ -2801,6 +2845,19 @@ CIRABIRewriteContext::rewriteVAArg(mlir::Operation
*vaArgOp,
return mlir::success();
}
+ // A va_list that is a single pointer walks one buffer of fixed-size slots.
+ auto vaListTy = mlir::cast<cir::PointerType>(valist.getType()).getPointee();
+ if (mlir::isa<cir::PointerType>(vaListTy) && isSlotFetch(ac)) {
+ // A value smaller than its slot would sit right-adjusted on big-endian.
+ if (cirDataLayout.isBigEndian())
+ return reportVAArgNYI(op, "a slot on a big-endian target");
+ builder.setInsertionPoint(op);
+ uint64_t slotSize = ac.directAlign->value();
----------------
skc7 wrote:
Thanks. I have split `rewriteVAArg` so it keeps the Ignore handling and then
dispatches on `CallConvTarget` in the latest patch. Could you please check if
this change is ok for incoming AArch64 changes you have?
https://github.com/llvm/llvm-project/pull/244116
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits