Debian Codegraph @

clang/test/CodeGen/asm-cet.S

raw
1 // REQUIRES: x86-registered-target
2 // RUN: %clang --target=x86_64-pc-linux -fcf-protection -include cet.h -c %s -o - | llvm-readelf -n - | FileCheck %s
3 // RUN: %clang --target=x86_64-pc-linux -include cet.h -c %s -o - | llvm-readelf -S - | FileCheck %s --check-prefixes=NOCET
4 // RUN: %clang --target=x86_64-pc-linux -include cet.h -S %s -o - | FileCheck %s --check-prefixes=NOENDBR
5 // RUN: %clang --target=x86_64-pc-linux -fcf-protection -include cet.h -S %s -o - | FileCheck %s --check-prefixes=ENDBR64
6
7 // RUN: %clang --target=i386-pc-linux -fcf-protection -include cet.h -c %s -o - | llvm-readelf -n - | FileCheck %s
8 // RUN: %clang --target=i386-pc-linux -include cet.h -c %s -o - | llvm-readelf -S - | FileCheck %s --check-prefixes=NOCET
9 // RUN: %clang --target=i386-pc-linux -include cet.h -S %s -o - | FileCheck %s --check-prefixes=NOENDBR
10 // RUN: %clang --target=i386-pc-linux -fcf-protection -include cet.h -S %s -o - | FileCheck %s --check-prefixes=ENDBR32
11
12 // CHECK: IBT, SHSTK
13
14 // NOCET: Section Headers
15 // NOCET-NOT: .note.gnu.property
16
17 // NOENDBR: foo
18 // NOENDBR-NOT: endbr
19
20 // ENDBR64: endbr64
21 // ENDBR32: endbr32
22 .text
23 .globl foo
24 .type foo, @function
25 foo:
26 _CET_ENDBR
27 ret