Skip to main content

ARCH_MASK

Constant ARCH_MASK 

Source
pub const ARCH_MASK: [u64; 32];
Expand description

Per-register architecturally-defined bits — everything a read can ever return non-zero.

Distinct from WRITE_MASK, and the difference is the point: a read-only register like BadVAddr has a write mask of 0 and an arch mask of all-ones, while Cause has a two-bit write mask and a wide arch mask. Reserved bits and bits above a 32-bit register’s width appear in neither.

Applied on both read and Cop0::set_hardware, so a value that is not architecturally representable cannot enter the file in the first place, let alone leave it. Enforcing only on read would leave the stored state carrying bits no hardware register can hold, which the next reader of regs would have to know about.

Config is absent from this table: its readable value is composed rather than masked, and Cop0::read handles it separately.