1 @c Copyright (C) 2016-2023 Free Software Foundation, Inc.
2 @c This is part of the GAS anual.
3 @c For copying conditions, see the file as.texinfo
9 @chapter RISC-V Dependent Features
12 @node Machine Dependencies
13 @chapter RISC-V Dependent Features
16 @cindex RISC-V support
18 * RISC-V-Options:: RISC-V Options
19 * RISC-V-Directives:: RISC-V Directives
20 * RISC-V-Modifiers:: RISC-V Assembler Modifiers
21 * RISC-V-Formats:: RISC-V Instruction Formats
22 * RISC-V-ATTRIBUTE:: RISC-V Object Attribute
23 * RISC-V-CustomExts:: RISC-V Custom (Vendor-Defined) Extensions
27 @section RISC-V Options
29 The following table lists all available RISC-V specific options.
34 @cindex @samp{-fpic} option, RISC-V
37 Generate position-independent code
39 @cindex @samp{-fno-pic} option, RISC-V
41 Don't generate position-independent code (default)
43 @cindex @samp{-march=ISA} option, RISC-V
45 Select the base isa, as specified by ISA. For example -march=rv32ima.
46 If this option and the architecture attributes aren't set, then assembler
47 will check the default configure setting --with-arch=ISA.
49 @cindex @samp{-misa-spec=ISAspec} option, RISC-V
50 @item -misa-spec=ISAspec
51 Select the default isa spec version. If the version of ISA isn't set
52 by -march, then assembler helps to set the version according to
53 the default chosen spec. If this option isn't set, then assembler will
54 check the default configure setting --with-isa-spec=ISAspec.
56 @cindex @samp{-mpriv-spec=PRIVspec} option, RISC-V
57 @item -mpriv-spec=PRIVspec
58 Select the privileged spec version. We can decide whether the CSR is valid or
59 not according to the chosen spec. If this option and the privilege attributes
60 aren't set, then assembler will check the default configure setting
61 --with-priv-spec=PRIVspec.
63 @cindex @samp{-mabi=ABI} option, RISC-V
65 Selects the ABI, which is either "ilp32" or "lp64", optionally followed
66 by "f", "d", or "q" to indicate single-precision, double-precision, or
67 quad-precision floating-point calling convention, or none to indicate
68 the soft-float calling convention. Also, "ilp32" can optionally be followed
69 by "e" to indicate the RVE ABI, which is always soft-float.
71 @cindex @samp{-mrelax} option, RISC-V
73 Take advantage of linker relaxations to reduce the number of instructions
74 required to materialize symbol addresses. (default)
76 @cindex @samp{-mno-relax} option, RISC-V
78 Don't do linker relaxations.
80 @cindex @samp{-march-attr} option, RISC-V
82 Generate the default contents for the riscv elf attribute section if the
83 .attribute directives are not set. This section is used to record the
84 information that a linker or runtime loader needs to check compatibility.
85 This information includes ISA string, stack alignment requirement, unaligned
86 memory accesses, and the major, minor and revision version of privileged
89 @cindex @samp{-mno-arch-attr} option, RISC-V
91 Don't generate the default riscv elf attribute section if the .attribute
92 directives are not set.
94 @cindex @samp{-mcsr-check} option, RISC-V
96 Enable the CSR checking for the ISA-dependent CRS and the read-only CSR.
97 The ISA-dependent CSR are only valid when the specific ISA is set. The
98 read-only CSR can not be written by the CSR instructions.
100 @cindex @samp{-mno-csr-check} option, RISC-V
102 Don't do CSR checking.
104 @cindex @samp{-mlittle-endian} option, RISC-V
105 @item -mlittle-endian
106 Generate code for a little endian machine.
108 @cindex @samp{-mbig-endian} option, RISC-V
110 Generate code for a big endian machine.
114 @node RISC-V-Directives
115 @section RISC-V Directives
116 @cindex machine directives, RISC-V
117 @cindex RISC-V machine directives
119 The following table lists all available RISC-V specific directives.
123 @cindex @code{align} directive
124 @item .align @var{size-log-2}
125 Align to the given boundary, with the size given as log2 the number of bytes to
128 @cindex Data directives
129 @item .half @var{value}
130 @itemx .word @var{value}
131 @itemx .dword @var{value}
132 Emits a half-word, word, or double-word value at the current position.
134 @cindex DTP-relative data directives
135 @item .dtprelword @var{value}
136 @itemx .dtpreldword @var{value}
137 Emits a DTP-relative word (or double-word) at the current position. This is
138 meant to be used by the compiler in shared libraries for DWARF debug info for
139 thread local variables.
141 @cindex BSS directive
143 Sets the current section to the BSS section.
145 @cindex LEB128 directives
146 @item .uleb128 @var{value}
147 @itemx .sleb128 @var{value}
148 Emits a signed or unsigned LEB128 value at the current position. This only
149 accepts constant expressions, because symbol addresses can change with
150 relaxation, and we don't support relocations to modify LEB128 values at link
153 @cindex Option directive
154 @cindex @code{option} directive
155 @item .option @var{argument}
156 Modifies RISC-V specific assembler options inline with the assembly code.
157 This is used when particular instruction sequences must be assembled with a
158 specific set of options. For example, since we relax addressing sequences to
159 shorter GP-relative sequences when possible the initial load of GP must not be
160 relaxed and should be emitted as something like
165 la gp, __global_pointer$
169 in order to produce after linker relaxation the expected
172 auipc gp, %pcrel_hi(__global_pointer$)
173 addi gp, gp, %pcrel_lo(__global_pointer$)
182 It's not expected that options are changed in this manner during regular use,
183 but there are a handful of esoteric cases like the one above where users need
184 to disable particular features of the assembler for particular code sequences.
185 The complete list of option arguments is shown below:
190 Pushes or pops the current option stack. These should be used whenever
191 changing an option in line with assembly code in order to ensure the user's
192 command-line options are respected for the bulk of the file being assembled.
196 Enables or disables the generation of compressed instructions. Instructions
197 are opportunistically compressed by the RISC-V assembler when possible, but
198 sometimes this behavior is not desirable, especially when handling alignments.
202 Enables or disables position-independent code generation. Unless you really
203 know what you're doing, this should only be at the top of a file.
207 Enables or disables relaxation. The RISC-V assembler and linker
208 opportunistically relax some code sequences, but sometimes this behavior is not
213 Enables or disables the CSR checking.
215 @item arch, @var{+extension[version]} [,...,@var{+extension_n[version_n]}]
216 @itemx arch, @var{-extension} [,...,@var{-extension_n}]
217 @itemx arch, @var{=ISA}
218 Enables or disables the extensions for specific code region. For example,
219 @samp{.option arch, +m2p0} means add m extension with version 2.0, and
220 @samp{.option arch, -f, -d} means remove extensions, f and d, from the
221 architecture string. Note that, @samp{.option arch, +c, -c} have the same
222 behavior as @samp{.option rvc, norvc}. However, they are also undesirable
223 sometimes. Besides, @samp{.option arch, -i} is illegal, since we cannot
224 remove the base i extension anytime. If you want to reset the whole ISA
225 string, you can also use @samp{.option arch, =rv32imac} to overwrite the
229 @cindex INSN directives
230 @item .insn @var{type}, @var{operand} [,...,@var{operand_n}]
231 @itemx .insn @var{insn_length}, @var{value}
232 @itemx .insn @var{value}
233 This directive permits the numeric representation of an instructions
234 and makes the assembler insert the operands according to one of the
235 instruction formats for @samp{.insn} (@ref{RISC-V-Formats}).
236 For example, the instruction @samp{add a0, a1, a2} could be written as
237 @samp{.insn r 0x33, 0, 0, a0, a1, a2}. But in fact, the instruction
238 formats are difficult to use for some users, so most of them are using
239 @samp{.word} to encode the instruction directly, rather than using
240 @samp{.insn}. It is fine for now, but will be wrong when the mapping
241 symbols are supported, since @samp{.word} will not be shown as an
242 instruction, it should be shown as data. Therefore, we also support
243 two more formats of the @samp{.insn}, the instruction @samp{add a0, a1, a2}
244 could also be written as @samp{.insn 0x4, 0xc58533} or @samp{.insn 0xc58533}.
245 When the @var{insn_length} is set, then assembler will check if the
246 @var{value} is a valid @var{insn_length} bytes instruction.
248 @cindex @code{.attribute} directive, RISC-V
249 @item .attribute @var{tag}, @var{value}
250 Set the object attribute @var{tag} to @var{value}.
252 The @var{tag} is either an attribute number, or one of the following:
253 @code{Tag_RISCV_arch}, @code{Tag_RISCV_stack_align},
254 @code{Tag_RISCV_unaligned_access}, @code{Tag_RISCV_priv_spec},
255 @code{Tag_RISCV_priv_spec_minor}, @code{Tag_RISCV_priv_spec_revision}.
259 @node RISC-V-Modifiers
260 @section RISC-V Assembler Modifiers
262 The RISC-V assembler supports following modifiers for relocatable addresses
263 used in RISC-V instruction operands. However, we also support some pseudo
264 instructions that are easier to use than these modifiers.
267 @item %lo(@var{symbol})
268 The low 12 bits of absolute address for @var{symbol}.
270 @item %hi(@var{symbol})
271 The high 20 bits of absolute address for @var{symbol}. This is usually
272 used with the %lo modifier to represent a 32-bit absolute address.
275 lui a0, %hi(@var{symbol}) // R_RISCV_HI20
276 addi a0, a0, %lo(@var{symbol}) // R_RISCV_LO12_I
278 lui a0, %hi(@var{symbol}) // R_RISCV_HI20
279 load/store a0, %lo(@var{symbol})(a0) // R_RISCV_LO12_I/S
282 @item %pcrel_lo(@var{label})
283 The low 12 bits of relative address between pc and @var{symbol}.
284 The @var{symbol} is related to the high part instruction which is marked
287 @item %pcrel_hi(@var{symbol})
288 The high 20 bits of relative address between pc and @var{symbol}.
289 This is usually used with the %pcrel_lo modifier to represent a +/-2GB
294 auipc a0, %pcrel_hi(@var{symbol}) // R_RISCV_PCREL_HI20
295 addi a0, a0, %pcrel_lo(@var{label}) // R_RISCV_PCREL_LO12_I
298 auipc a0, %pcrel_hi(@var{symbol}) // R_RISCV_PCREL_HI20
299 load/store a0, %pcrel_lo(@var{label})(a0) // R_RISCV_PCREL_LO12_I/S
302 Or you can use the pseudo lla/lw/sw/... instruction to do this.
308 @item %got_pcrel_hi(@var{symbol})
309 The high 20 bits of relative address between pc and the GOT entry of
310 @var{symbol}. This is usually used with the %pcrel_lo modifier to access
315 auipc a0, %got_pcrel_hi(@var{symbol}) // R_RISCV_GOT_HI20
316 addi a0, a0, %pcrel_lo(@var{label}) // R_RISCV_PCREL_LO12_I
319 auipc a0, %got_pcrel_hi(@var{symbol}) // R_RISCV_GOT_HI20
320 load/store a0, %pcrel_lo(@var{label})(a0) // R_RISCV_PCREL_LO12_I/S
323 Also, the pseudo la instruction with PIC has similar behavior.
325 @item %tprel_add(@var{symbol})
326 This is used purely to associate the R_RISCV_TPREL_ADD relocation for
327 TLS relaxation. This one is only valid as the fourth operand to the normally
328 3 operand add instruction.
330 @item %tprel_lo(@var{symbol})
331 The low 12 bits of relative address between tp and @var{symbol}.
333 @item %tprel_hi(@var{symbol})
334 The high 20 bits of relative address between tp and @var{symbol}. This is
335 usually used with the %tprel_lo and %tprel_add modifiers to access the thread
336 local variable @var{symbol} in TLS Local Exec.
339 lui a5, %tprel_hi(@var{symbol}) // R_RISCV_TPREL_HI20
340 add a5, a5, tp, %tprel_add(@var{symbol}) // R_RISCV_TPREL_ADD
341 load/store t0, %tprel_lo(@var{symbol})(a5) // R_RISCV_TPREL_LO12_I/S
344 @item %tls_ie_pcrel_hi(@var{symbol})
345 The high 20 bits of relative address between pc and GOT entry. It is
346 usually used with the %pcrel_lo modifier to access the thread local
347 variable @var{symbol} in TLS Initial Exec.
350 la.tls.ie a5, @var{symbol}
355 The pseudo la.tls.ie instruction can be expended to
359 auipc a5, %tls_ie_pcrel_hi(@var{symbol}) // R_RISCV_TLS_GOT_HI20
360 load a5, %pcrel_lo(@var{label})(a5) // R_RISCV_PCREL_LO12_I
363 @item %tls_gd_pcrel_hi(@var{symbol})
364 The high 20 bits of relative address between pc and GOT entry. It is
365 usually used with the %pcrel_lo modifier to access the thread local variable
366 @var{symbol} in TLS Global Dynamic.
369 la.tls.gd a0, @var{symbol}
370 call __tls_get_addr@@plt
375 The pseudo la.tls.gd instruction can be expended to
379 auipc a0, %tls_gd_pcrel_hi(@var{symbol}) // R_RISCV_TLS_GD_HI20
380 addi a0, a0, %pcrel_lo(@var{label}) // R_RISCV_PCREL_LO12_I
386 @section RISC-V Instruction Formats
387 @cindex instruction formats, risc-v
388 @cindex RISC-V instruction formats
390 The RISC-V Instruction Set Manual Volume I: User-Level ISA lists 15
391 instruction formats where some of the formats have multiple variants.
392 For the @samp{.insn} pseudo directive the assembler recognizes some
394 Typically, the most general variant of the instruction format is used
395 by the @samp{.insn} directive.
397 The following table lists the abbreviations used in the table of
401 @multitable @columnfractions .15 .40
402 @item opcode @tab Unsigned immediate or opcode name for 7-bits opcode.
403 @item opcode2 @tab Unsigned immediate or opcode name for 2-bits opcode.
404 @item func7 @tab Unsigned immediate for 7-bits function code.
405 @item func6 @tab Unsigned immediate for 6-bits function code.
406 @item func4 @tab Unsigned immediate for 4-bits function code.
407 @item func3 @tab Unsigned immediate for 3-bits function code.
408 @item func2 @tab Unsigned immediate for 2-bits function code.
409 @item rd @tab Destination register number for operand x, can be GPR or FPR.
410 @item rd' @tab Destination register number for operand x,
411 only accept s0-s1, a0-a5, fs0-fs1 and fa0-fa5.
412 @item rs1 @tab First source register number for operand x, can be GPR or FPR.
413 @item rs1' @tab First source register number for operand x,
414 only accept s0-s1, a0-a5, fs0-fs1 and fa0-fa5.
415 @item rs2 @tab Second source register number for operand x, can be GPR or FPR.
416 @item rs2' @tab Second source register number for operand x,
417 only accept s0-s1, a0-a5, fs0-fs1 and fa0-fa5.
418 @item simm12 @tab Sign-extended 12-bit immediate for operand x.
419 @item simm20 @tab Sign-extended 20-bit immediate for operand x.
420 @item simm6 @tab Sign-extended 6-bit immediate for operand x.
421 @item uimm5 @tab Unsigned 5-bit immediate for operand x.
422 @item uimm6 @tab Unsigned 6-bit immediate for operand x.
423 @item uimm8 @tab Unsigned 8-bit immediate for operand x.
424 @item symbol @tab Symbol or lable reference for operand x.
428 The following table lists all available opcode name:
434 Opcode space for compressed instructions.
437 Opcode space for load instructions.
440 Opcode space for floating-point load instructions.
443 Opcode space for store instructions.
446 Opcode space for floating-point store instructions.
449 Opcode space for auipc instruction.
452 Opcode space for lui instruction.
455 Opcode space for branch instructions.
458 Opcode space for jal instruction.
461 Opcode space for jalr instruction.
464 Opcode space for ALU instructions.
467 Opcode space for 32-bits ALU instructions.
470 Opcode space for ALU with immediate instructions.
473 Opcode space for 32-bits ALU with immediate instructions.
476 Opcode space for floating-point operation instructions.
479 Opcode space for madd instruction.
482 Opcode space for msub instruction.
485 Opcode space for nmadd instruction.
488 Opcode space for msub instruction.
491 Opcode space for atomic memory operation instructions.
494 Opcode space for misc instructions.
497 Opcode space for system instructions.
503 Opcode space for customize instructions.
507 An instruction is two or four bytes in length and must be aligned
508 on a 2 byte boundary. The first two bits of the instruction specify the
509 length of the instruction, 00, 01 and 10 indicates a two byte instruction,
510 11 indicates a four byte instruction.
512 The following table lists the RISC-V instruction formats that are available
513 with the @samp{.insn} pseudo directive:
516 @item R type: .insn r opcode6, func3, func7, rd, rs1, rs2
518 +-------+-----+-----+-------+----+---------+
519 | func7 | rs2 | rs1 | func3 | rd | opcode6 |
520 +-------+-----+-----+-------+----+---------+
524 @item R type with 4 register operands: .insn r opcode6, func3, func2, rd, rs1, rs2, rs3
525 @itemx R4 type: .insn r4 opcode6, func3, func2, rd, rs1, rs2, rs3
527 +-----+-------+-----+-----+-------+----+---------+
528 | rs3 | func2 | rs2 | rs1 | func3 | rd | opcode6 |
529 +-----+-------+-----+-----+-------+----+---------+
530 31 27 25 20 15 12 7 0
533 @item I type: .insn i opcode6, func3, rd, rs1, simm12
534 @itemx I type: .insn i opcode6, func3, rd, simm12(rs1)
536 +--------------+-----+-------+----+---------+
537 | simm12[11:0] | rs1 | func3 | rd | opcode6 |
538 +--------------+-----+-------+----+---------+
542 @item S type: .insn s opcode6, func3, rs2, simm12(rs1)
544 +--------------+-----+-----+-------+-------------+---------+
545 | simm12[11:5] | rs2 | rs1 | func3 | simm12[4:0] | opcode6 |
546 +--------------+-----+-----+-------+-------------+---------+
550 @item B type: .insn s opcode6, func3, rs1, rs2, symbol
551 @itemx SB type: .insn sb opcode6, func3, rs1, rs2, symbol
553 +-----------------+-----+-----+-------+----------------+---------+
554 | simm12[12|10:5] | rs2 | rs1 | func3 | simm12[4:1|11] | opcode6 |
555 +-----------------+-----+-----+-------+----------------+---------+
559 @item U type: .insn u opcode6, rd, simm20
561 +--------------------------+----+---------+
562 | simm20[20|10:1|11|19:12] | rd | opcode6 |
563 +--------------------------+----+---------+
567 @item J type: .insn j opcode6, rd, symbol
568 @itemx UJ type: .insn uj opcode6, rd, symbol
570 +------------+--------------+------------+---------------+----+---------+
571 | simm20[20] | simm20[10:1] | simm20[11] | simm20[19:12] | rd | opcode6 |
572 +------------+--------------+------------+---------------+----+---------+
576 @item CR type: .insn cr opcode2, func4, rd, rs2
578 +-------+--------+-----+---------+
579 | func4 | rd/rs1 | rs2 | opcode2 |
580 +-------+--------+-----+---------+
584 @item CI type: .insn ci opcode2, func3, rd, simm6
586 +-------+----------+--------+------------+---------+
587 | func3 | simm6[5] | rd/rs1 | simm6[4:0] | opcode2 |
588 +-------+----------+--------+------------+---------+
592 @item CIW type: .insn ciw opcode2, func3, rd', uimm8
594 +-------+------------+-----+---------+
595 | func3 | uimm8[7:0] | rd' | opcode2 |
596 +-------+-------- ---+-----+---------+
600 @item CSS type: .insn css opcode2, func3, rd, uimm6
602 +-------+------------+----+---------+
603 | func3 | uimm6[5:0] | rd | opcode2 |
604 +-------+------------+----+---------+
608 @item CL type: .insn cl opcode2, func3, rd', uimm5(rs1')
610 +-------+------------+------+------------+------+---------+
611 | func3 | uimm5[4:2] | rs1' | uimm5[1:0] | rd' | opcode2 |
612 +-------+------------+------+------------+------+---------+
616 @item CS type: .insn cs opcode2, func3, rs2', uimm5(rs1')
618 +-------+------------+------+------------+------+---------+
619 | func3 | uimm5[4:2] | rs1' | uimm5[1:0] | rs2' | opcode2 |
620 +-------+------------+------+------------+------+---------+
624 @item CA type: .insn ca opcode2, func6, func2, rd', rs2'
626 +-- ----+----------+-------+------+---------+
627 | func6 | rd'/rs1' | func2 | rs2' | opcode2 |
628 +-------+----------+-------+------+---------+
632 @item CB type: .insn cb opcode2, func3, rs1', symbol
634 +-------+--------------+------+------------------+---------+
635 | func3 | simm8[8|4:3] | rs1' | simm8[7:6|2:1|5] | opcode2 |
636 +-------+--------------+------+------------------+---------+
640 @item CJ type: .insn cj opcode2, symbol
642 +-------+-------------------------------+---------+
643 | func3 | simm11[11|4|9:8|10|6|7|3:1|5] | opcode2 |
644 +-------+-------------------------------+---------+
651 For the complete list of all instruction format variants see
652 The RISC-V Instruction Set Manual Volume I: User-Level ISA.
654 @node RISC-V-ATTRIBUTE
655 @section RISC-V Object Attribute
656 @cindex Object Attribute, RISC-V
658 RISC-V attributes have a string value if the tag number is odd and an integer
659 value if the tag number is even.
662 @item Tag_RISCV_stack_align (4)
663 Tag_RISCV_strict_align records the N-byte stack alignment for this object. The
664 default value is 16 for RV32I or RV64I, and 4 for RV32E.
666 The smallest value will be used if object files with different
667 Tag_RISCV_stack_align values are merged.
669 @item Tag_RISCV_arch (5)
670 Tag_RISCV_arch contains a string for the target architecture taken from the
671 option @option{-march}. Different architectures will be integrated into a
672 superset when object files are merged.
674 Note that the version information of the target architecture must be presented
675 explicitly in the attribute and abbreviations must be expanded. The version
676 information, if not given by @option{-march}, must be in accordance with the
677 default specified by the tool. For example, the architecture @code{RV32I} has
678 to be recorded in the attribute as @code{RV32I2P0} in which @code{2P0} stands
679 for the default version of its base ISA. On the other hand, the architecture
680 @code{RV32G} has to be presented as @code{RV32I2P0_M2P0_A2P0_F2P0_D2P0} in
681 which the abbreviation @code{G} is expanded to the @code{IMAFD} combination
682 with default versions of the standard extensions.
684 @item Tag_RISCV_unaligned_access (6)
685 Tag_RISCV_unaligned_access is 0 for files that do not allow any unaligned
686 memory accesses, and 1 for files that do allow unaligned memory accesses.
688 @item Tag_RISCV_priv_spec (8)
689 @item Tag_RISCV_priv_spec_minor (10)
690 @item Tag_RISCV_priv_spec_revision (12)
691 Tag_RISCV_priv_spec contains the major/minor/revision version information of
692 the privileged specification. It will report errors if object files of
693 different privileged specification versions are merged.
697 @node RISC-V-CustomExts
698 @section RISC-V Custom (Vendor-Defined) Extensions
699 @cindex custom (vendor-defined) extensions, RISC-V
700 @cindex RISC-V custom (vendor-defined) extensions
702 The following table lists the custom (vendor-defined) RISC-V
703 extensions supported and provides the location of their
704 publicly-released documentation:
708 The XTheadBa extension provides instructions for address calculations.
710 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
713 The XTheadBb extension provides instructions for basic bit-manipulation
715 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
718 The XTheadBs extension provides single-bit instructions.
720 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
723 The XTheadCmo extension provides instructions for cache management.
725 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
728 The XTheadCondMov extension provides instructions for conditional moves.
730 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
733 The XTheadFMemIdx extension provides floating-point memory operations.
735 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
738 The XTheadFmv extension provides access to the upper 32 bits of a doulbe-precision floating point register.
740 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.1.0/xthead-2022-11-07-2.1.0.pdf}.
743 The XTheadInt extension provides access to ISR stack management instructions.
745 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.1.0/xthead-2022-11-07-2.1.0.pdf}.
748 The XTheadMac extension provides multiply-accumulate instructions.
750 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
753 The XTheadMemIdx extension provides GPR memory operations.
755 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
758 The XTheadMemPair extension provides two-GP-register memory operations.
760 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.
763 The XTheadSync extension provides instructions for multi-processor synchronization.
765 It is documented in @url{https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0.0/xthead-2022-09-05-2.0.0.pdf}.