forked from flang-compiler/flang-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Support adding X[8-15,18] registers as CSRs.
Summary: Making X[8-15,18] registers call-saved is used to support CONFIG_ARM64_LSE_ATOMICS in Linux kernel. Signed-off-by: Tri Vo <[email protected]> Reviewers: srhines, nickdesaulniers, javed.absar Reviewed By: nickdesaulniers Subscribers: kristof.beyls, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D52399 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342990 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
133 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x8 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X8 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x9 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X9 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x10 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X10 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x11 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X11 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x12 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X12 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x13 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X13 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x14 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X14 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x15 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X15 %s | ||
|
||
// RUN: %clang -target aarch64-none-gnu -fcall-saved-x18 -### %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X18 %s | ||
|
||
// Test all call-saved-x# options together. | ||
// RUN: %clang -target aarch64-none-gnu \ | ||
// RUN: -fcall-saved-x8 \ | ||
// RUN: -fcall-saved-x9 \ | ||
// RUN: -fcall-saved-x10 \ | ||
// RUN: -fcall-saved-x11 \ | ||
// RUN: -fcall-saved-x12 \ | ||
// RUN: -fcall-saved-x13 \ | ||
// RUN: -fcall-saved-x14 \ | ||
// RUN: -fcall-saved-x15 \ | ||
// RUN: -fcall-saved-x18 \ | ||
// RUN: -### %s 2>&1 | FileCheck %s \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X8 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X9 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X10 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X11 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X12 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X13 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X14 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X15 \ | ||
// RUN: --check-prefix=CHECK-CALL-SAVED-X18 | ||
|
||
// CHECK-CALL-SAVED-X8: "-target-feature" "+call-saved-x8" | ||
// CHECK-CALL-SAVED-X9: "-target-feature" "+call-saved-x9" | ||
// CHECK-CALL-SAVED-X10: "-target-feature" "+call-saved-x10" | ||
// CHECK-CALL-SAVED-X11: "-target-feature" "+call-saved-x11" | ||
// CHECK-CALL-SAVED-X12: "-target-feature" "+call-saved-x12" | ||
// CHECK-CALL-SAVED-X13: "-target-feature" "+call-saved-x13" | ||
// CHECK-CALL-SAVED-X14: "-target-feature" "+call-saved-x14" | ||
// CHECK-CALL-SAVED-X15: "-target-feature" "+call-saved-x15" | ||
// CHECK-CALL-SAVED-X18: "-target-feature" "+call-saved-x18" |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Check that -ffixed and -fcall-saved flags work correctly together. | ||
// RUN: %clang -target aarch64-none-gnu \ | ||
// RUN: -ffixed-x18 \ | ||
// RUN: -fcall-saved-x18 \ | ||
// RUN: -### %s 2>&1 | FileCheck %s | ||
|
||
// CHECK: "-target-feature" "+reserve-x18" | ||
// CHECK: "-target-feature" "+call-saved-x18" |