Currently, in the cases when fp register is presented and sp register is adjusted at the second time, sp recovery in a function epilogue isn't performed in the best way, for example: ``` lui a0, 2 sub sp, s0, a0 addi a0, a0, -2044 add sp, sp, a0 ``` This patch improves sp register recovery in such cases and the code snippet above becomes: ``` addi sp, s0, -2044 ```
44 KiB
44 KiB