[−][src]Function solana_rbpf::syscalls::gather_bytes
pub fn gather_bytes<E: UserDefinedError>(
arg1: u64,
arg2: u64,
arg3: u64,
arg4: u64,
arg5: u64,
_ro_regions: &[MemoryRegion],
_rw_regions: &[MemoryRegion]
) -> Result<u64, EbpfError<E>>
The idea is to assemble five bytes into a single u64
. For compatibility with the syscalls API,
each argument must be a u64
.
Examples
use solana_rbpf::syscalls::gather_bytes; use solana_rbpf::memory_region::MemoryRegion; use solana_rbpf::user_error::UserError; let regions = [MemoryRegion::default()]; let gathered = gather_bytes::<UserError>(0x11, 0x22, 0x33, 0x44, 0x55, ®ions, ®ions).unwrap(); assert_eq!(gathered, 0x1122334455);