| 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=power10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP |
| 5 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 6 |
// RUN: -mcpu=pwr9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP |
| 7 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 8 |
// RUN: -mcpu=power9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP |
| 9 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 10 |
// RUN: -mcpu=pwr8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP |
| 11 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 12 |
// RUN: -mcpu=power8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP |
| 13 |
|
| 14 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 15 |
// RUN: -mcpu=pwr7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP |
| 16 |
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ |
| 17 |
// RUN: -mcpu=power7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP |
| 18 |
|
| 19 |
#ifdef __ROP_PROTECT__ |
| 20 |
static_assert(false, "ROP Protect enabled"); |
| 21 |
#endif |
| 22 |
|
| 23 |
// HASROP: ROP Protect enabled |
| 24 |
// HASROP-NOT: option '-mrop-protect' cannot be specified with |
| 25 |
// NOROP: option '-mrop-protect' cannot be specified with |
| 26 |
|