1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-04-28 21:18:09 +00:00

decode1: Indicate instruction privilege in main decode table

Previously the computation of whether an instruction is privileged or
not was done based on the insn_type.  However, that meant that l*cix
(OP_LOAD) and st*cix (OP_STORE) couldn't be made privileged, and
neither could tlbsync (OP_NOP).

Instead, this adds a field to the main instruction decode table to
indicate privileged instructions, and makes the cache-inhibited loads
and stores privileged, along with tlbsync.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
Paul Mackerras
2025-01-23 18:59:46 +11:00
parent 0a11e8455f
commit 00a3db8457
5 changed files with 329 additions and 334 deletions

View File

@@ -483,6 +483,7 @@ package decode_types is
rc : rc_t;
lr : std_ulogic;
privileged : std_ulogic;
sgl_pipe : std_ulogic;
repeat : repeat_t;
end record;
@@ -493,7 +494,8 @@ package decode_types is
invert_a => '0', invert_out => '0', input_carry => ZERO, output_carry => '0',
length => NONE, byte_reverse => '0', sign_extend => '0',
update => '0', reserve => '0', is_32bit => '0',
is_signed => '0', rc => NONE, lr => '0', sgl_pipe => '0', repeat => NONE);
is_signed => '0', rc => NONE, lr => '0',
privileged => '0', sgl_pipe => '0', repeat => NONE);
-- This function maps from insn_code values to primary opcode.
-- With this, we don't have to store the primary opcode of each instruction