Skip to content

Commit c1520a1

Browse files
Rollup merge of #127766 - folkertdev:c-cmse-nonsecure-entry, r=jackh726
add `extern "C-cmse-nonsecure-entry" fn` tracking issue #75835 in rust-lang/rust#75835 (comment) 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.
2 parents 8260678 + 02f6773 commit c1520a1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

crates/hir-ty/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ pub enum FnAbi {
377377
AvrNonBlockingInterrupt,
378378
C,
379379
CCmseNonsecureCall,
380+
CCmseNonsecureEntry,
380381
CDecl,
381382
CDeclUnwind,
382383
CUnwind,
@@ -434,6 +435,7 @@ impl FnAbi {
434435
s if *s == sym::avr_dash_interrupt => FnAbi::AvrInterrupt,
435436
s if *s == sym::avr_dash_non_dash_blocking_dash_interrupt => FnAbi::AvrNonBlockingInterrupt,
436437
s if *s == sym::C_dash_cmse_dash_nonsecure_dash_call => FnAbi::CCmseNonsecureCall,
438+
s if *s == sym::C_dash_cmse_dash_nonsecure_dash_entry => FnAbi::CCmseNonsecureEntry,
437439
s if *s == sym::C_dash_unwind => FnAbi::CUnwind,
438440
s if *s == sym::C => FnAbi::C,
439441
s if *s == sym::cdecl_dash_unwind => FnAbi::CDeclUnwind,
@@ -477,6 +479,7 @@ impl FnAbi {
477479
FnAbi::AvrNonBlockingInterrupt => "avr-non-blocking-interrupt",
478480
FnAbi::C => "C",
479481
FnAbi::CCmseNonsecureCall => "C-cmse-nonsecure-call",
482+
FnAbi::CCmseNonsecureEntry => "C-cmse-nonsecure-entry",
480483
FnAbi::CDecl => "C-decl",
481484
FnAbi::CDeclUnwind => "cdecl-unwind",
482485
FnAbi::CUnwind => "C-unwind",

crates/ide-completion/src/completions/extern_abi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const SUPPORTED_CALLING_CONVENTIONS: &[&str] = &[
3232
"riscv-interrupt-m",
3333
"riscv-interrupt-s",
3434
"C-cmse-nonsecure-call",
35+
"C-cmse-nonsecure-entry",
3536
"wasm",
3637
"system",
3738
"system-unwind",

crates/intern/src/symbol/symbols.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ define_symbols! {
9494
avr_dash_interrupt = "avr-interrupt",
9595
avr_dash_non_dash_blocking_dash_interrupt = "avr-non-blocking-interrupt",
9696
C_dash_cmse_dash_nonsecure_dash_call = "C-cmse-nonsecure-call",
97+
C_dash_cmse_dash_nonsecure_dash_entry = "C-cmse-nonsecure-entry",
9798
C_dash_unwind = "C-unwind",
9899
cdecl_dash_unwind = "cdecl-unwind",
99100
fastcall_dash_unwind = "fastcall-unwind",

0 commit comments

Comments
 (0)