summaryrefslogtreecommitdiffstats
path: root/hdl/decoder.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'hdl/decoder.vhd')
-rw-r--r--hdl/decoder.vhd7
1 files changed, 4 insertions, 3 deletions
diff --git a/hdl/decoder.vhd b/hdl/decoder.vhd
index 5a1eb2c..07e785d 100644
--- a/hdl/decoder.vhd
+++ b/hdl/decoder.vhd
@@ -63,8 +63,9 @@ package body decoder is
pure function instruction_get_class(opc : std_logic_vector(13 downto 0))
return instruction_class_t is
begin
- -- RETURN (0x0008) has bits[13:12]="00" but must be treated as LITERAL_OP
+ -- RETURN (0x0008) and RETFIE (0x0009) have bits[13:12]="00"
if opc = "00000000001000" then return LITERAL_OP; end if;
+ if opc = "00000000001001" then return LITERAL_OP; end if;
case opc(13 downto 12) is
-- byte-oriented file-register operations
when "00" =>
@@ -130,8 +131,8 @@ package body decoder is
when LITERAL_OP =>
-- fixed full-word patterns first (fall inside 00xx space)
- -- if opc(11 downto 0) = "000000000001" then return RETFIE;
- if opc(11 downto 0) = "000000001000" then return RETUR;
+ if opc(11 downto 0) = "000000001001" then return RETFIE;
+ elsif opc(11 downto 0) = "000000001000" then return RETUR;
-- elsif opc(11 downto 0) = "000000000011" then return SLEEP;
-- elsif opc(11 downto 0) = "000000000100" then return CLRWDT;
else