about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-06-06 23:16:35 -0700
committerJubilee Young <workingjubilee@gmail.com>2025-06-25 00:52:11 -0700
commit3beed38ef6712c9d6641c08a57304aa71f5fd2c6 (patch)
tree0f55ba53766532d276740033a7c5f033e870bd13
parent9cfee735f495bdf9e7e1d0d39bac7fb7e36a199e (diff)
downloadrust-3beed38ef6712c9d6641c08a57304aa71f5fd2c6.tar.gz
rust-3beed38ef6712c9d6641c08a57304aa71f5fd2c6.zip
unstable-book: Update cmse feature descriptions
-rw-r--r--src/doc/unstable-book/src/language-features/abi-cmse-nonsecure-call.md16
-rw-r--r--src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md13
2 files changed, 11 insertions, 18 deletions
diff --git a/src/doc/unstable-book/src/language-features/abi-cmse-nonsecure-call.md b/src/doc/unstable-book/src/language-features/abi-cmse-nonsecure-call.md
index 79a177cb28b..6b653a194fe 100644
--- a/src/doc/unstable-book/src/language-features/abi-cmse-nonsecure-call.md
+++ b/src/doc/unstable-book/src/language-features/abi-cmse-nonsecure-call.md
@@ -1,4 +1,4 @@
-# `abi_c_cmse_nonsecure_call`
+# `abi_cmse_nonsecure_call`
 
 The tracking issue for this feature is: [#81391]
 
@@ -14,10 +14,9 @@ LLVM, the Rust compiler and the linker are providing
 [support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
 TrustZone-M feature.
 
-One of the things provided, with this unstable feature, is the
-`C-cmse-nonsecure-call` function ABI. This ABI is used on function pointers to
-non-secure code to mark a non-secure function call (see [section
-5.5](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
+One of the things provided with this unstable feature is the "cmse-nonsecure-call" function ABI.
+This ABI is used on function pointers to non-secure code to mark a non-secure function call
+(see [section 5.5](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
 
 With this ABI, the compiler will do the following to perform the call:
 * save registers needed after the call to Secure memory
@@ -28,19 +27,16 @@ With this ABI, the compiler will do the following to perform the call:
 To avoid using the non-secure stack, the compiler will constrain the number and
 type of parameters/return value.
 
-The `extern "C-cmse-nonsecure-call"` ABI is otherwise equivalent to the
-`extern "C"` ABI.
-
 <!-- NOTE(ignore) this example is specific to thumbv8m targets -->
 
 ``` rust,ignore
 #![no_std]
-#![feature(abi_c_cmse_nonsecure_call)]
+#![feature(abi_cmse_nonsecure_call)]
 
 #[no_mangle]
 pub fn call_nonsecure_function(addr: usize) -> u32 {
     let non_secure_function =
-        unsafe { core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn() -> u32>(addr) };
+        unsafe { core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn() -> u32>(addr) };
     non_secure_function()
 }
 ```
diff --git a/src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md b/src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md
index ca95ccf33ac..1d76d651659 100644
--- a/src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md
+++ b/src/doc/unstable-book/src/language-features/cmse-nonsecure-entry.md
@@ -14,10 +14,9 @@ LLVM, the Rust compiler and the linker are providing
 [support](https://developer.arm.com/documentation/ecm0359818/latest/) for the
 TrustZone-M feature.
 
-One of the things provided, with this unstable feature, is the
-`C-cmse-nonsecure-entry` ABI. This ABI marks a Secure function as an
-entry function (see [section
-5.4](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
+One of the things provided with this unstable feature is the "cmse-nonsecure-entry" ABI.
+This ABI marks a Secure function as an entry function (see
+[section 5.4](https://developer.arm.com/documentation/ecm0359818/latest/) for details).
 With this ABI, the compiler will do the following:
 * add a special symbol on the function which is the `__acle_se_` prefix and the
   standard function name
@@ -28,9 +27,7 @@ With this ABI, the compiler will do the following:
 
 Because the stack can not be used to pass parameters, there will be compilation
 errors if:
-* the total size of all parameters is too big (for example more than four 32
-  bits integers)
-* the entry function is not using a C ABI
+* the total size of all parameters is too big (for example, more than four 32-bit integers)
 
 The special symbol `__acle_se_` will be used by the linker to generate a secure
 gateway veneer.
@@ -42,7 +39,7 @@ gateway veneer.
 #![feature(cmse_nonsecure_entry)]
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
     input + 6
 }
 ```