pub fn read(
        core: &mut Core<'_>,
        sp: u32,
        fpu: bool,
        ram_bounds: Range<u32>,
    ) -> anyhow::Result<Option<Self>> {
        let mut storage = [0; Self::WORDS_MINIMUM];
        let registers: &mut [_] = &mut storage;

        let start = sp + (Self::REGISTER_SIZE * Self::WORDS_OFFSET) as u32;
        if bounds_check(
            ram_bounds,
            start,
            (registers.len() * Self::REGISTER_SIZE) as u32,
        )
        .is_err()
        {
            return Ok(None);
        }

        core.read_32(start, registers)?;

        Ok(Some(Stacked {
            lr: registers[0],
            pc: registers[1],
            contains_fpu_regs: fpu,
        }))
    }
/// Reads stacked registers from RAM
///
/// This performs bound checks and returns `None` if a invalid memory read is requested
Reads stacked registers from RAM
This performs bound checks and returns `None` if a invalid memory read is requested
Reads stacked registers from RAM This performs bound checks and returns ` None ` if a invalid memory read is requested
pub fn read(
        core: &mut Core<'_>,
        sp: u32,
        fpu: bool,
        ram_bounds: Range<u32>,
    ) -> anyhow::Result<Option<Self>> {
        let mut storage = [0; Self::WORDS_MINIMUM];
        let registers: &mut [_] = &mut storage;
        let start = sp + (Self::REGISTER_SIZE * Self::WORDS_OFFSET) as u32;
        if bounds_check(
            ram_bounds,
            start,
            (registers.len() * Self::REGISTER_SIZE) as u32,
        )
        .is_err()
        {
            return Ok(None);
        }
        core.read_32(start, registers)?;
        Ok(Some(Stacked {
            lr: registers[0],
            pc: registers[1],
            contains_fpu_regs: fpu,
        }))
    }
pub fn read ( core : & mut Core < ' _ > , sp : u32 , fpu : bool , ram_bounds : Range < u32 > , ) -> anyhow :: Result < Option < Self > > { let mut storage = [ 0 ; Self :: WORDS_MINIMUM ] ; let registers : & mut [ _ ] = & mut storage ; let start = sp + ( Self :: REGISTER_SIZE * Self :: WORDS_OFFSET ) as u32 ; if bounds_check ( ram_bounds , start , ( registers . len ( ) * Self :: REGISTER_SIZE ) as u32 , ) . is_err ( ) { return Ok ( None ) ; } core . read_32 ( start , registers ) ? ; Ok ( Some ( Stacked { lr : registers [ 0 ] , pc : registers [ 1 ] , contains_fpu_regs : fpu , } ) ) }
Reads stacked registers from RAM
This performs bound checks and returns `None` if a invalid memory read is requested
Reads stacked registers from RAM This performs bound checks and returns ` None ` if a invalid memory read is requested
core
&mut Core<'_>
sp
u32
fpu
bool
ram_bounds
Range<u32>
core
&mut Core<'_>
sp
u32
fpu
bool
ram_bounds
Range<u32>