ARM follows its own calling convention, which by default uses registers for both argument and return value passing [1], so these lessons likely do not apply.
[1] https://developer.arm.com/documentation/dui0041/c/ARM-Proced...
Re:The Rust Calling Convention We Deserve
by pizlonator on Friday April 19, 2024 @10:51PM
(#40094293)
Yes.
If you flatten big structs into registers to pass them you have a bad time on armv8.
I tried. That was an llvm experiment. Ahead of time compiler for a modified version of C.
The FA is mostly about x86 and Intel indeed did an amazing amount of clever engineering over decades to allow your ugly x86 code to run fast on their silicon that you buy.
Still, does your point about the empirical benefit of passing on the stack continue to apply with a transition to register rich ARMV8 CPUs or RISC-V?