On Tue, Aug 10, 2021 at 05:42:46PM -0700, Vineet Gupta wrote:
In the past I've refrained from doing this (atleast 2 times) due to the^ at least
slight code bloat due to ABI implications of pte_t etc becoming sttuct^ struct
Per ARC ABI, functions return struct via memory and not through register^ fit
r0, even if the struct would fits in register(s)
- caller allocates space on stack and passes the address as first argOut of curiosity, is this actually measurable on real world applications?
(r0), shifting rest of args by one
- callee creates return struct in memory (referenced via r0)
This time around the code actually shrunk slightly (due to subtle
inlining heuristic effects), but still slightly inefficient due to
return values passed through memory. That however seems like a small