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

Method new

crates/virtual-machine/src/cpu/registers.rs:29–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28impl 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected