llvm-project
4a176d59 - [Xtensa] Move emergency spill slot near SP and reserve it for SP adjustments (#237791)

Commit
4 days ago
[Xtensa] Move emergency spill slot near SP and reserve it for SP adjustments (#237791) Functions with a frame pointer adjust SP around calls with stack arguments. That needs a scratch register at a point where all outgoing arguments are live. If none is free, the register scavenger aborts with "Cannot scavenge register without an emergency spill slot". Reserve the slot in functions that adjust SP around a call. The slot also has to be in reach. With a frame pointer, PEI allocated it next to the incoming SP, at the top of the frame. That default assumes that the frame pointer points there, but on Xtensa it is equal to SP after the prologue. In large frames, saving a register to the slot then needed another scratch register, and the register scavenger aborted with "Incomplete scavenging after 2nd pass". Allocate the slot close to SP, as Mips and SystemZ do. Fixes #195412. Assisted-by: Claude
Author
Parents
Loading