@@ -14,8 +14,8 @@ LLVM, the Rust compiler and the linker are providing
14
14
[ support] ( https://developer.arm.com/documentation/ecm0359818/latest/ ) for the
15
15
TrustZone-M feature.
16
16
17
- One of the things provided, with this unstable feature, is the
18
- ` C- cmse-nonsecure-call` function ABI. This ABI is used on function pointers to
17
+ One of the things provided with this unstable feature is the
18
+ " cmse-nonsecure-call" function ABI. This ABI is used on function pointers to
19
19
non-secure code to mark a non-secure function call (see [ section
20
20
5.5] ( https://developer.arm.com/documentation/ecm0359818/latest/ ) for details).
21
21
@@ -28,9 +28,6 @@ With this ABI, the compiler will do the following to perform the call:
28
28
To avoid using the non-secure stack, the compiler will constrain the number and
29
29
type of parameters/return value.
30
30
31
- The ` extern "C-cmse-nonsecure-call" ` ABI is otherwise equivalent to the
32
- ` extern "C" ` ABI.
33
-
34
31
<!-- NOTE(ignore) this example is specific to thumbv8m targets -->
35
32
36
33
``` rust,ignore
@@ -40,7 +37,7 @@ The `extern "C-cmse-nonsecure-call"` ABI is otherwise equivalent to the
40
37
#[no_mangle]
41
38
pub fn call_nonsecure_function(addr: usize) -> u32 {
42
39
let non_secure_function =
43
- unsafe { core::mem::transmute::<usize, extern "C- cmse-nonsecure-call" fn() -> u32>(addr) };
40
+ unsafe { core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn() -> u32>(addr) };
44
41
non_secure_function()
45
42
}
46
43
```
0 commit comments