[all-commits] [llvm/llvm-project] 9eb80a: [llvm-exegesis] Set stack pointer register after s...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Wed Nov 29 01:40:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9eb80ab3787e1851be8c686651688e870b93506b
      https://github.com/llvm/llvm-project/commit/9eb80ab3787e1851be8c686651688e870b93506b
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    A llvm/test/tools/llvm-exegesis/X86/latency/subprocess-rsp.s
    M llvm/tools/llvm-exegesis/lib/Assembler.cpp

  Log Message:
  -----------
  [llvm-exegesis] Set stack pointer register after starting perf counter (#72489)

Before this patch, in subprocess mode, llvm-exegesis setup the stack
pointer register with the rest of the registers when it was requested by
the user. This would cause a segfault when the instructions to start the
perf counter ran as they use the stack to preserve the three registers
needed to make the syscall. This patch moves the setup of the stack
register to after the configuration of the perf counter to fix this
issue so that we have a valid stack pointer for all the preceeding
operations.

Regression test added.

This fixes #72193.




More information about the All-commits mailing list