Skip to content

Commit a53ae15

Browse files
committed
Xqci(Xqcibm,Xqcicli,Xqcilo) extensions: fix sext() IDL function calls for several instructions: qc.e.lb,qc.e.lh,qc.ext,qc.extd,qc.extdpr,qc.extdprh,qc.extdr,qc.lieq
Signed-off-by: Albert Yosher <[email protected]>
1 parent d51cb12 commit a53ae15

File tree

12 files changed

+83
-8
lines changed

12 files changed

+83
-8
lines changed

arch_overlay/qc_iu/ext/Xqci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,43 @@ versions:
268268
requires:
269269
name: Zca
270270
version: ">= 1.0.0"
271+
- version: "0.9.0"
272+
state: frozen
273+
ratification_date: null
274+
contributors:
275+
- name: Albert Yosher
276+
company: Qualcomm Technologies, Inc.
277+
278+
- name: Derek Hower
279+
company: Qualcomm Technologies, Inc.
280+
281+
changes:
282+
- Fix IDL code sign extension logic for qc.e.lb and qc.e.lh instructions
283+
- Fix IDL code sign extension logic for qc.ext and qc.extd instructions
284+
- Fix IDL code sign extension logic for qc.extdpr, qc.extdprh and qc.extdr instructions
285+
- Fix IDL code sign extension logic for qc.lieq instruction
286+
implies:
287+
- { name: Xqcia, version: "0.5.0" }
288+
- { name: Xqciac, version: "0.3.0" }
289+
- { name: Xqcibi, version: "0.2.0" }
290+
- { name: Xqcibm, version: "0.7.0" }
291+
- { name: Xqcicli, version: "0.3.0" }
292+
- { name: Xqcicm, version: "0.2.0" }
293+
- { name: Xqcics, version: "0.2.0" }
294+
- { name: Xqcicsr, version: "0.3.0" }
295+
- { name: Xqciint, version: "0.5.0" }
296+
- { name: Xqciio, version: "0.1.0" }
297+
- { name: Xqcilb, version: "0.2.0" }
298+
- { name: Xqcili, version: "0.2.0" }
299+
- { name: Xqcilia, version: "0.2.0" }
300+
- { name: Xqcilo, version: "0.3.0" }
301+
- { name: Xqcilsm, version: "0.4.0" }
302+
- { name: Xqcisim, version: "0.2.0" }
303+
- { name: Xqcisls, version: "0.2.0" }
304+
- { name: Xqcisync, version: "0.2.0" }
305+
requires:
306+
name: Zca
307+
version: ">= 1.0.0"
271308
description: |
272309
The Xqci extension includes a set of instructions that improve RISC-V code density and
273310
performance in microontrollers. It fills several gaps:

arch_overlay/qc_iu/ext/Xqcibm.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ versions:
8888
- Fix IDL code and description to look correct in PDF for qc.insbhr and qc.insbh instructions
8989
- Fix IDL code to to match description for qc.insbr instruction
9090
requires: { name: Zca, version: ">= 1.0.0" }
91+
- version: "0.7.0"
92+
state: frozen
93+
ratification_date: null
94+
contributors:
95+
- name: Albert Yosher
96+
company: Qualcomm Technologies, Inc.
97+
98+
- name: Derek Hower
99+
company: Qualcomm Technologies, Inc.
100+
101+
changes:
102+
- Fix IDL code sign extension logic for qc.ext and qc.extd instructions
103+
- Fix IDL code sign extension logic for qc.extdpr, qc.extdprh and qc.extdr instructions
104+
requires: { name: Zca, version: ">= 1.0.0" }
91105
description: |
92106
The Xqcibm extension includes thirty eight instructions that perform bit manipulation,
93107
include insertion and extraction.

arch_overlay/qc_iu/ext/Xqcicli.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ versions:
2828
2929
changes:
3030
- Add information about instruction formats of each instruction
31+
- version: "0.3.0"
32+
state: frozen
33+
ratification_date: null
34+
contributors:
35+
- name: Albert Yosher
36+
company: Qualcomm Technologies, Inc.
37+
38+
- name: Derek Hower
39+
company: Qualcomm Technologies, Inc.
40+
41+
changes:
42+
- Fix IDL code sign extension logic for qc.lieq instruction
3143
description: |
3244
The Xqcicli extension includes twelve instructions that conditionally
3345
load an immediate value.

arch_overlay/qc_iu/ext/Xqcilo.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ versions:
2929
changes:
3030
- Add information about instruction formats of each instruction
3131
requires: { name: Zca, version: ">= 1.0.0" }
32+
- version: "0.3.0"
33+
state: frozen
34+
ratification_date: null
35+
contributors:
36+
- name: Albert Yosher
37+
company: Qualcomm Technologies, Inc.
38+
39+
- name: Derek Hower
40+
company: Qualcomm Technologies, Inc.
41+
42+
changes:
43+
- Fix IDL code sign extension logic for qc.e.lb and qc.e.lh instructions
3244
description: |
3345
The Xqcilo extension includes eight 48-bit load/stores instructions that use an offset
3446
larger than can be found in the base RISC-V ISA.

arch_overlay/qc_iu/inst/Xqci/qc.e.lb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ access:
3131
vu: always
3232
operation(): |
3333
XReg virtual_address = X[rs1] + imm;
34-
X[rd] = sext(read_memory<8>(virtual_address, $encoding), 7);
34+
X[rd] = sext(read_memory<8>(virtual_address, $encoding), 8);

arch_overlay/qc_iu/inst/Xqci/qc.e.lh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ access:
3131
vu: always
3232
operation(): |
3333
XReg virtual_address = X[rs1] + imm;
34-
X[rd] = sext(read_memory<16>(virtual_address, $encoding), 15);
34+
X[rd] = sext(read_memory<16>(virtual_address, $encoding), 16);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ access:
3636
operation(): |
3737
XReg width = width_minus1 + 1;
3838
XReg unsigned_extraction = (X[rs1] >> shamt) & ((1 << width) - 1);
39-
X[rd] = sext(unsigned_extraction, width_minus1);
39+
X[rd] = sext(unsigned_extraction, width);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ access:
3636
operation(): |
3737
Bits<{1'b0, XLEN}*2> pair = {X[rs1 + 1], X[rs1]};
3838
XReg width = width_minus1 + 1;
39-
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width_minus1);
39+
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ operation(): |
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
4141
XReg shamt = X[rs2][4:0];
4242
if (width > 0) {
43-
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width - 1);
43+
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);
4444
} else {
4545
X[rd] = 0;
4646
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ operation(): |
4040
XReg width = (width_bits > 32) ? 32 : width_bits;
4141
XReg shamt = X[rs2][20:16];
4242
if (width > 0) {
43-
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width - 1);
43+
X[rd] = sext((pair >> shamt) & ((1 << width) - 1), width);
4444
} else {
4545
X[rd] = 0;
4646
}

0 commit comments

Comments
 (0)