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

Method write_x

crates/virtual-machine/src/cpu/registers.rs:43–48  ·  view source on GitHub ↗
(&mut self, reg: usize, val: u64)

Source from the content-addressed store, hash-verified

41 }
42
43 pub fn write_x(&mut self, reg: usize, val: u64) {
44 // Writes to x0 are silently dropped.
45 if reg != 0 {
46 self.x[reg] = val;
47 }
48 }
49
50 pub fn read_f_bits(&self, reg: usize) -> u64 {
51 self.f[reg]

Callers 7

newMethod · 0.80
set_return_addrMethod · 0.80
set_boot_entryMethod · 0.80
stage_exMethod · 0.80
writebackFunction · 0.80
x0_always_zeroFunction · 0.80
x_roundtripFunction · 0.80

Calls

no outgoing calls

Tested by 2

x0_always_zeroFunction · 0.64
x_roundtripFunction · 0.64