Skip to content

Commit 9381213

Browse files
committed
Xqci (Xqcibm) extension: Fix IDL code and description increasing shift to 6 bit for all dual-register bitfield extraction instructions, where shift and width of bitfield are in register
Signed-off-by: Albert Yosher <[email protected]>
1 parent a53ae15 commit 9381213

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

arch_overlay/qc_iu/ext/Xqci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ versions:
282282
- Fix IDL code sign extension logic for qc.e.lb and qc.e.lh instructions
283283
- Fix IDL code sign extension logic for qc.ext and qc.extd instructions
284284
- Fix IDL code sign extension logic for qc.extdpr, qc.extdprh and qc.extdr instructions
285+
- Fix IDL code and description increasing shift to 6 bit for qc.extdr and qc.extdur instructions
286+
- Fix IDL code and description increasing shift to 6 bit for qc.extdpr and qc.extdprh instructions
287+
- Fix IDL code and description increasing shift to 6 bit for qc.extdupr and qc.extduprh instructions
285288
- Fix IDL code sign extension logic for qc.lieq instruction
286289
implies:
287290
- { name: Xqcia, version: "0.5.0" }

arch_overlay/qc_iu/ext/Xqcibm.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ versions:
101101
changes:
102102
- Fix IDL code sign extension logic for qc.ext and qc.extd instructions
103103
- Fix IDL code sign extension logic for qc.extdpr, qc.extdprh and qc.extdr instructions
104+
- Fix IDL code and description increasing shift to 6 bit for qc.extdr and qc.extdur instructions
105+
- Fix IDL code and description increasing shift to 6 bit for qc.extdpr and qc.extdprh instructions
106+
- Fix IDL code and description increasing shift to 6 bit for qc.extdupr and qc.extduprh instructions
104107
requires: { name: Zca, version: ">= 1.0.0" }
105108
description: |
106109
The Xqcibm extension includes thirty eight instructions that perform bit manipulation,

arch_overlay/qc_iu/inst/Xqci/qc.extdpr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair signed, packed descriptor (Register)
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`, and sign extend the result.
99
The width of the subset is determined by `rs2` bits [13:8] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [4:0].
10+
and the offset of the subset is determined by `rs2` bits [5:0] (0..63).
1111
In case when `rs2` bit [13] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][13:8];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][4:0];
41+
XReg shamt = X[rs2][5:0];
4242
if (width > 0) {
4343
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);
4444
} else {

arch_overlay/qc_iu/inst/Xqci/qc.extdprh.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair signed, packed descriptor high part (Register)
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`, and sign extend the result.
99
The width of the subset is determined by `rs2` bits [29:24] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [20:16].
10+
and the offset of the subset is determined by `rs2` bits [21:16] (0..63).
1111
In case when `rs2` bit [29] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][29:24];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][20:16];
41+
XReg shamt = X[rs2][21:16];
4242
if (width > 0) {
4343
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);
4444
} else {

arch_overlay/qc_iu/inst/Xqci/qc.extdr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair signed (Register)
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`, and sign extend the result.
99
The width of the subset is determined by `rs2` bits [21:16] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [4:0].
10+
and the offset of the subset is determined by `rs2` bits [5:0] (0..63).
1111
In case when `rs2` bit [21] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][21:16];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][4:0];
41+
XReg shamt = X[rs2][5:0];
4242
if (width > 0) {
4343
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);
4444
} else {

arch_overlay/qc_iu/inst/Xqci/qc.extdupr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair unsigned, packed descriptor (Register)
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`.
99
The width of the subset is determined by `rs2` bits [13:8] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [4:0].
10+
and the offset of the subset is determined by `rs2` bits [5:0] (0..63).
1111
In case when `rs2` bit [13] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][13:8];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][4:0];
41+
XReg shamt = X[rs2][5:0];
4242
if (width > 0) {
4343
X[rd] = (pair >> shamt) & ((1 << width) - 1);
4444
} else {

arch_overlay/qc_iu/inst/Xqci/qc.extduprh.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair unsigned, packed descriptor high part (Registe
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`.
99
The width of the subset is determined by `rs2` bits [29:24] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [20:16].
10+
and the offset of the subset is determined by `rs2` bits [21:16] (0..63).
1111
In case when `rs2` bit [29] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][29:24];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][20:16];
41+
XReg shamt = X[rs2][21:16];
4242
if (width > 0) {
4343
X[rd] = (pair >> shamt) & ((1 << width) - 1);
4444
} else {

arch_overlay/qc_iu/inst/Xqci/qc.extdur.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ long_name: Extract bits from pair unsigned (Register)
77
description: |
88
Extract a subset of bits from the register pair [`rs1`, `rs1`+1] into `rd`.
99
The width of the subset is determined by `rs2` bits [21:16] (0..32),
10-
and the offset of the subset is determined by `rs2` bits [4:0].
10+
and the offset of the subset is determined by `rs2` bits [5:0] (0..63).
1111
In case when `rs2` bit [21] == 1 width is enforced to 32.
1212
In case when width == 0, to the destination register written 0.
1313
Instruction encoded in R instruction format.
@@ -38,7 +38,7 @@ operation(): |
3838
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3939
XReg width_bits = X[rs2][21:16];
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
41-
XReg shamt = X[rs2][4:0];
41+
XReg shamt = X[rs2][5:0];
4242
if (width > 0) {
4343
X[rd] = (pair >> shamt) & ((1 << width) - 1);
4444
} else {

0 commit comments

Comments
 (0)