From c565495677c3a96ef26eaa2dbd4b10eccc4aea89 Mon Sep 17 00:00:00 2001 From: Ingrid Haahjem Date: Thu, 20 Jul 2023 06:37:45 -0500 Subject: [PATCH 1/2] Fixed c_addi instruction in isa_support Signed-off-by: Ingrid Haahjem --- lib/support/isa_support.sv | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/support/isa_support.sv b/lib/support/isa_support.sv index 78011c1203..c174da6465 100644 --- a/lib/support/isa_support.sv +++ b/lib/support/isa_support.sv @@ -2141,6 +2141,7 @@ asm = build_asm(C_LUI, CI_TYPE, instr); ( (instr.compressed.opcode == C1) + && (instr.compressed.format.ci.rd_rs1.gpr != X0) && (instr.compressed.format.ci.funct3 == FUNCT3_C_ADDI_NOP)) : asm = build_asm(C_ADDI, CI_TYPE, instr); From 80513b455f1ce5e3b7c4ab839d877402fa9c1a2b Mon Sep 17 00:00:00 2001 From: Ingrid Haahjem Date: Thu, 20 Jul 2023 06:41:10 -0500 Subject: [PATCH 2/2] Fixed alignment Signed-off-by: Ingrid Haahjem --- lib/support/isa_support.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/support/isa_support.sv b/lib/support/isa_support.sv index c174da6465..d91926b478 100644 --- a/lib/support/isa_support.sv +++ b/lib/support/isa_support.sv @@ -2141,7 +2141,7 @@ asm = build_asm(C_LUI, CI_TYPE, instr); ( (instr.compressed.opcode == C1) - && (instr.compressed.format.ci.rd_rs1.gpr != X0) + && (instr.compressed.format.ci.rd_rs1.gpr != X0) && (instr.compressed.format.ci.funct3 == FUNCT3_C_ADDI_NOP)) : asm = build_asm(C_ADDI, CI_TYPE, instr);