zzheng marked 2 inline comments as done.
zzheng added inline comments.

================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:60
+  // sw   ra, 0(s2)
+  // addi s2, s2, 4
+  BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::SD : RISCV::SW))
----------------
jrtc27 wrote:
> Is it intended that the shadow call stack grows *up* unlike the normal stack?
No. Which direction the SCS grows on is trivial.

The memory area hosting SCS is independent of the regular stack; and it's 
provided by the runtime.
mmap/malloc returns the low address of newly mapped/allocated area. Making the 
SCS growing down requires the runtime to return upper bound of the SCS. On 
AArch64, the SCS grows up as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84414

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to