Pull in support for Rust-BPF stack argument passing (#5038)

This commit is contained in:
Jack May
2019-07-11 14:27:18 -08:00
committed by GitHub
parent e4861f52e0
commit 2860d2fe27
4 changed files with 40 additions and 3 deletions

View File

@@ -15,11 +15,20 @@ use solana_sdk_bpf_utils::info;
pub extern "C" fn entrypoint(_input: *mut u8) -> bool {
info!("Call same package");
assert_eq!(crate::helper::many_args(1, 2, 3, 4, 5, 6, 7, 8, 9), 45);
info!("Call another package");
assert_eq!(
solana_bpf_rust_many_args_dep::many_args(1, 2, 3, 4, 5, 6, 7, 8, 9),
45
);
assert_eq!(
solana_bpf_rust_many_args_dep::many_args_sret(1, 2, 3, 4, 5, 6, 7, 8, 9),
solana_bpf_rust_many_args_dep::Ret {
group1: 6,
group2: 15,
group3: 24
}
);
info!("Success");
true