plctlab / llvm-project

PLCT实验室的 RISC-V V Spec 实现,基于llvm/llvm-project,rkruppe/rvv-llvm 和 https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi-0.8
158 stars 42 forks source link

`-fno-omit-frame-pointer` ABI changes depending on enabled extensions #58

Closed sorear closed 1 year ago

sorear commented 2 years ago

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.

abukharmeh commented 1 year ago

Hi @Xinlong-Wu , I see that this was already fixed in https://github.com/plctlab/llvm-project/commit/bc13e1073b8e81086d579af78e9f4f545729cdea right ?

Xinlong-Wu commented 1 year ago

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.

sorear commented 1 year ago

As far as I can tell without building the compiler, the change does fix the ABI issue.