Functions marked as cmse-nonsecure-call place restrictions on their inputs and outputs.
i64, u64, f64).For more information, see arm's aapcs32.
Erroneous code example:
#![feature(abi_cmse_nonsecure_call)] #[no_mangle] pub fn test( f: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32, ) -> u32 { f(1, 2, 3, 4, 5) }
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
#![feature(abi_cmse_nonsecure_call)] #[no_mangle] pub fn test( f: extern "cmse-nonsecure-call" fn(u32, u64, f32) -> u32, ) -> u32 { f(1, 2, 3.0) }