pub fn load_halfword_raw(&mut self, p_address: u64) -> u16 {
		let effective_address = self.get_effective_address(p_address);
		match effective_address >= DRAM_BASE
			&& effective_address.wrapping_add(1) > effective_address
		{
			// Fast path. Directly load main memory at a time.
			true => self.memory.read_halfword(effective_address),
			false => {
				let mut data = 0 as u16;
				for i in 0..2 {
					data |= (self.load_raw(effective_address.wrapping_add(i)) as u16) << (i * 8)
				}
				data
			}
		}
	}
/// Loads two bytes from main memory or peripheral devices depending on
/// physical address.
///
/// # Arguments
/// * `p_address` Physical address
Loads two bytes from main memory or peripheral devices depending on
physical address.
Loads two bytes from main memory or peripheral devices depending on physical address .
pub fn load_halfword_raw(&mut self, p_address: u64) -> u16 {
		let effective_address = self.get_effective_address(p_address);
		match effective_address >= DRAM_BASE
			&& effective_address.wrapping_add(1) > effective_address
		{
			// Fast path. Directly load main memory at a time.
			true => self.memory.read_halfword(effective_address),
			false => {
				let mut data = 0 as u16;
				for i in 0..2 {
					data |= (self.load_raw(effective_address.wrapping_add(i)) as u16) << (i * 8)
				}
				data
			}
		}
	}
pub fn load_halfword_raw ( & mut self , p_address : u64 ) -> u16 { let effective_address = self . get_effective_address ( p_address ) ; match effective_address >= DRAM_BASE && effective_address . wrapping_add ( 1 ) > effective_address { // Fast path. Directly load main memory at a time. true => self . memory . read_halfword ( effective_address ) , false => { let mut data = 0 as u16 ; for i in 0 .. 2 { data |= ( self . load_raw ( effective_address . wrapping_add ( i ) ) as u16 ) << ( i * 8 ) } data } } }
Loads two bytes from main memory or peripheral devices depending on
physical address.
Loads two bytes from main memory or peripheral devices depending on physical address .
&mut self
p_address
u64