File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ fields:
113113 raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
114114 }
115115 }
116- return csr_value.RCID;
116+ rcid_mask = (1u << RCID_WIDTH) - 1;
117+ return csr_value.RCID & rcid_mask;
117118
118119 MCID :
119120 location : 27-16
@@ -135,7 +136,8 @@ fields:
135136 raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
136137 }
137138 }
138- return csr_value.MCID;
139+ mcid_mask = (1u << MCID_WIDTH) - 1;
140+ return csr_value.MCID & mcid_mask;
139141
140142sw_read() : |
141143 if (implemented?(ExtensionName::Smstateen)) {
@@ -150,4 +152,4 @@ sw_read(): |
150152 raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
151153 }
152154 }
153- return $bits(CSR[srmcfg ]);
155+ return $bits(CSR[mstateen0 ]);
You can’t perform that action at this time.
0 commit comments