On Fri, May 31, 2024 at 08:45:54AM +0100, Richard Sandiford wrote: > > When you say same way, do you mean the way SVE ABI defines the rules for > > SVE types? > > No, sorry, I meant that if the choice isn't purely local to a source > code function, the condition should be something like sizeless_type_p > (suitably abstracted) rather than POLY_INT_CST_P. That way, the "ABI" > stays the same regardless of -msve-vector-bits.
There is no ABI, it is how the caller and indirect callee communicate, but both parts are compiled with the same compiler, so it can choose differently based on different compiler version etc. It is effectively simplified: struct whatever { ... }; void callee (void *x) { struct whatever *w = *x; use *w; } void caller (void) { struct whatever w; fill in w; ABI_call (callee, &w); } (plus in some cases the callee can also update values and propagate that back to caller). In any case, it is a similar "ABI" to e.g. tree-nested.cc communication between caller and nested callee, how exactly are the variables laid out in a struct depends on compiler version and whatever it decides, same compiler then emits both sides. Jakub