udb 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.data/cfgs/example_rv64_with_overlay.yaml +1 -0
- data/.data/cfgs/mc100-32-full-example.yaml +1 -0
- data/.data/cfgs/profile/RVA20S64.yaml +2 -0
- data/.data/cfgs/profile/RVA20U64.yaml +2 -0
- data/.data/cfgs/profile/RVA22S64.yaml +2 -0
- data/.data/cfgs/profile/RVA22U64.yaml +2 -0
- data/.data/cfgs/profile/RVA23S64.yaml +2 -0
- data/.data/cfgs/profile/RVA23U64.yaml +2 -0
- data/.data/cfgs/profile/RVB23S64.yaml +2 -0
- data/.data/cfgs/profile/RVB23U64.yaml +2 -0
- data/.data/cfgs/qc_iu.yaml +1 -0
- data/.data/cfgs/rv32-riscv-tests.yaml +1 -0
- data/.data/cfgs/rv32-vector.yaml +1 -0
- data/.data/cfgs/rv64-riscv-tests.yaml +1 -0
- data/.data/cfgs/rv64-vector.yaml +1 -0
- data/.data/spec/std/isa/csr/H/henvcfg.yaml +1 -1
- data/.data/spec/std/isa/csr/H/htimedeltah.yaml +1 -1
- data/.data/spec/std/isa/csr/Smctr/vsctrctl.yaml +1 -1
- data/.data/spec/std/isa/csr/hstateen0h.yaml +1 -1
- data/.data/spec/std/isa/csr/hstateen1h.yaml +1 -1
- data/.data/spec/std/isa/csr/hstateen2h.yaml +1 -1
- data/.data/spec/std/isa/csr/hstateen3h.yaml +1 -1
- data/.data/spec/std/isa/csr/instreth.yaml +1 -3
- data/.data/spec/std/isa/csr/minstreth.yaml +1 -1
- data/.data/spec/std/isa/csr/mstatus.yaml +1 -1
- data/.data/spec/std/isa/csr/mstatush.yaml +1 -1
- data/.data/spec/std/isa/csr/senvcfg.yaml +1 -1
- data/.data/spec/std/isa/csr/sepc.yaml +4 -3
- data/.data/spec/std/isa/csr/sip.yaml +1 -1
- data/.data/spec/std/isa/csr/sscratch.yaml +3 -2
- data/.data/spec/std/isa/csr/stval.yaml +3 -2
- data/.data/spec/std/isa/csr/stvec.yaml +5 -4
- data/.data/spec/std/isa/csr/time.yaml +1 -1
- data/.data/spec/std/isa/csr/timeh.yaml +1 -1
- data/.data/spec/std/isa/csr/vsepc.yaml +6 -5
- data/.data/spec/std/isa/csr/vstvec.yaml +5 -4
- data/.data/spec/std/isa/ext/M.yaml +4 -0
- data/.data/spec/std/isa/ext/Shgatpa.yaml +1 -0
- data/.data/spec/std/isa/ext/Zibi.yaml +29 -0
- data/.data/spec/std/isa/inst/B/roriw.yaml +1 -1
- data/.data/spec/std/isa/inst/B/rorw.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +3 -0
- data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +3 -0
- data/.data/spec/std/isa/inst/M/mul.yaml +1 -3
- data/.data/spec/std/isa/inst/M/mulh.yaml +1 -3
- data/.data/spec/std/isa/inst/M/mulhsu.yaml +1 -3
- data/.data/spec/std/isa/inst/M/mulhu.yaml +1 -3
- data/.data/spec/std/isa/inst/M/mulw.yaml +1 -3
- data/.data/spec/std/isa/inst/Zbb/ctzw.yaml +6 -1
- data/.data/spec/std/isa/inst/{Q → Zfa}/fltq.q.yaml +2 -2
- data/.data/spec/std/isa/inst/Zibi/beqi.yaml +45 -0
- data/.data/spec/std/isa/inst/Zibi/bnei.yaml +45 -0
- data/.data/spec/std/isa/inst/Zicbom/cbo.inval.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicfiss/ssamoswap.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicfiss/ssamoswap.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicfiss/sspopchk.yaml +63 -0
- data/.data/spec/std/isa/inst/Zicfiss/sspush.yaml +63 -0
- data/.data/spec/std/isa/inst/Zimop/mop.r.28.yaml +1 -2
- data/.data/spec/std/isa/inst/Zimop/mop.r.N.layout +1 -2
- data/.data/spec/std/isa/inst/Zimop/mop.rr.7.yaml +1 -2
- data/.data/spec/std/isa/inst/Zimop/mop.rr.N.layout +1 -2
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vandn.vv.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vandn.vx.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vbrev8.v.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vrev8.v.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vrol.vv.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vrol.vx.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vror.vi.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vror.vv.yaml +1 -1
- data/.data/spec/std/isa/inst/{Zvbb → Zvkb}/vror.vx.yaml +1 -1
- data/.data/spec/std/isa/isa/globals.isa +1 -1
- data/.data/spec/std/isa/isa/util.idl +3 -3
- data/.data/spec/std/isa/param/COUNTINHIBIT_EN.yaml +9 -0
- data/.data/spec/std/isa/param/HCONTEXT_AVAILABLE.yaml +1 -1
- data/.data/spec/std/isa/param/MUTABLE_MISA_H.yaml +1 -1
- data/.data/spec/std/isa/param/MUTABLE_MISA_S.yaml +1 -1
- data/lib/udb/config.rb +1 -1
- data/lib/udb/version.rb +1 -1
- metadata +47 -46
- data/.data/spec/std/isa/inst/Zicfiss/sspopchk.x1.yaml +0 -25
- data/.data/spec/std/isa/inst/Zicfiss/sspopchk.x5.yaml +0 -25
- data/.data/spec/std/isa/inst/Zicfiss/sspush.x1.yaml +0 -25
- data/.data/spec/std/isa/inst/Zicfiss/sspush.x5.yaml +0 -25
- /data/.data/spec/std/isa/inst/{Smdbltrp → Smctr}/sctrclr.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fcvtmod.w.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fleq.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fleq.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fleq.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{F → Zfa}/fleq.s.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fli.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fli.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fli.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fltq.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fltq.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{F → Zfa}/fltq.s.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fmaxm.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fmaxm.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fmaxm.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fminm.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fminm.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fminm.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fmvh.x.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fmvh.x.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fmvp.d.x.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fmvp.q.x.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/fround.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/fround.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/fround.q.yaml +0 -0
- /data/.data/spec/std/isa/inst/{D → Zfa}/froundnx.d.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Zfh → Zfa}/froundnx.h.yaml +0 -0
- /data/.data/spec/std/isa/inst/{Q → Zfa}/froundnx.q.yaml +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 642af8189712e586458dbc95aecdec921fff4d765b5914f00c59adf422ee60a0
|
|
4
|
+
data.tar.gz: 8e914af25855fd5335cee61d48b29b224886c39cb5b63b00530fc0fe0cc83747
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 23f4835af0d1fd845ef8c48ddd7dfce7354aa6656ad993ed189234fbe2f43eb01700ec24972336bcc3ddb6e0c41ee609eac4a8f88f6021e388a09e69e2a59834
|
|
7
|
+
data.tar.gz: 2eb190eecd92203f877366434e3400b58d50007da7dfbdf5745bed97443a4c39d6120624cac2eebcba697ad77ae81bc1eaaca91c60b71dd02daee44768a4e26f
|
data/.data/cfgs/qc_iu.yaml
CHANGED
|
@@ -12,6 +12,7 @@ implemented_extensions:
|
|
|
12
12
|
- { name: Smdbltrp, version: "= 1.0" }
|
|
13
13
|
- { name: I, version: "= 2.1" }
|
|
14
14
|
- { name: M, version: "= 2.0" }
|
|
15
|
+
- { name: Zmmul, version: "= 1.0" }
|
|
15
16
|
- { name: B, version: "= 1.0" }
|
|
16
17
|
- { name: Zbs, version: "= 1.0" }
|
|
17
18
|
- { name: Zbb, version: "= 1.0" }
|
data/.data/cfgs/rv32-vector.yaml
CHANGED
data/.data/cfgs/rv64-vector.yaml
CHANGED
|
@@ -10,7 +10,7 @@ long_name: Supervisor Exception Program Counter
|
|
|
10
10
|
address: 0x141
|
|
11
11
|
writable: true
|
|
12
12
|
priv_mode: S
|
|
13
|
-
length:
|
|
13
|
+
length: SXLEN
|
|
14
14
|
description: |
|
|
15
15
|
Written with the PC of an instruction on an exception or interrupt taken in (H)S-mode.
|
|
16
16
|
|
|
@@ -20,7 +20,8 @@ definedBy:
|
|
|
20
20
|
name: S
|
|
21
21
|
fields:
|
|
22
22
|
PC:
|
|
23
|
-
|
|
23
|
+
location_rv32: 31-0
|
|
24
|
+
location_rv64: 63-0
|
|
24
25
|
description: |
|
|
25
26
|
When a trap is taken into S-mode, `sepc.PC` is written with the virtual address of the
|
|
26
27
|
instruction that was interrupted or that encountered the exception.
|
|
@@ -38,7 +39,7 @@ fields:
|
|
|
38
39
|
When `misa.C` is clear, bit 1 is masked to zero. Writes to bit 1 are still captured, and
|
|
39
40
|
may be visible on the next read with `misa.C` is set.
|
|
40
41
|
|
|
41
|
-
Holds bits
|
|
42
|
+
Holds bits [SXLEN-1:<%= ext?(:C) ? 2 : 1 %>] of the virtual address associated with an exception.
|
|
42
43
|
type: RW-RH
|
|
43
44
|
sw_write(csr_value): |
|
|
44
45
|
return csr_value.PC & ~64'b1;
|
|
@@ -15,7 +15,7 @@ description: |
|
|
|
15
15
|
|
|
16
16
|
Hypervisor-related interrupts (VS-mode interrupts and Supervisor Guest interrupts) are not reflected
|
|
17
17
|
in `sip` even though those interrupts can be taken in HS-mode. Instead, they are reported through `hip`.
|
|
18
|
-
length:
|
|
18
|
+
length: SXLEN
|
|
19
19
|
definedBy:
|
|
20
20
|
extension:
|
|
21
21
|
name: S
|
|
@@ -10,14 +10,15 @@ long_name: Supervisor Scratch Register
|
|
|
10
10
|
address: 0x140
|
|
11
11
|
writable: true
|
|
12
12
|
priv_mode: S
|
|
13
|
-
length:
|
|
13
|
+
length: SXLEN
|
|
14
14
|
description: Scratch register for software use. Bits are not interpreted by hardware.
|
|
15
15
|
definedBy: # actually, defined by RV64, but must implement U-mode for this CSR to exist
|
|
16
16
|
extension:
|
|
17
17
|
name: S
|
|
18
18
|
fields:
|
|
19
19
|
SCRATCH:
|
|
20
|
-
|
|
20
|
+
location_rv32: 31-0
|
|
21
|
+
location_rv64: 63-0
|
|
21
22
|
description: Scratch value
|
|
22
23
|
type: RW
|
|
23
24
|
reset_value: UNDEFINED_LEGAL
|
|
@@ -11,13 +11,14 @@ address: 0x143
|
|
|
11
11
|
writable: true
|
|
12
12
|
description: Holds trap-specific information
|
|
13
13
|
priv_mode: S
|
|
14
|
-
length:
|
|
14
|
+
length: SXLEN
|
|
15
15
|
definedBy:
|
|
16
16
|
extension:
|
|
17
17
|
name: S
|
|
18
18
|
fields:
|
|
19
19
|
VALUE:
|
|
20
|
-
|
|
20
|
+
location_rv32: 31-0
|
|
21
|
+
location_rv64: 63-0
|
|
21
22
|
description: |
|
|
22
23
|
Written with trap-specific information when a trap is taken into S-mode.
|
|
23
24
|
|
|
@@ -10,19 +10,20 @@ long_name: Supervisor Trap Vector
|
|
|
10
10
|
address: 0x105
|
|
11
11
|
writable: true
|
|
12
12
|
priv_mode: S
|
|
13
|
-
length:
|
|
13
|
+
length: SXLEN
|
|
14
14
|
description: Controls where traps jump.
|
|
15
15
|
definedBy:
|
|
16
16
|
extension:
|
|
17
17
|
name: S
|
|
18
18
|
fields:
|
|
19
19
|
BASE:
|
|
20
|
-
|
|
20
|
+
location_rv32: 31-2
|
|
21
|
+
location_rv64: 63-2
|
|
21
22
|
description: |
|
|
22
23
|
<%- va_size = ext?(:Sv57) ? 57 : (ext?(:Sv48) ? 48 : 39) -%>
|
|
23
|
-
Bits
|
|
24
|
+
Bits [SXLEN-1:2] of the virtual address of the exception vector for any trap taken into S-mode.
|
|
24
25
|
|
|
25
|
-
If the base address is written with a non-canonical address (_i.e._, bits
|
|
26
|
+
If the base address is written with a non-canonical address (_i.e._, bits [SXLEN-1:<%= va_size %>] do not match bit <%= va_size-1 %>),
|
|
26
27
|
the write should be ignored.
|
|
27
28
|
|
|
28
29
|
type: RW-R
|
|
@@ -79,7 +79,7 @@ sw_read(): |
|
|
|
79
79
|
}
|
|
80
80
|
} else if (mode() == PrivilegeMode::VU) {
|
|
81
81
|
# access in VU mode
|
|
82
|
-
if (((CSR[hcounteren].TM & CSR[scounteren].TM) == 1'b0) && (CSR[mcounteren].
|
|
82
|
+
if (((CSR[hcounteren].TM & CSR[scounteren].TM) == 1'b0) && (CSR[mcounteren].TM == 1'b1)) {
|
|
83
83
|
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
|
|
84
84
|
} else if (CSR[mcounteren].TM == 1'b0) {
|
|
85
85
|
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
|
|
@@ -80,7 +80,7 @@ sw_read(): |
|
|
|
80
80
|
}
|
|
81
81
|
} else if (mode() == PrivilegeMode::VU) {
|
|
82
82
|
# access in VU mode
|
|
83
|
-
if (((CSR[hcounteren].TM & CSR[scounteren].TM) == 1'b0) && (CSR[mcounteren].
|
|
83
|
+
if (((CSR[hcounteren].TM & CSR[scounteren].TM) == 1'b0) && (CSR[mcounteren].TM == 1'b1)) {
|
|
84
84
|
raise(ExceptionCode::VirtualInstruction, mode(), $encoding);
|
|
85
85
|
} else if (CSR[mcounteren].TM == 1'b0) {
|
|
86
86
|
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
|
|
@@ -11,7 +11,7 @@ address: 0x241
|
|
|
11
11
|
writable: true
|
|
12
12
|
virtual_address: 0x141
|
|
13
13
|
priv_mode: VS
|
|
14
|
-
length:
|
|
14
|
+
length: VSXLEN
|
|
15
15
|
description: |
|
|
16
16
|
Written with the PC of an instruction on an exception or interrupt taken in VS-mode.
|
|
17
17
|
|
|
@@ -21,7 +21,8 @@ definedBy:
|
|
|
21
21
|
name: H
|
|
22
22
|
fields:
|
|
23
23
|
PC:
|
|
24
|
-
|
|
24
|
+
location_rv32: 31-0
|
|
25
|
+
location_rv64: 63-0
|
|
25
26
|
description: |
|
|
26
27
|
When a trap is taken into VS-mode, `vsepc.PC` is written with the virtual address of the
|
|
27
28
|
instruction that was interrupted or that encountered the exception.
|
|
@@ -39,14 +40,14 @@ fields:
|
|
|
39
40
|
When `misa.C` is clear, bit 1 is masked to zero. Writes to bit 1 are still captured, and
|
|
40
41
|
may be visible on the next read with `misa.C` is set.
|
|
41
42
|
|
|
42
|
-
Holds bits
|
|
43
|
+
Holds bits [VSXLEN-1:<%= ext?(:C) ? 2 : 1 %>] of the virtual address associated with an exception.
|
|
43
44
|
type: RW-RH
|
|
44
45
|
sw_write(csr_value): |
|
|
45
46
|
return csr_value.PC & ~64'b1;
|
|
46
47
|
reset_value: UNDEFINED_LEGAL
|
|
47
48
|
sw_read(): |
|
|
48
49
|
if (implemented?(ExtensionName::C) && CSR[misa].C == 1'b1) {
|
|
49
|
-
return CSR[
|
|
50
|
+
return CSR[vsepc].PC & ~64'b1;
|
|
50
51
|
} else {
|
|
51
|
-
return CSR[
|
|
52
|
+
return CSR[vsepc].PC;
|
|
52
53
|
}
|
|
@@ -11,19 +11,20 @@ address: 0x205
|
|
|
11
11
|
writable: true
|
|
12
12
|
virtual_address: 0x105
|
|
13
13
|
priv_mode: VS
|
|
14
|
-
length:
|
|
14
|
+
length: VSXLEN
|
|
15
15
|
description: Controls where traps jump.
|
|
16
16
|
definedBy:
|
|
17
17
|
extension:
|
|
18
18
|
name: H
|
|
19
19
|
fields:
|
|
20
20
|
BASE:
|
|
21
|
-
|
|
21
|
+
location_rv32: 31-2
|
|
22
|
+
location_rv64: 63-2
|
|
22
23
|
description: |
|
|
23
24
|
<%- va_size = ext?(:Sv57) ? 57 : (ext?(:Sv48) ? 48 : 39) -%>
|
|
24
|
-
Bits
|
|
25
|
+
Bits [VSXLEN-1:2] of the virtual address of the exception vector for any trap taken into VS-mode.
|
|
25
26
|
|
|
26
|
-
If the base address is written with a non-canonical address (_i.e._, bits
|
|
27
|
+
If the base address is written with a non-canonical address (_i.e._, bits [VSXLEN-1:<%= va_size %>] do not match bit <%= va_size-1 %>),
|
|
27
28
|
the write should be ignored.
|
|
28
29
|
|
|
29
30
|
type: RW-R
|
|
@@ -12,6 +12,10 @@ versions:
|
|
|
12
12
|
- version: "2.0.0"
|
|
13
13
|
state: ratified
|
|
14
14
|
ratification_date: 2019-12
|
|
15
|
+
requirements:
|
|
16
|
+
extension:
|
|
17
|
+
name: Zmmul
|
|
18
|
+
version: "~> 1.0.0"
|
|
15
19
|
description: |
|
|
16
20
|
This chapter describes the standard integer multiplication and division
|
|
17
21
|
instruction extension, which is named `M` and contains instructions
|
|
@@ -26,6 +26,7 @@ requirements:
|
|
|
26
26
|
implemented?(ExtensionName::Sv39) -> SV39X4_TRANSLATION;
|
|
27
27
|
implemented?(ExtensionName::Sv48) -> SV48X4_TRANSLATION;
|
|
28
28
|
implemented?(ExtensionName::Sv57) -> SV57X4_TRANSLATION;
|
|
29
|
+
-> GSTAGE_MODE_BARE;
|
|
29
30
|
reason: |
|
|
30
31
|
Shgatpa mandates that or each supported virtual memory scheme SvNN supported in
|
|
31
32
|
`satp`, the corresponding hgatp SvNNx4 mode must be supported.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) RISC-V International
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=../../../schemas/ext_schema.json
|
|
5
|
+
|
|
6
|
+
$schema: "ext_schema.json#"
|
|
7
|
+
kind: extension
|
|
8
|
+
name: Zibi
|
|
9
|
+
long_name: Branch with Immediate
|
|
10
|
+
description: |
|
|
11
|
+
The Zibi extension adds conditional branch instructions that compare an
|
|
12
|
+
integer register with a small immediate constant.
|
|
13
|
+
|
|
14
|
+
Existing conditional branch instructions, such as `beq` and `bne`, compare two
|
|
15
|
+
integer registers. When a branch compares against a constant, software must
|
|
16
|
+
otherwise materialize that constant in an integer register before branching,
|
|
17
|
+
which can increase register pressure and potentially cause register spills and
|
|
18
|
+
reloads.
|
|
19
|
+
|
|
20
|
+
The `beqi` and `bnei` instructions use the B-type instruction format. The
|
|
21
|
+
instruction bits that would otherwise carry _rs2_ in a B-type branch carry a
|
|
22
|
+
5-bit _cimm_ field. All _cimm_ encodings are valid: the _cimm_ field is not
|
|
23
|
+
sign-extended; it decodes to an XLEN-bit comparison constant where `cimm=0`
|
|
24
|
+
encodes the value -1, and `cimm` values 1 through 31 encode the corresponding
|
|
25
|
+
positive integer values 1 through 31.
|
|
26
|
+
type: unprivileged
|
|
27
|
+
versions:
|
|
28
|
+
- version: "0.7.0"
|
|
29
|
+
state: frozen
|
|
@@ -41,5 +41,5 @@ operation(): |
|
|
|
41
41
|
|
|
42
42
|
XReg xs1_word = X[xs1][31:0];
|
|
43
43
|
|
|
44
|
-
XReg unextended_result = (
|
|
44
|
+
XReg unextended_result = (xs1_word >> shamt) | (xs1_word << (32 - shamt));
|
|
45
45
|
X[xd] = {{32{unextended_result[31]}}, unextended_result};
|
|
@@ -42,5 +42,5 @@ operation(): |
|
|
|
42
42
|
XReg xs1_word = X[xs1][31:0];
|
|
43
43
|
XReg shamt = X[xs2][4:0];
|
|
44
44
|
|
|
45
|
-
XReg unextended_result = (
|
|
45
|
+
XReg unextended_result = (xs1_word >> shamt) | (xs1_word << (32 - shamt));
|
|
46
46
|
X[xd] = {{32{unextended_result[31]}}, unextended_result};
|
|
@@ -36,4 +36,9 @@ operation(): |
|
|
|
36
36
|
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
# lowest_set_bit() reports xlen() (64 here) for a zero input, but ctzw must report 32
|
|
40
|
+
if (X[xs1][31:0] == 0) {
|
|
41
|
+
X[xd] = 32;
|
|
42
|
+
} else {
|
|
43
|
+
X[xd] = lowest_set_bit(X[xs1][31:0]);
|
|
44
|
+
}
|
|
@@ -18,7 +18,7 @@ definedBy:
|
|
|
18
18
|
allOf:
|
|
19
19
|
- name: Q
|
|
20
20
|
- name: Zfa
|
|
21
|
-
assembly:
|
|
21
|
+
assembly: xd, fs1, fs2
|
|
22
22
|
encoding:
|
|
23
23
|
match: 1010011----------101-----1010011
|
|
24
24
|
variables:
|
|
@@ -26,7 +26,7 @@ encoding:
|
|
|
26
26
|
location: 24-20
|
|
27
27
|
- name: fs1
|
|
28
28
|
location: 19-15
|
|
29
|
-
- name:
|
|
29
|
+
- name: xd
|
|
30
30
|
location: 11-7
|
|
31
31
|
access:
|
|
32
32
|
s: always
|