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

Method read_x

crates/virtual-machine/src/cpu/registers.rs:38–41  ·  view source on GitHub ↗
(&self, reg: usize)

Source from the content-addressed store, hash-verified

36 }
37
38 pub fn read_x(&self, reg: usize) -> u64 {
39 // x0 is hardwired to zero regardless of what is stored.
40 if reg == 0 { 0 } else { self.x[reg] }
41 }
42
43 pub fn write_x(&mut self, reg: usize, val: u64) {
44 // Writes to x0 are silently dropped.

Callers 10

peek_regMethod · 0.80
peek_all_xregsMethod · 0.80
stage_idMethod · 0.80
stage_exMethod · 0.80
executeFunction · 0.80
exec_alu_immFunction · 0.80
exec_alu_imm32Function · 0.80
exec_aluFunction · 0.80
exec_alu32Function · 0.80
exec_fp_opFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected