mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
0e4f5f3ea6
In order to have the same option on power PC LLVM and power PC gcc the option will be changed from -mrop-protection to -mrop-protect. The feature will be off by default and turned on when the option is used. Reviewed By: lei, amyk Differential Revision: https://reviews.llvm.org/D99185
27 lines
1.4 KiB
C
27 lines
1.4 KiB
C
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=pwr10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=power10 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=pwr9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=power9 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=pwr8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=power8 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=HASROP
|
|
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=pwr7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP
|
|
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
|
|
// RUN: -mcpu=power7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP
|
|
|
|
#ifdef __ROP_PROTECT__
|
|
static_assert(false, "ROP Protect enabled");
|
|
#endif
|
|
|
|
// HASROP: ROP Protect enabled
|
|
// HASROP-NOT: option '-mrop-protect' cannot be specified with
|
|
// NOROP: option '-mrop-protect' cannot be specified with
|
|
|