Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #127766 - folkertdev:c-cmse-nonsecure-entry, r=jackh726
add `extern "C-cmse-nonsecure-entry" fn` tracking issue #75835 in https://github.com/rust-lang/rust/issues/75835#issuecomment-1183517255 it was decided that using an abi, rather than an attribute, was the right way to go for this feature. This PR adds that ABI and removes the `#[cmse_nonsecure_entry]` attribute. All relevant tests have been updated, some are now obsolete and have been removed. Error 0775 is no longer generated. It contains the list of targets that support the CMSE feature, and maybe we want to still use this? right now a generic "this abi is not supported on this platform" error is returned when this abi is used on an unsupported platform. On the other hand, users of this abi are likely to be experienced rust users, so maybe the generic error is good enough.
Michael Goulet 2024-09-22
parent 8260678 · parent 02f6773 · commit c1520a1
-rw-r--r--crates/hir-ty/src/lib.rs3
-rw-r--r--crates/ide-completion/src/completions/extern_abi.rs1
-rw-r--r--crates/intern/src/symbol/symbols.rs1
3 files changed, 5 insertions, 0 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs
index 2f4e764f4c..26ab02558a 100644
--- a/crates/hir-ty/src/lib.rs
+++ b/crates/hir-ty/src/lib.rs
@@ -377,6 +377,7 @@ pub enum FnAbi {
AvrNonBlockingInterrupt,
C,
CCmseNonsecureCall,
+ CCmseNonsecureEntry,
CDecl,
CDeclUnwind,
CUnwind,
@@ -434,6 +435,7 @@ impl FnAbi {
s if *s == sym::avr_dash_interrupt => FnAbi::AvrInterrupt,
s if *s == sym::avr_dash_non_dash_blocking_dash_interrupt => FnAbi::AvrNonBlockingInterrupt,
s if *s == sym::C_dash_cmse_dash_nonsecure_dash_call => FnAbi::CCmseNonsecureCall,
+ s if *s == sym::C_dash_cmse_dash_nonsecure_dash_entry => FnAbi::CCmseNonsecureEntry,
s if *s == sym::C_dash_unwind => FnAbi::CUnwind,
s if *s == sym::C => FnAbi::C,
s if *s == sym::cdecl_dash_unwind => FnAbi::CDeclUnwind,
@@ -477,6 +479,7 @@ impl FnAbi {
FnAbi::AvrNonBlockingInterrupt => "avr-non-blocking-interrupt",
FnAbi::C => "C",
FnAbi::CCmseNonsecureCall => "C-cmse-nonsecure-call",
+ FnAbi::CCmseNonsecureEntry => "C-cmse-nonsecure-entry",
FnAbi::CDecl => "C-decl",
FnAbi::CDeclUnwind => "cdecl-unwind",
FnAbi::CUnwind => "C-unwind",
diff --git a/crates/ide-completion/src/completions/extern_abi.rs b/crates/ide-completion/src/completions/extern_abi.rs
index 1a06e0a3a0..b0e417e6b3 100644
--- a/crates/ide-completion/src/completions/extern_abi.rs
+++ b/crates/ide-completion/src/completions/extern_abi.rs
@@ -32,6 +32,7 @@ const SUPPORTED_CALLING_CONVENTIONS: &[&str] = &[
"riscv-interrupt-m",
"riscv-interrupt-s",
"C-cmse-nonsecure-call",
+ "C-cmse-nonsecure-entry",
"wasm",
"system",
"system-unwind",
diff --git a/crates/intern/src/symbol/symbols.rs b/crates/intern/src/symbol/symbols.rs
index 7eb8e4a5e2..c066f50489 100644
--- a/crates/intern/src/symbol/symbols.rs
+++ b/crates/intern/src/symbol/symbols.rs
@@ -94,6 +94,7 @@ define_symbols! {
avr_dash_interrupt = "avr-interrupt",
avr_dash_non_dash_blocking_dash_interrupt = "avr-non-blocking-interrupt",
C_dash_cmse_dash_nonsecure_dash_call = "C-cmse-nonsecure-call",
+ C_dash_cmse_dash_nonsecure_dash_entry = "C-cmse-nonsecure-entry",
C_dash_unwind = "C-unwind",
cdecl_dash_unwind = "cdecl-unwind",
fastcall_dash_unwind = "fastcall-unwind",