()
| 27 | |
| 28 | impl Registers { |
| 29 | pub fn new() -> Self { |
| 30 | Self { |
| 31 | x: [0u64; 32], |
| 32 | f: [CANONICAL_NAN_BOXED; 32], |
| 33 | pc: 0, |
| 34 | priv_mode: PrivilegeMode::Machine, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | pub fn read_x(&self, reg: usize) -> u64 { |
| 39 | // x0 is hardwired to zero regardless of what is stored. |
nothing calls this directly
no outgoing calls
no test coverage detected