-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerPC] Change option to mrop-protect
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
- Loading branch information
1 parent
f8a850c
commit 0e4f5f3
Showing
9 changed files
with
44 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \ | ||
// RUN: -mcpu=pwr10 -mrop-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=HASROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=NOROP | ||
// 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-protection %s 2>&1 | FileCheck %s --check-prefix=NOROP | ||
// RUN: -mcpu=power7 -mrop-protect %s 2>&1 | FileCheck %s --check-prefix=NOROP | ||
|
||
#ifdef __ROP_PROTECTION__ | ||
static_assert(false, "ROP Protection enabled"); | ||
#ifdef __ROP_PROTECT__ | ||
static_assert(false, "ROP Protect enabled"); | ||
#endif | ||
|
||
// HASROP: ROP Protection enabled | ||
// HASROP-NOT: option '-mrop-protection' cannot be specified with | ||
// NOROP: option '-mrop-protection' cannot be specified with | ||
// HASROP: ROP Protect enabled | ||
// HASROP-NOT: option '-mrop-protect' cannot be specified with | ||
// NOROP: option '-mrop-protect' cannot be specified with | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters