[clang] [llvm] [BPF] Support Stack Arguments (PR #189060)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 09:06:09 PDT 2026
================
@@ -504,8 +539,9 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
unsigned NumBytes = CCInfo.getStackSize();
- if (Outs.size() > MaxArgs)
- fail(CLI.DL, DAG, "too many arguments", Callee);
+ if (hasSplitArg(ArgLocs, [&](size_t I) { return Outs[I].OrigArgIndex; }))
----------------
4ast wrote:
> I did this due to X86_64 calling convention. For example, for x86, we have
>
> ```
> struct t {long a; long b;};
> int foo(int a, int b, int c, int d, int e, struct t f, int g) { ... }
> ```
>
> What it actually is "a: RDI, b: RSI, c: RDX, d: RCX, e: R8, g: R9, f: on the stack". Do we want to follow X86 calling convention like the above?
yes. we should do the same
https://github.com/llvm/llvm-project/pull/189060
More information about the cfe-commits
mailing list