MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / fetch_misaligned_byte

Function fetch_misaligned_byte

crates/virtual-machine/tests/vm_fetch.rs:37–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 // PC not aligned to 4 bytes
36 let result = fetch(&mut bus, 0x8000_0002, 0, PrivilegeMode::Machine, 0);
37 assert!(matches!(
38 result,
39 Err(VmError::InstructionAccessFault(0x8000_0002))
40 ));
41}
42
43#[test]
44fn fetch_misaligned_byte() {
45 let mut bus = SystemBus::new(Vec::new());
46
47 let result = fetch(&mut bus, 0x8000_0001, 0, PrivilegeMode::Machine, 0);
48 assert!(matches!(

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected