Add test to exercise more args then registers (#4661)

This commit is contained in:
Jack May
2019-06-12 13:04:53 -07:00
committed by GitHub
parent b78a13d42c
commit bc44516eb4
10 changed files with 125 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
/target/
Cargo.lock

View File

@@ -0,0 +1,19 @@
# Note: This crate must be built using build.sh
[package]
name = "solana-bpf-rust-many-args-dep"
version = "0.16.0"
description = "Solana BPF many-args-dep program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust-utils", version = "0.16.0" }
[workspace]
members = []

View File

@@ -0,0 +1,24 @@
//! @brief Solana Rust-based BPF program utility functions and types
#![no_std]
extern crate solana_sdk_bpf_utils;
use solana_sdk_bpf_utils::log::*;
pub fn many_args(
arg1: u64,
arg2: u64,
arg3: u64,
arg4: u64,
arg5: u64,
arg6: u64,
arg7: u64,
arg8: u64,
arg9: u64,
) -> u64 {
sol_log("another package");
sol_log_64(arg1, arg2, arg3, arg4, arg5);
sol_log_64(arg6, arg7, arg8, arg9, 0);
arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9
}