diff --git a/hdl/hazard3_frontend.v b/hdl/hazard3_frontend.v index 99012df..8a60c15 100644 --- a/hdl/hazard3_frontend.v +++ b/hdl/hazard3_frontend.v @@ -563,7 +563,7 @@ wire [4:0] zcmp_pushpop_rs1 = 5'd01 ; // ra (ret) wire [4:0] zcmp_sa01_r1s = {|next_instr[9:8], ~|next_instr[9:8], next_instr[9:7]}; -wire [4:0] zcmp_sa01_r2s = {|next_instr[2:1], ~|next_instr[2:1], next_instr[2:0]}; +wire [4:0] zcmp_sa01_r2s = {|next_instr[4:3], ~|next_instr[4:3], next_instr[4:2]}; wire [4:0] zcmp_mvsa01_rs1 = {4'h5, uop_ctr[0]}; wire [4:0] zcmp_mva01s_rs1 = uop_ctr[0] ? zcmp_sa01_r2s : zcmp_sa01_r1s; diff --git a/hdl/hazard3_instr_decompress.v b/hdl/hazard3_instr_decompress.v index 06f2fa3..18d33e3 100644 --- a/hdl/hazard3_instr_decompress.v +++ b/hdl/hazard3_instr_decompress.v @@ -160,7 +160,7 @@ wire [31:0] zcmp_pop_stack_adj_instr = `RVOPC_NOZ_ADDI | rfmt_rd(5'd2) | rfmt_rs }; wire [4:0] zcmp_sa01_r1s = {|instr_in[9:8], ~|instr_in[9:8], instr_in[9:7]}; -wire [4:0] zcmp_sa01_r2s = {|instr_in[2:1], ~|instr_in[2:1], instr_in[2:0]}; +wire [4:0] zcmp_sa01_r2s = {|instr_in[4:3], ~|instr_in[4:3], instr_in[4:2]}; // ----------------------------------------------------------------------------