diff options
| author | Reuben Cruise <reuben.cruise@arm.com> | 2025-09-02 16:13:51 +0100 |
|---|---|---|
| committer | Reuben Cruise <reuben.cruise@arm.com> | 2025-09-22 11:29:54 +0100 |
| commit | 06819d95c0697c6a2f8f1498a22260f47c210bd7 (patch) | |
| tree | f4bcfa86f535ff2c9762e89f212695b0f197ae3f /tests/codegen-llvm | |
| parent | 6f813e887af44d74e9bcfdb207ecab407037a939 (diff) | |
| download | rust-06819d95c0697c6a2f8f1498a22260f47c210bd7.tar.gz rust-06819d95c0697c6a2f8f1498a22260f47c210bd7.zip | |
Extends branch protection tests to include GCS
Diffstat (limited to 'tests/codegen-llvm')
| -rw-r--r-- | tests/codegen-llvm/branch-protection.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/codegen-llvm/branch-protection.rs b/tests/codegen-llvm/branch-protection.rs index d67e494cc0d..f92259c941c 100644 --- a/tests/codegen-llvm/branch-protection.rs +++ b/tests/codegen-llvm/branch-protection.rs @@ -1,9 +1,10 @@ // Test that the correct module flags are emitted with different branch protection flags. //@ add-core-stubs -//@ revisions: BTI PACRET LEAF BKEY PAUTHLR PAUTHLR_BKEY PAUTHLR_LEAF PAUTHLR_BTI NONE +//@ revisions: BTI GCS PACRET LEAF BKEY PAUTHLR PAUTHLR_BKEY PAUTHLR_LEAF PAUTHLR_BTI NONE //@ needs-llvm-components: aarch64 //@ [BTI] compile-flags: -Z branch-protection=bti +//@ [GCS] compile-flags: -Z branch-protection=gcs //@ [PACRET] compile-flags: -Z branch-protection=pac-ret //@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf //@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key @@ -32,6 +33,9 @@ pub fn test() {} // BTI: !"sign-return-address-all", i32 0 // BTI: !"sign-return-address-with-bkey", i32 0 +// GCS: attributes [[ATTR]] = {{.*}} "guarded-control-stack" +// GCS: !"guarded-control-stack", i32 1 + // PACRET: attributes [[ATTR]] = {{.*}} "sign-return-address"="non-leaf" // PACRET-SAME: "sign-return-address-key"="a_key" // PACRET: !"branch-target-enforcement", i32 0 |
