Gekko: Add union for segment registers

Will be used in the following commit.
This commit is contained in:
Lioncash 2021-08-31 10:38:08 -04:00
parent 75840f62ff
commit e687569e02
1 changed files with 21 additions and 0 deletions

View File

@ -721,6 +721,27 @@ union UReg_BAT_Lo
explicit UReg_BAT_Lo(u32 hex_) : Hex{hex_} {}
};
// Segment register
union UReg_SR
{
BitField<0, 24, u32> VSID; // Virtual segment ID
BitField<24, 4, u32> reserved; // Reserved
BitField<28, 1, u32> N; // No-execute protection
BitField<29, 1, u32> Kp; // User-state protection
BitField<30, 1, u32> Ks; // Supervisor-state protection
BitField<31, 1, u32> T; // Segment register format selector
// These override other fields if T = 1
BitField<0, 20, u32> CNTLR_SPEC; // Device-specific data for I/O controller
BitField<20, 9, u32> BUID; // Bus unit ID
u32 Hex = 0;
UReg_SR() = default;
explicit UReg_SR(u32 hex_) : Hex{hex_} {}
};
union UReg_THRM12
{
BitField<0, 1, u32> V; // Valid