compiler: Trim the misleading C of C-cmse from errors
This commit is contained in:
@@ -8,7 +8,7 @@ Erroneous code example:
|
||||
```ignore (no longer emitted)
|
||||
#![feature(cmse_nonsecure_entry)]
|
||||
|
||||
pub extern "C-cmse-nonsecure-entry" fn entry_function() {}
|
||||
pub extern "cmse-nonsecure-entry" fn entry_function() {}
|
||||
```
|
||||
|
||||
To fix this error, compile your code for a Rust target that supports the
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
The `C-cmse-nonsecure-call` ABI can only be used with function pointers.
|
||||
The `cmse-nonsecure-call` ABI can only be used with function pointers.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0781
|
||||
#![feature(abi_c_cmse_nonsecure_call)]
|
||||
#![feature(abi_cmse_nonsecure_call)]
|
||||
|
||||
pub extern "C-cmse-nonsecure-call" fn test() {}
|
||||
pub extern "cmse-nonsecure-call" fn test() {}
|
||||
```
|
||||
|
||||
The `C-cmse-nonsecure-call` ABI should be used by casting function pointers to
|
||||
The `cmse-nonsecure-call` ABI should be used by casting function pointers to
|
||||
specific addresses.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Functions marked as `C-cmse-nonsecure-call` place restrictions on their
|
||||
Functions marked as `cmse-nonsecure-call` place restrictions on their
|
||||
inputs and outputs.
|
||||
|
||||
- inputs must fit in the 4 available 32-bit argument registers. Alignment
|
||||
@@ -12,12 +12,12 @@ see [arm's aapcs32](https://github.com/ARM-software/abi-aa/releases).
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```ignore (only fails on supported targets)
|
||||
#![feature(abi_c_cmse_nonsecure_call)]
|
||||
```ignore (host errors will not match for target)
|
||||
#![feature(abi_cmse_nonsecure_call)]
|
||||
|
||||
#[no_mangle]
|
||||
pub fn test(
|
||||
f: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32,
|
||||
f: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32,
|
||||
) -> u32 {
|
||||
f(1, 2, 3, 4, 5)
|
||||
}
|
||||
@@ -27,12 +27,12 @@ Arguments' alignment is respected. In the example below, padding is inserted
|
||||
so that the `u64` argument is passed in registers r2 and r3. There is then no
|
||||
room left for the final `f32` argument
|
||||
|
||||
```ignore (only fails on supported targets)
|
||||
#![feature(abi_c_cmse_nonsecure_call)]
|
||||
```ignore (host errors will not match for target)
|
||||
#![feature(abi_cmse_nonsecure_call)]
|
||||
|
||||
#[no_mangle]
|
||||
pub fn test(
|
||||
f: extern "C-cmse-nonsecure-call" fn(u32, u64, f32) -> u32,
|
||||
f: extern "cmse-nonsecure-call" fn(u32, u64, f32) -> u32,
|
||||
) -> u32 {
|
||||
f(1, 2, 3.0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user