[PATCH] D81997: [AArch64] SLSHardening: compute correct thunk name for X29.

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 02:40:20 PDT 2020


kristof.beyls created this revision.
kristof.beyls added a reviewer: ostannard.
Herald added subscribers: llvm-commits, danielkiss, hiraditya.
Herald added a project: LLVM.

The enum values for AArch64 registers are not all consecutive.
Therefore, the computation
 "__llvm_slsblr_thunk_x" + utostr(Reg - AArch64::X0)
is not always correct. utostr(Reg - AArch64::X0) will not generate the
expected string for the registers that do not have consecutive values in
the enum.
This happened to work for most registers, but does not for AArch64::FP
(i.e. register X29).
This can get triggered when the X29 is not used as a frame pointer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81997

Files:
  llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
  llvm/test/CodeGen/AArch64/speculation-hardening-sls.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81997.271309.patch
Type: text/x-patch
Size: 5964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200617/af709a0e/attachment.bin>


More information about the llvm-commits mailing list