Auto merge of #81346 - hug-dev:nonsecure-call-abi, r=jonas-schievink

Add a new ABI to support cmse_nonsecure_call

This adds support for the `cmse_nonsecure_call` feature to be able to perform non-secure function call.

See the discussion on Zulip [here](223054928).

This is a followup to #75810 which added `cmse_nonsecure_entry`. As for that PR, I assume that the changes are small enough to not have to go through a RFC but I don't mind doing one if needed 😃
I did not yet create a tracking issue, but if most of it is fine, I can create one and update the various files accordingly (they refer to the other tracking issue now).

On the Zulip chat, I believe `@jonas-schievink` volunteered to be a reviewer 💯
This commit is contained in:
bors 2021-02-03 06:00:43 +00:00
commit b593389edb
35 changed files with 251 additions and 3 deletions

View file

@ -466,6 +466,7 @@ E0777: include_str!("./error_codes/E0777.md"),
E0778: include_str!("./error_codes/E0778.md"),
E0779: include_str!("./error_codes/E0779.md"),
E0780: include_str!("./error_codes/E0780.md"),
E0781: include_str!("./error_codes/E0781.md"),
;
// E0006, // merged with E0005
// E0008, // cannot bind by-move into a pattern guard

View file

@ -0,0 +1,12 @@
The `C-cmse-nonsecure-call` ABI can only be used with function pointers.
Erroneous code example:
```compile_fail,E0781
#![feature(abi_c_cmse_nonsecure_call)]
pub extern "C-cmse-nonsecure-call" fn test() {}
```
The `C-cmse-nonsecure-call` ABI should be used by casting function pointers to
specific addresses.