pub struct Cop1Control { /* private fields */ }Expand description
COP1 control-register state.
Deliberately only the control registers: the 32 floating-point data registers arrive with the arithmetic in Sprint 3, and putting them here now would be state nothing reads.
Implementations§
Source§impl Cop1Control
impl Cop1Control
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Power-on state: all zero.
The manual does not define a reset value for FCSR; ADR 0004 requires
reproducibility, so it is a documented zero. Software sets it up — which
is exactly what n64-systemtest does on its fourth instruction.
Sourcepub const fn cfc1(&self, fs: u8) -> u32
pub const fn cfc1(&self, fs: u8) -> u32
CFC1 rt, fs — read a control register.
Only FCR0 and FCR31 exist. Every other fs reads zero, which is
a choice rather than a documented fact — the manual does not say — and is
recorded as such.
Sourcepub const fn ctc1(&mut self, fs: u8, value: u32)
pub const fn ctc1(&mut self, fs: u8, value: u32)
CTC1 rt, fs — write a control register.
FCR0 is read-only, so a write to it is discarded rather than stored.
Sourcepub const fn flush_denorm_to_zero(&self) -> bool
pub const fn flush_denorm_to_zero(&self) -> bool
FS — flush denormals to zero (bit 24).
Read by nothing yet. Exposed because n64-systemtest sets it during startup, so an implementation that silently dropped the bit would look fine until the first denormal.
Sourcepub const fn rounding_mode(&self) -> u8
pub const fn rounding_mode(&self) -> u8
RM — the rounding mode (bits 1..=0).
Trait Implementations§
Source§impl Clone for Cop1Control
impl Clone for Cop1Control
Source§fn clone(&self) -> Cop1Control
fn clone(&self) -> Cop1Control
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more