[all-commits] [llvm/llvm-project] 3f0cc9: [AArch64] SLSHardening: compute correct thunk name...

Kristof Beyls via All-commits all-commits at lists.llvm.org
Wed Jun 17 22:37:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f0cc96a9694e499968544ebda6903982eaeb8a4
      https://github.com/llvm/llvm-project/commit/3f0cc96a9694e499968544ebda6903982eaeb8a4
  Author: Kristof Beyls <kristof.beyls at arm.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

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

  Log Message:
  -----------
  [AArch64] SLSHardening: compute correct thunk name for X29.

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.

Differential Revision: https://reviews.llvm.org/D81997




More information about the All-commits mailing list