[PATCH] D76849: [ARM] unwinding .pad instructions missing in execute-only prologue

Keith Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 07:33:43 PDT 2020


keith.walker.arm created this revision.
keith.walker.arm added reviewers: llvm-commits, asl, joerg, momchil.velikov.
Herald added subscribers: hiraditya, kristof.beyls, qcolombet.
Herald added a project: LLVM.

If the stack pointer is altered for local variables and we are generating
Thumb2 execute-only code the .pad directive is missing.

Usually the size of the adjustment is stored in a PC-relative location
and loaded into a register which is then added to the stack pointer.
However when we are generating execute-only code code the size of the
adjustment is instead generated using the MOVW/MOVT instruction pair.

As a by product of handling the execute-only case this also fixes an
existing issue that in the none execute-only case the .pad directive was
generated against the load of the constant to a register instruction,
instead of the instruction which adds the register to the stack pointer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76849

Files:
  llvm/lib/Target/ARM/ARMAsmPrinter.cpp
  llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
  llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
  llvm/test/CodeGen/Thumb/emergency-spill-slot.ll
  llvm/test/CodeGen/Thumb2/thumb2-execute-only-prologue.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76849.252840.patch
Type: text/x-patch
Size: 9580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/359f5131/attachment-0001.bin>


More information about the llvm-commits mailing list