From 11630c1ed116f07964e24b5d8d6ffe698c7bed24 Mon Sep 17 00:00:00 2001 From: JeanRochCoulon Date: Thu, 31 Aug 2023 15:38:35 +0200 Subject: [PATCH] Decode AMOXOR (and others) instructions only in 64 bits it (should) fixes #1352 --- core/decoder.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/decoder.sv b/core/decoder.sv index 4318262b24..f280db8d27 100644 --- a/core/decoder.sv +++ b/core/decoder.sv @@ -1073,7 +1073,7 @@ module decoder import ariane_pkg::*; #( instruction_o.rd[4:0] = instr.atype.rd; // TODO(zarubaf): Ordering // words - if (CVA6Cfg.RVA && instr.stype.funct3 == 3'h2) begin + if (riscv::IS_XLEN64 && CVA6Cfg.RVA && instr.stype.funct3 == 3'h2) begin unique case (instr.instr[31:27]) 5'h0: instruction_o.op = ariane_pkg::AMO_ADDW; 5'h1: instruction_o.op = ariane_pkg::AMO_SWAPW;