Add a new ABI to support cmse_nonsecure_call
This commit adds a new ABI to be selected via `extern "C-cmse-nonsecure-call"` on function pointers in order for the compiler to apply the corresponding cmse_nonsecure_call callsite attribute. For Armv8-M targets supporting TrustZone-M, this will perform a non-secure function call by saving, clearing and calling a non-secure function pointer using the BLXNS instruction. See the page on the unstable book for details. Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit is contained in:
parent
d60b29d1ae
commit
ce9818f2b7
35 changed files with 251 additions and 3 deletions
|
@ -551,6 +551,7 @@ pub enum Conv {
|
|||
|
||||
// Target-specific calling conventions.
|
||||
ArmAapcs,
|
||||
CCmseNonSecureCall,
|
||||
|
||||
Msp430Intr,
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ pub enum Abi {
|
|||
EfiApi,
|
||||
AvrInterrupt,
|
||||
AvrNonBlockingInterrupt,
|
||||
CCmseNonSecureCall,
|
||||
|
||||
// Multiplatform / generic ABIs
|
||||
System,
|
||||
|
@ -81,6 +82,7 @@ const AbiDatas: &[AbiData] = &[
|
|||
name: "avr-non-blocking-interrupt",
|
||||
generic: false,
|
||||
},
|
||||
AbiData { abi: Abi::CCmseNonSecureCall, name: "C-cmse-nonsecure-call", generic: false },
|
||||
// Cross-platform ABIs
|
||||
AbiData { abi: Abi::System, name: "system", generic: true },
|
||||
AbiData { abi: Abi::RustIntrinsic, name: "rust-intrinsic", generic: true },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue