[PATCH] D73071: [X86][test] Add tests for -fpatchable-function-entry=N,M (where M>0) and its interaction with -fcf-protection=branch

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 14:41:52 PST 2020


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: llvm/test/CodeGen/X86/patchable-function-entry-ibt.ll:27
+
+;; -fpatchable-function-entry=2,1 -mbranch-protection=bti
+define void @f2_1() "patchable-function-entry"="1" "patchable-function-prefix"="1" {
----------------
nickdesaulniers wrote:
> MaskRay wrote:
> > nickdesaulniers wrote:
> > > Should the filename of this added test be `s/ibt.ll/bti.ll`?
> > Sorry, I made a typo.
> > 
> > It should be -fcf-protection=branch (https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
> > 
> > This is the Intel technology which resembles to AArch64's IBT.
> Yes, and I think the name of the test is still misspelled, I think.
> 
> Consider the test modified in https://reviews.llvm.org/D73070 named `llvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll`, but this file is named `llvm/test/CodeGen/X86/patchable-function-entry-ibt.ll`.  `bti` vs `ibt`.  Not only is the order different, but `bti` is only (?) aarch64 specific, so maybe the filename of this test should have `fcf`, not `bti` (or `ibt`).
AArch64: Branch Target Identification (bti)
x86: Indirect Branch Tracking (ibt)  (I recently added an lld option `-z force-ibt`, so I am confident here...)

I think the filename is correct, but my comment above made a typo...

> This is the Intel technology which resembles to AArch64's IBT.

IBT->BTI.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73071





More information about the llvm-commits mailing list