Skip to content

Commit 1c982a4

Browse files
authored
fix(Xqci): fixing encoding and IDL code of few instructions (riscv-software-src#794)
changes: - Fix desciption of qc.c.eir instruction to match IDL code and functionality - Fix encoding of qc.swm and qc.swmi instructions to state that rs3 cannot be x0 - Fix description and IDL code of qc.swm and qc.lwm instructions to state that length is in rs2[4:0] Signed-off-by: Albert Yosher <[email protected]>
1 parent 88471dd commit 1c982a4

File tree

7 files changed

+70
-7
lines changed

7 files changed

+70
-7
lines changed

arch_overlay/qc_iu/ext/Xqci.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,43 @@ versions:
379379
- { name: Xqcicm, version: "0.2.0" }
380380
- { name: Xqcics, version: "0.2.0" }
381381
- { name: Xqcicsr, version: "0.3.0" }
382-
- { name: Xqciint, version: "0.7.0" }
382+
- { name: Xqciint, version: "0.8.0" }
383+
- { name: Xqciio, version: "0.1.0" }
384+
- { name: Xqcilb, version: "0.2.0" }
385+
- { name: Xqcili, version: "0.2.0" }
386+
- { name: Xqcilia, version: "0.2.0" }
387+
- { name: Xqcilo, version: "0.3.0" }
388+
- { name: Xqcilsm, version: "0.6.0" }
389+
- { name: Xqcisim, version: "0.2.0" }
390+
- { name: Xqcisls, version: "0.2.0" }
391+
- { name: Xqcisync, version: "0.3.0" }
392+
requires:
393+
name: Zca
394+
version: ">= 1.0.0"
395+
- version: "0.12.0"
396+
state: frozen
397+
ratification_date: null
398+
contributors:
399+
- name: Albert Yosher
400+
company: Qualcomm Technologies, Inc.
401+
402+
- name: Derek Hower
403+
company: Qualcomm Technologies, Inc.
404+
405+
changes:
406+
- Fix desciption of qc.c.eir instruction to match IDL code and functionality
407+
- Fix encoding of qc.swm and qc.swmi instructions to state that rs3 cannot be x0
408+
- Fix description and IDL code of qc.swm and qc.lwm instructions to state that length is in rs2[4:0]
409+
implies:
410+
- { name: Xqcia, version: "0.7.0" }
411+
- { name: Xqciac, version: "0.3.0" }
412+
- { name: Xqcibi, version: "0.2.0" }
413+
- { name: Xqcibm, version: "0.8.0" }
414+
- { name: Xqcicli, version: "0.3.0" }
415+
- { name: Xqcicm, version: "0.2.0" }
416+
- { name: Xqcics, version: "0.2.0" }
417+
- { name: Xqcicsr, version: "0.3.0" }
418+
- { name: Xqciint, version: "0.9.0" }
383419
- { name: Xqciio, version: "0.1.0" }
384420
- { name: Xqcilb, version: "0.2.0" }
385421
- { name: Xqcili, version: "0.2.0" }

arch_overlay/qc_iu/ext/Xqciint.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,19 @@ versions:
121121
- Fix IDL code for qc.c.clrint, qc.c.setint, qc.clrinti and qc.setinti instructions because change in IDL '<<' operator
122122
- Fix IDL code for qc.c.di, qc.c.dir, qc.c.ei, qc.c.eir and qc.c.mienter.nest instructions because change in IDL '<<' operator
123123
requires: { name: Zca, version: ">= 1.0.0" }
124+
- version: "0.9.0"
125+
state: frozen
126+
ratification_date: null
127+
contributors:
128+
- name: Albert Yosher
129+
company: Qualcomm Technologies, Inc.
130+
131+
- name: Derek Hower
132+
company: Qualcomm Technologies, Inc.
133+
134+
changes:
135+
- Fix desciption of qc.c.eir instruction to match IDL code and functionality
136+
requires: { name: Zca, version: ">= 1.0.0" }
124137
description: |
125138
The Xqciint extension includes eleven instructions to accelerate interrupt
126139
servicing by performing common actions during ISR prologue/epilogue.

arch_overlay/qc_iu/ext/Xqcilsm.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ versions:
6464
6565
changes:
6666
- Fix IDL code and description of qc.setwm instruction to state that number of words written 0..31.
67+
- version: "0.6.0"
68+
state: frozen
69+
ratification_date: null
70+
contributors:
71+
- name: Albert Yosher
72+
company: Qualcomm Technologies, Inc.
73+
74+
- name: Derek Hower
75+
company: Qualcomm Technologies, Inc.
76+
77+
changes:
78+
- Fix encoding of qc.swm and qc.swmi instructions to state that rs3 cannot be x0
79+
- Fix description and IDL code of qc.swm and qc.lwm instructions to state that length is in rs2[4:0]
6780
description: |
6881
The Xqcilsm extension includes six instructions that transfer multiple values
6982
between registers and memory.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ kind: instruction
55
name: qc.c.eir
66
long_name: Restore interrupts (Register)
77
description: |
8-
Globally restore interrupts, write `rs1` to `mstatus`.
9-
Equivalent to "csrrs `zero`, `mstatus`, `rs1`".
8+
Globally restore interrupts, write bit 3 of rs1 to `mstatus.MIE` and `qc.mcause.MIE`.
109
Instruction encoded in CI instruction format.
1110
definedBy:
1211
anyOf:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: qc.lwm
66
long_name: Load word multiple
77
description: |
88
Loads multiple words starting from address (`rs1` + `imm`) to registers, starting from `rd`.
9-
The number of words is in `rs2`.
9+
The number of words is in `rs2` bits [4:0].
1010
Instruction encoded in R instruction format.
1111
definedBy:
1212
anyOf:
@@ -35,7 +35,7 @@ access:
3535
vu: always
3636
operation(): |
3737
XReg vaddr = X[rs1] + imm;
38-
XReg num_words = X[rs2];
38+
XReg num_words = X[rs2][4:0];
3939
raise (ExceptionCode::IllegalInstruction, effective_ldst_mode(), $encoding) if ((rd + num_words) > 32);
4040
for (U32 i = 0; i < num_words; i++) {
4141
X[rd + i] = read_memory<32>(vaddr, $encoding);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: qc.swm
66
long_name: Store word multiple
77
description: |
88
Stores multiple words from the registers starting at `rs3` to the address starting at (`rs1` + `imm`).
9-
The number of words is in `rs2`.
9+
The number of words is in `rs2` bits [4:0].
1010
Instruction encoded in R instruction format.
1111
definedBy:
1212
anyOf:
@@ -26,6 +26,7 @@ encoding:
2626
not: 0
2727
- name: rs3
2828
location: 11-7
29+
not: 0
2930
assembly: " xs3, xs2, imm(xs1)"
3031
access:
3132
s: always
@@ -34,7 +35,7 @@ access:
3435
vu: always
3536
operation(): |
3637
XReg vaddr = X[rs1] + imm;
37-
XReg num_words = X[rs2];
38+
XReg num_words = X[rs2][4:0];
3839
raise (ExceptionCode::IllegalInstruction, effective_ldst_mode(), $encoding) if ((rs3 + num_words) > 32);
3940
for (U32 i = 0; i < num_words; i++) {
4041
write_memory<32>(vaddr, X[rs3 + i], $encoding);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ encoding:
2626
not: 0
2727
- name: rs3
2828
location: 11-7
29+
not: 0
2930
assembly: " xs3, length, imm(xs1)"
3031
access:
3132
s: always

0 commit comments

Comments
 (0)