[PATCH] D126392: [RISCV] Use two ADDIs to do some stack pointer adjustments.

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 07:56:25 PDT 2022


luismarques added a comment.

In D126392#3539458 <https://reviews.llvm.org/D126392#3539458>, @arichardson wrote:

> This may break assumptions that some unwinding code uses (e.g. an kernel backtrace without debug info). But then again I don't know if any of them handle non-immediate offsets anyway.

What do you mean? Unwinding with neither the frame pointer nor CFI?



================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:315
+  // it can be created with LUI.
+  int64_t MaxAdj = 2048 - getStackAlign().value();
+  if (Val > -4096 && Val <= (2 * MaxAdj)) {
----------------
Nit: `MaxAdj` -> `MaxAdjStep`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126392/new/

https://reviews.llvm.org/D126392



More information about the llvm-commits mailing list