mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-01-11 23:43:15 +00:00
execute1: Fix no-op behaviour of reading undefined SPRs
In privileged mode, mfspr from an undefined or unimplemented SPR number should be a no-op, which is implemented here by writing back the same value that the destination register previously had. However, we ended up writing back 0 because ex1.res2_sel was not set correctly. To fix this, set res2_sel to 10 in the undefined SPR case. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
parent
7619df6b78
commit
6fe0b6e444
@ -1456,6 +1456,7 @@ begin
|
||||
end if;
|
||||
slow_op := '1';
|
||||
v.se.noop_spr_read := '1';
|
||||
v.res2_sel := "10";
|
||||
if ex1.msr(MSR_PR) = '1' then
|
||||
illegal := '1';
|
||||
end if;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user