MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / read

Method read

icicle-cortexm/src/arm.rs:34–41  ·  view source on GitHub ↗
(&mut self, cpu: &mut Cpu)

Source from the content-addressed store, hash-verified

32
33impl icicle_vm::cpu::RegHandler for XpsrHandler {
34 fn read(&mut self, cpu: &mut Cpu) {
35 let mut xpsr = cpu.read_var::<u32>(self.xpsr) & !crate::arm::XPSR_NZCV_MASK;
36 xpsr |= (cpu.read_var::<u8>(self.ng) as u32) << 31;
37 xpsr |= (cpu.read_var::<u8>(self.zr) as u32) << 30;
38 xpsr |= (cpu.read_var::<u8>(self.cy) as u32) << 29;
39 xpsr |= (cpu.read_var::<u8>(self.ov) as u32) << 28;
40 cpu.write_var(self.xpsr, xpsr);
41 }
42
43 fn write(&mut self, cpu: &mut Cpu) {
44 let xpsr = cpu.read_var::<u32>(self.xpsr) & crate::arm::XPSR_NZCV_MASK;

Callers 3

generate_and_saveFunction · 0.45
get_next_irq_numberFunction · 0.45
get_next_timer_choiceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected