Skip to content

Commit

Permalink
Add a new ABI to support cmse_nonsecure_call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hug-dev committed Feb 2, 2021
1 parent 02e1fd4 commit 5bdc56c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/abi/mod.rs
Expand Up @@ -28,6 +28,7 @@ fn clif_sig_from_fn_abi<'tcx>(
Conv::X86_64SysV => CallConv::SystemV,
Conv::X86_64Win64 => CallConv::WindowsFastcall,
Conv::ArmAapcs
| Conv::CCmseNonSecureCall
| Conv::Msp430Intr
| Conv::PtxKernel
| Conv::X86Fastcall
Expand Down

0 comments on commit 5bdc56c

Please sign in to comment.