Handling of pass by val of struct size >64 bytes case is seems wrong for arm targets.
Summary:
Incase of struct pass by value for size > 64 along with other function params, failure seen in some corner cases. Access to function params result in wrong stack location access.
Stack pointer adjustment done by prologue emitter and offset used to access function params have different logics for calculaton.
VARegSaveSize is 16 because we store the first 16 bytes of struct byval in r0 to r3.
Align in computeRegArea is 8 since ABI says the stack pointer needs to be 8 byte aligned at function entry point.
But the second argument does not have to be 8 byte aligned, in fact it is 4 byte aligned for i32.
r11, #76 is equivalent to sp_at_entry + 52 since r11 = spat_entry - 16 - 8, which is 4-byte aligned after
storing the leftover (67-16=51) bytes of struct byval.
Can you also paste the assembly for the caller side and check whether the second argument is stored
at sp_at_entry+52?