Skip to content

Commit d6d9b9a

Browse files
docs(D): add instruction descriptions for D extension (riscv-software-src#1079)
Added long names and descriptions for instructions under the D extension. Operational fields will be added in a separate PR, unless someone is already working on them.
1 parent 63571de commit d6d9b9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+463
-237
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 172 additions & 104 deletions
Large diffs are not rendered by default.

spec/std/isa/inst/D/fadd.d.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fadd.d
9-
long_name: Floating-point Add Double-precision
9+
long_name: Floating-Point Add Double-Precision
1010
description:
1111
- id: inst-fadd.d-behaviour
1212
normative: false
1313
text: |
14-
`fadd.d` is analogous to `fadd.s` and performs double-precision floating-point addition between
15-
`xs1` and `xs2` and writes the final result to `xd`.
14+
`FADD.D` is analogous to `FADD.S` and performs double-precision floating-point addition between
15+
_fs1_ and _fs2_ and writes the final result to _fd_.
1616
definedBy: D
1717
assembly: fd, fs1, fs2, rm
1818
encoding:

spec/std/isa/inst/D/fclass.d.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,33 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fclass.d
9-
long_name: No synopsis available
10-
description: |
11-
No description available.
9+
long_name: Floating-Point Classify Double-Precision
10+
description:
11+
- id: inst-fclass.d-behaviour
12+
normative: false
13+
text: |
14+
`FCLASS.D` is defined analogously to its single-precision counterpart, but operates on double-precision operands.
15+
It examines the value in floating-point register _fs1_ and writes to integer register _xd_ a 10-bit mask that
16+
indicates the class of the floating point number.
17+
18+
The format of the mask is described in the table below. The corresponding bit in _xd_ will be set if the property
19+
is true and clear otherwise. All other bits in _xd_ are cleared. Note that exactly one bit in xd will be set.
20+
21+
.Format of result of `fclass` instruction.
22+
[%autowidth,float="center",align="center",cols="^,<",options="header",]
23+
|===
24+
|_xd_ bit |Meaning
25+
|0 |_fs1_ is latexmath:[$-\infty$].
26+
|1 |_fs1_ is a negative normal number.
27+
|2 |_fs1_ is a negative subnormal number.
28+
|3 |_fs1_ is latexmath:[$-0$].
29+
|4 |_fs1_ is latexmath:[$+0$].
30+
|5 |_fs1_ is a positive subnormal number.
31+
|6 |_fs1_ is a positive normal number.
32+
|7 |_fs1_ is latexmath:[$+\infty$].
33+
|8 |_fs1_ is a signaling NaN.
34+
|9 |_fs1_ is a quiet NaN.
35+
|===
1236
definedBy: D
1337
assembly: xd, fs1
1438
encoding:

spec/std/isa/inst/D/fcvt.d.l.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.d.l
9-
long_name: Floating-point Convert Long to Double-precision
9+
long_name: Floating-Point Convert Long to Double-Precision
1010
description:
1111
- id: inst-fcvt.d.l-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.d.l` converts a 64-bit signed integer, in integer register `xs1` into a double-precision
15-
floating-point number in floating-point register `fd`.
14+
`FCVT.D.L` converts a 64-bit signed integer, in integer register _xs1_ into a double-precision
15+
floating-point number in floating-point register _fd_.
1616
definedBy: D
1717
assembly: fd, xs1, rm
1818
encoding:

spec/std/isa/inst/D/fcvt.d.lu.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.d.lu
9-
long_name: Floating-point Convert Unsigned Long to Double-precision
9+
long_name: Floating-Point Convert Unsigned Long to Double-Precision
1010
description:
1111
- id: inst-fcvt.d.lu-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.d.lu` converts to or from a 64-bit unsigned integer, `xs1` into a double-precision
15-
floating-point number in floating-point register `fd`.
14+
`FCVT.D.LU` converts to or from a 64-bit unsigned integer, _xs1_ into a double-precision
15+
floating-point number in floating-point register _fd_.
1616
definedBy: D
1717
assembly: fd, xs1, rm
1818
encoding:

spec/std/isa/inst/D/fcvt.d.s.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.d.s
9-
long_name: Floating-point Convert Single-precision to Double-precision
9+
long_name: Floating-Point Convert Single-Precision to Double-Precision
1010
description:
1111
- id: inst-fcvt.d.s-behaviour
1212
normative: false
1313
text: |
14-
The single-precision to double-precision conversion instruction, `fcvt.d.s` is encoded in the OP-FP
14+
The single-precision to double-precision conversion instruction, `FCVT.D.S` is encoded in the OP-FP
1515
major opcode space and both the source and destination are floating-point registers. The `xs2` field
1616
encodes the datatype of the source, and the `fmt` field encodes the datatype of the destination.
17-
`fcvt.d.s` will never round.
17+
`FCVT.D.S` will never round.
1818
definedBy: D
1919
assembly: fd, fs1, rm
2020
encoding:

spec/std/isa/inst/D/fcvt.d.w.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.d.w
9-
long_name: Floating-point Convert Word to Double-precision
9+
long_name: Floating-Point Convert Word to Double-Precision
1010
description:
1111
- id: inst-fcvt.d.w-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.d.w` converts a 32-bit signed integer, in integer register `xs1` into a double-precision
15-
floating-point number in floating-point register `fd`.
16-
Note `fcvt.d.w` always produces an exact result and is unaffected by rounding mode.
14+
`FCVT.D.W` converts a 32-bit signed integer, in integer register _xs1_ into a double-precision
15+
floating-point number in floating-point register _fd_. Note `FCVT.D.W` always produces an exact
16+
result and is unaffected by rounding mode.
1717
definedBy: D
1818
assembly: fd, xs1, rm
1919
encoding:

spec/std/isa/inst/D/fcvt.d.wu.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.d.wu
9-
long_name: Floating-point Convert Unsigned Word to Double-precision
9+
long_name: Floating-Point Convert Unsigned Word to Double-Precision
1010
description:
1111
- id: inst-fcvt.d.wu-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.d.wu` converts a 32-bit unsigned integer in integer register `fs1` into a double-precision
15-
floating-point number in floating-point register `fd`.
16-
Note `fcvt.d.wu` always produces an exact result and is unaffected by rounding mode.
14+
`FCVT.D.WU` converts a 32-bit unsigned integer in integer register _xs1_ into a double-precision
15+
floating-point number in floating-point register _fd_. Note `FCVT.D.WU` always produces an exact
16+
result and is unaffected by rounding mode.
1717
definedBy: D
1818
assembly: fd, xs1, rm
1919
encoding:

spec/std/isa/inst/D/fcvt.l.d.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.l.d
9-
long_name: Floating-point Convert Double-precision to Long
9+
long_name: Floating-Point Convert Double-Precision to Long
1010
description:
1111
- id: inst-fcvt.l.d-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.l.d` converts a double-precision floating-point number in floating-point register `fs1`
15-
to a signed 64-bit integer, in integer register `xd`.
14+
`FCVT.L.D` converts a double-precision floating-point number in floating-point register _fs1_
15+
to a signed 64-bit integer, in integer register _xd_.
1616
definedBy: D
1717
assembly: xd, fs1, rm
1818
encoding:

spec/std/isa/inst/D/fcvt.lu.d.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
$schema: inst_schema.json#
77
kind: instruction
88
name: fcvt.lu.d
9-
long_name: Floating-point Convert Double-precision to Unsigned Long
9+
long_name: Floating-Point Convert Double-Precision to Unsigned Long
1010
description:
1111
- id: inst-fcvt.lu.d-behaviour
1212
normative: false
1313
text: |
14-
`fcvt.lu.d` converts a double-precision floating-point number in floating-point register `xs1`
15-
to an unsigned 64-bit integer, in integer register `xd`.
14+
`FCVT.LU.D` converts a double-precision floating-point number in floating-point register _fs1_
15+
to an unsigned 64-bit integer, in integer register _xd_.
1616
definedBy: D
1717
assembly: xd, fs1, rm
1818
encoding:

0 commit comments

Comments
 (0)