2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=pwr10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=power10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=pwr9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=power9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=pwr8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=power8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
2021-02-18 20:12:53 +08:00
|
|
|
|
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=pwr7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP
|
2021-02-18 20:12:53 +08:00
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
2021-03-23 21:20:08 +08:00
|
|
|
// RUN: -mcpu=power7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP
|
2021-02-18 20:12:53 +08:00
|
|
|
|
2021-03-23 21:20:08 +08:00
|
|
|
#ifdef __ROP_PROTECT__
|
|
|
|
static_assert(false, "ROP Protect enabled");
|
2021-02-18 20:12:53 +08:00
|
|
|
#endif
|
|
|
|
|
2021-03-23 21:20:08 +08:00
|
|
|
// HASROP: ROP Protect enabled
|
|
|
|
// HASROP-NOT: option '-mrop-protect' cannot be specified with
|
|
|
|
// NOROP: option '-mrop-protect' cannot be specified with
|
2021-02-18 20:12:53 +08:00
|
|
|
|