(&mut self, cpu: &mut Cpu)
| 41 | } |
| 42 | |
| 43 | fn write(&mut self, cpu: &mut Cpu) { |
| 44 | let xpsr = cpu.read_var::<u32>(self.xpsr) & crate::arm::XPSR_NZCV_MASK; |
| 45 | cpu.write_var::<u8>(self.ng, ((xpsr >> 31) & 0b1) as u8); |
| 46 | cpu.write_var::<u8>(self.zr, ((xpsr >> 30) & 0b1) as u8); |
| 47 | cpu.write_var::<u8>(self.cy, ((xpsr >> 29) & 0b1) as u8); |
| 48 | cpu.write_var::<u8>(self.ov, ((xpsr >> 28) & 0b1) as u8); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /// Most of this should probably be implemented as part of the SLEIGH specification instead. |