Closed sorear closed 1 year ago
Hi @Xinlong-Wu , I see that this was already fixed in https://github.com/plctlab/llvm-project/commit/bc13e1073b8e81086d579af78e9f4f545729cdea right ?
sure,https://github.com/plctlab/llvm-project/commit/bc13e1073b8e81086d579af78e9f4f545729cdea this commit just stop to emit Push/pop insts if -fno-omit-frame-pointer
has been set. and @sorear you can check whether this commit fix this issue.
As far as I can tell without building the compiler, the change does fix the ABI issue.
riscv/riscv-code-size-reduction#194 has much more details, but in short if DisableFramePointerElim is in effect the register save layout relative to the frame pointer becomes partially ABI, which means that the use of PUSH/POP instructions needs to be suppressed for that function until there is an ABI change (and updates to unwinders) to allow the format used by PUSH/POP.