Skip to content

Commit ea4ff7e

Browse files
committed
Xqci (Xqcia) extension: fix wrong exponent calculation for qc.normeu instructions
Signed-off-by: Albert Yosher <[email protected]>
1 parent 953b64c commit ea4ff7e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

arch_overlay/qc_iu/ext/Xqci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ versions:
287287
- Fix IDL code and description increasing shift to 6 bit for qc.extdupr and qc.extduprh instructions
288288
- Fix IDL code sign extension logic for qc.lieq instruction
289289
- Fix wrong mantissa bit selection in qc.norm, qc.normu and qc.normeu instructions
290+
- Fix wrong exponent calculation in qc.normeu instruction
290291
implies:
291292
- { name: Xqcia, version: "0.6.0" }
292293
- { name: Xqciac, version: "0.3.0" }

arch_overlay/qc_iu/ext/Xqcia.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ versions:
7979
8080
changes:
8181
- Fix wrong mantissa bit selection in qc.norm, qc.normu and qc.normeu instructions
82+
- Fix wrong exponent calculation in qc.normeu instruction
8283
description: |
8384
The Xqcia extension includes eleven instructions to perform integer arithmetic.
8485

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ access:
3333
operation(): |
3434
XReg clz = ((xlen() - 1) - $signed(highest_set_bit(X[rs1]))) & ~1;
3535
XReg mnt = (X[rs1] << (clz & ~1));
36-
XReg exp = ((-clz) & ~1);
36+
XReg exp = (-(clz & ~1));
3737
X[rd] = {mnt[31:8],exp[7:0]};

0 commit comments

Comments
 (0)