Files
rust/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs
David Wood 92eb4450fa tests: use minicore more
minicore makes it much easier to add new language items to all of the
existing `no_core` tests.
2025-02-24 09:26:54 +00:00

20 lines
477 B
Rust

//@ add-core-stubs
//@ build-pass
//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
//@ needs-llvm-components: arm
#![feature(abi_c_cmse_nonsecure_call, cmse_nonsecure_entry, no_core, lang_items, intrinsics)]
#![no_core]
extern crate minicore;
use minicore::*;
#[no_mangle]
pub extern "C-cmse-nonsecure-entry" fn test(
f: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32,
a: u32,
b: u32,
c: u32,
) -> u32 {
f(a, b, c, 42)
}