Skip to content

Commit 2471697

Browse files
authored
Merge branch 'main' into nightly-fix
2 parents d34fd02 + f716423 commit 2471697

27 files changed

+220
-75
lines changed

.devcontainer/Dockerfile

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,35 @@ WORKDIR /workspace
66

77
RUN export DEBIAN_FRONTEND=noninteractive
88
RUN apt-get update
9-
RUN apt-get install -y --no-install-recommends git \
10-
gh \
11-
less \
12-
python3 \
13-
python3.12-venv \
14-
python3-pip \
15-
build-essential \
16-
ruby \
17-
ruby-dev \
18-
bundler \
19-
nodejs \
20-
npm \
21-
ditaa \
22-
libyaml-dev \
23-
cmake \
24-
g++ \
25-
clang-format \
26-
clang-tidy \
27-
libelf-dev \
28-
gcc-riscv64-unknown-elf \
29-
shellcheck
9+
10+
# please keep pkgs sorted
11+
RUN apt-get install -y --no-install-recommends \
12+
build-essential \
13+
bundler \
14+
clang-format \
15+
clang-tidy \
16+
cmake \
17+
ditaa \
18+
g++ \
19+
gcc-riscv64-linux-gnu \
20+
gcc-riscv64-unknown-elf \
21+
gdb \
22+
gh \
23+
git \
24+
less \
25+
libc6-dev-riscv64-cross \
26+
libelf-dev \
27+
libgmp-dev \
28+
libyaml-dev \
29+
nodejs \
30+
npm \
31+
python3 \
32+
python3-pip \
33+
python3.12-venv \
34+
ruby \
35+
ruby-dev \
36+
shellcheck
37+
3038
RUN apt-get clean autoclean
3139
RUN apt-get autoremove -y
3240
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/*

arch_overlay/qc_iu/ext/Xqci.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,50 @@ 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 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
288+
- Fix IDL code sign extension logic for qc.lieq instruction
289+
- Fix wrong mantissa bit selection in qc.norm, qc.normu and qc.normeu instructions
290+
- Fix wrong exponent calculation in qc.normeu instruction
291+
- Fix IDL code and description of qc.setwm instruction to state that number of words written 0..31.
292+
- Fix IDL code for Smdbltrp and Smrnmi spec compatibility for qc.c.mret and qc.c.mnret instructions
293+
implies:
294+
- { name: Xqcia, version: "0.6.0" }
295+
- { name: Xqciac, version: "0.3.0" }
296+
- { name: Xqcibi, version: "0.2.0" }
297+
- { name: Xqcibm, version: "0.7.0" }
298+
- { name: Xqcicli, version: "0.3.0" }
299+
- { name: Xqcicm, version: "0.2.0" }
300+
- { name: Xqcics, version: "0.2.0" }
301+
- { name: Xqcicsr, version: "0.3.0" }
302+
- { name: Xqciint, version: "0.6.0" }
303+
- { name: Xqciio, version: "0.1.0" }
304+
- { name: Xqcilb, version: "0.2.0" }
305+
- { name: Xqcili, version: "0.2.0" }
306+
- { name: Xqcilia, version: "0.2.0" }
307+
- { name: Xqcilo, version: "0.3.0" }
308+
- { name: Xqcilsm, version: "0.5.0" }
309+
- { name: Xqcisim, version: "0.2.0" }
310+
- { name: Xqcisls, version: "0.2.0" }
311+
- { name: Xqcisync, version: "0.2.0" }
312+
requires:
313+
name: Zca
314+
version: ">= 1.0.0"
271315
description: |
272316
The Xqci extension includes a set of instructions that improve RISC-V code density and
273317
performance in microontrollers. It fills several gaps:

arch_overlay/qc_iu/ext/Xqcia.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,19 @@ versions:
6767
- Fix typos in description of qc.shlsat and qc.shlusat instructions
6868
- Fix bug in qc.shlsat that caused wrong IDL code result
6969
- Fix clobbering of saturation results in [add|addu|sub]sat instructions
70+
- version: "0.6.0"
71+
state: frozen
72+
ratification_date: null
73+
contributors:
74+
- name: Albert Yosher
75+
company: Qualcomm Technologies, Inc.
76+
77+
- name: Derek Hower
78+
company: Qualcomm Technologies, Inc.
79+
80+
changes:
81+
- Fix wrong mantissa bit selection in qc.norm, qc.normu and qc.normeu instructions
82+
- Fix wrong exponent calculation in qc.normeu instruction
7083
description: |
7184
The Xqcia extension includes eleven instructions to perform integer arithmetic.
7285

arch_overlay/qc_iu/ext/Xqcibm.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ 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+
- 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
107+
requires: { name: Zca, version: ">= 1.0.0" }
91108
description: |
92109
The Xqcibm extension includes thirty eight instructions that perform bit manipulation,
93110
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/Xqciint.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ versions:
8080
changes:
8181
- Add stack checks to qc.c.mienter, qc.c.mienter.nest, qc.c.mileaveret
8282
requires: { name: Zca, version: ">= 1.0.0" }
83+
- version: "0.6.0"
84+
state: frozen
85+
ratification_date: null
86+
contributors:
87+
- name: Albert Yosher
88+
company: Qualcomm Technologies, Inc.
89+
90+
- name: Derek Hower
91+
company: Qualcomm Technologies, Inc.
92+
93+
changes:
94+
- Fix IDL code for Smdbltrp and Smrnmi spec compatibility for qc.c.mret and qc.c.mnret instructions
95+
requires: { name: Zca, version: ">= 1.0.0" }
8396
description: |
8497
The Xqciint extension includes eleven instructions to accelerate interrupt
8598
servicing by performing common actions during ISR prologue/epilogue.

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/ext/Xqcilsm.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ versions:
5252
5353
changes:
5454
- Fix encoding of qc.swmi
55+
- version: "0.5.0"
56+
state: frozen
57+
ratification_date: null
58+
contributors:
59+
- name: Albert Yosher
60+
company: Qualcomm Technologies, Inc.
61+
62+
- name: Derek Hower
63+
company: Qualcomm Technologies, Inc.
64+
65+
changes:
66+
- Fix IDL code and description of qc.setwm instruction to state that number of words written 0..31.
5567
description: |
5668
The Xqcilsm extension includes six instructions that transfer multiple values
5769
between registers and memory.

arch_overlay/qc_iu/inst/Xqci/qc.c.mnret.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ operation(): |
3030
CSR[qc.mcause].sw_write(qc_mcause_val_masked |
3131
(1<<28) | (mnpie_val<<26) | (1<<30) |
3232
(mnpil_val << 12) | (0xF << 20));
33+
if (CSR[mnstatus].MNPP != 2'b11) {
34+
CSR[mstatus].MPRV = 0;
35+
if (implemented?(ExtensionName::Smdbltrp)) {
36+
CSR[mstatush].MDT = 1'b0;
37+
}
38+
}
3339
if (CSR[mnstatus].MNPP == 2'b00) {
3440
set_mode(PrivilegeMode::U);
3541
} else if (CSR[mnstatus].MNPP == 2'b01) {

arch_overlay/qc_iu/inst/Xqci/qc.c.mret.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ operation(): |
2828
Bits<4> mpil_val = (qc_mcause_val >> 16) & 0xF;
2929
CSR[mstatus].MIE = mpie_val;
3030
CSR[mstatus].MPIE = 1'b1;
31-
CSR[mstatush].MDT = mpdt_val;
31+
if (implemented?(ExtensionName::Smdbltrp)) {
32+
CSR[mstatush].MDT = mpdt_val;
33+
}
3234
CSR[qc.mcause].sw_write(qc_mcause_val_masked |
3335
(1<<27) | (mpie_val<<26) | (0<<29) |
3436
(mpil_val << 12) | (0xF << 16));
3537
if (mpdt_val == 1'b0) {
38+
if (CSR[mstatus].MPP != 2'b11) {
39+
CSR[mstatus].MPRV = 0;
40+
}
3641
if (CSR[mstatus].MPP == 2'b00) {
3742
set_mode(PrivilegeMode::U);
3843
} else if (CSR[mstatus].MPP == 2'b01) {

0 commit comments

Comments
 (0)