[PATCH] D61773: [RISCV] Add CFI directives for RISCV prologue/epilog.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 19:02:25 PDT 2019


HsiangKai marked an inline comment as done.
HsiangKai added inline comments.


================
Comment at: lib/Target/RISCV/RISCVFrameLowering.cpp:125
 
+  // Emit ".cfi_def_cfa_offset StackSize"
+  unsigned CFIIndex = MF.addFrameInst(
----------------
asb wrote:
> Should say `-StackSize`?
It should be ".cfi_def_cfa_offset StackSize". This directive is put after "addi sp, sp, -StackSize". CFA should be a fixed point. So, after updating stack pointer to lower address, we should update CFA as current stack pointer plus StackSize.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61773





More information about the llvm-commits mailing list