Debian Codegraph @

clang/test/Driver/ppc-mrop-protection-support-check.c

raw
1 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
2 // RUN: -mcpu=pwr10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
3 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
4 // RUN: -mcpu=power8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
5
6 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
7 // RUN: -mcpu=pwr7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP
8
9 // RUN: not %clang -target powerpc-unknown-linux -fsyntax-only \
10 // RUN: -mcpu=pwr8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=32BIT
11 // RUN: not %clang -target powerpc-unknown-aix -fsyntax-only \
12 // RUN: -mcpu=pwr8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=32BIT
13
14 #ifdef __ROP_PROTECT__
15 static_assert(false, "ROP Protect enabled");
16 #endif
17
18 // HASROP: ROP Protect enabled
19 // HASROP-NOT: option '-mrop-protect' cannot be specified with
20 // NOROP: option '-mrop-protect' cannot be specified with
21
22 // 32BIT: option '-mrop-protect' cannot be specified on this target