pub fn cache_instructions(&mut self) {
        // pre-cache the decoded instructions
        {
            let mut pc = 0;

            while pc < (self.code.len() as u32) {
                let thumb = self.fetch(pc).unwrap();
                let instruction = self.decode(thumb);
                self.instruction_cache
                    .push((instruction, instruction_size(&instruction)));
                pc += 2;
            }
        }
    }
///
/// Pre cache (decode) instructions to speed up simulation
///
Pre cache (decode) instructions to speed up simulation
Pre cache ( decode ) instructions to speed up simulation
pub fn cache_instructions(&mut self) {
        // pre-cache the decoded instructions
        {
            let mut pc = 0;
            while pc < (self.code.len() as u32) {
                let thumb = self.fetch(pc).unwrap();
                let instruction = self.decode(thumb);
                self.instruction_cache
                    .push((instruction, instruction_size(&instruction)));
                pc += 2;
            }
        }
    }
pub fn cache_instructions ( & mut self ) { // pre-cache the decoded instructions { let mut pc = 0 ; while pc < ( self . code . len ( ) as u32 ) { let thumb = self . fetch ( pc ) . unwrap ( ) ; let instruction = self . decode ( thumb ) ; self . instruction_cache . push ( ( instruction , instruction_size ( & instruction ) ) ) ; pc += 2 ; } } }
Pre cache (decode) instructions to speed up simulation
Pre cache ( decode ) instructions to speed up simulation
&mut self
&mut self