Skip to content

Commit 6c4f88a

Browse files
author
Nelson Chu
committed
gas/doc/riscv: Fixed misaligned instruction table
gas/ * doc/c-riscv.texi: Fixed misaligned instruction table.
1 parent 004a5bf commit 6c4f88a

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

gas/doc/c-riscv.texi

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -556,45 +556,45 @@ with the @samp{.insn} pseudo directive:
556556
@table @code
557557
@item R type: .insn r opcode7, funct3, funct7, rd, rs1, rs2
558558
@verbatim
559-
+-------+-----+-----+-------+----+---------+
559+
+--------+-----+-----+--------+----+---------+
560560
| funct7 | rs2 | rs1 | funct3 | rd | opcode7 |
561-
+-------+-----+-----+-------+----+---------+
562-
31 25 20 15 12 7 0
561+
+--------+-----+-----+--------+----+---------+
562+
31 25 20 15 12 7 0
563563
@end verbatim
564564

565565
@item R type with 4 register operands: .insn r opcode7, funct3, funct2, rd, rs1, rs2, rs3
566566
@itemx R4 type: .insn r4 opcode7, funct3, funct2, rd, rs1, rs2, rs3
567567
@verbatim
568-
+-----+-------+-----+-----+-------+----+---------+
568+
+-----+--------+-----+-----+--------+----+---------+
569569
| rs3 | funct2 | rs2 | rs1 | funct3 | rd | opcode7 |
570-
+-----+-------+-----+-----+-------+----+---------+
571-
31 27 25 20 15 12 7 0
570+
+-----+--------+-----+-----+--------+----+---------+
571+
31 27 25 20 15 12 7 0
572572
@end verbatim
573573

574574
@item I type: .insn i opcode7, funct3, rd, rs1, simm12
575575
@itemx I type: .insn i opcode7, funct3, rd, simm12(rs1)
576576
@verbatim
577-
+--------------+-----+-------+----+---------+
577+
+--------------+-----+--------+----+---------+
578578
| simm12[11:0] | rs1 | funct3 | rd | opcode7 |
579-
+--------------+-----+-------+----+---------+
580-
31 20 15 12 7 0
579+
+--------------+-----+--------+----+---------+
580+
31 20 15 12 7 0
581581
@end verbatim
582582

583583
@item S type: .insn s opcode7, funct3, rs2, simm12(rs1)
584584
@verbatim
585-
+--------------+-----+-----+-------+-------------+---------+
585+
+--------------+-----+-----+--------+-------------+---------+
586586
| simm12[11:5] | rs2 | rs1 | funct3 | simm12[4:0] | opcode7 |
587-
+--------------+-----+-----+-------+-------------+---------+
588-
31 25 20 15 12 7 0
587+
+--------------+-----+-----+--------+-------------+---------+
588+
31 25 20 15 12 7 0
589589
@end verbatim
590590

591591
@item B type: .insn s opcode7, funct3, rs1, rs2, symbol
592592
@itemx SB type: .insn sb opcode7, funct3, rs1, rs2, symbol
593593
@verbatim
594-
+-----------------+-----+-----+-------+----------------+---------+
594+
+-----------------+-----+-----+--------+----------------+---------+
595595
| simm12[12|10:5] | rs2 | rs1 | funct3 | simm12[4:1|11] | opcode7 |
596-
+-----------------+-----+-----+-------+----------------+---------+
597-
31 25 20 15 12 7 0
596+
+-----------------+-----+-----+--------+----------------+---------+
597+
31 25 20 15 12 7 0
598598
@end verbatim
599599

600600
@item U type: .insn u opcode7, rd, simm20
@@ -616,74 +616,74 @@ with the @samp{.insn} pseudo directive:
616616

617617
@item CR type: .insn cr opcode2, funct4, rd, rs2
618618
@verbatim
619-
+-------+--------+-----+---------+
619+
+--------+--------+-----+---------+
620620
| funct4 | rd/rs1 | rs2 | opcode2 |
621-
+-------+--------+-----+---------+
622-
15 12 7 2 0
621+
+--------+--------+-----+---------+
622+
15 12 7 2 0
623623
@end verbatim
624624

625625
@item CI type: .insn ci opcode2, funct3, rd, simm6
626626
@verbatim
627-
+-------+----------+--------+------------+---------+
627+
+--------+----------+--------+------------+---------+
628628
| funct3 | simm6[5] | rd/rs1 | simm6[4:0] | opcode2 |
629-
+-------+----------+--------+------------+---------+
630-
15 13 12 7 2 0
629+
+--------+----------+--------+------------+---------+
630+
15 13 12 7 2 0
631631
@end verbatim
632632

633633
@item CIW type: .insn ciw opcode2, funct3, rd', uimm8
634634
@verbatim
635-
+-------+------------+-----+---------+
635+
+--------+------------+-----+---------+
636636
| funct3 | uimm8[7:0] | rd' | opcode2 |
637-
+-------+-------- ---+-----+---------+
638-
15 13 5 2 0
637+
+--------+-------- ---+-----+---------+
638+
15 13 5 2 0
639639
@end verbatim
640640

641641
@item CSS type: .insn css opcode2, funct3, rd, uimm6
642642
@verbatim
643-
+-------+------------+----+---------+
643+
+--------+------------+----+---------+
644644
| funct3 | uimm6[5:0] | rd | opcode2 |
645-
+-------+------------+----+---------+
646-
15 13 7 2 0
645+
+--------+------------+----+---------+
646+
15 13 7 2 0
647647
@end verbatim
648648

649649
@item CL type: .insn cl opcode2, funct3, rd', uimm5(rs1')
650650
@verbatim
651-
+-------+------------+------+------------+------+---------+
651+
+--------+------------+------+------------+------+---------+
652652
| funct3 | uimm5[4:2] | rs1' | uimm5[1:0] | rd' | opcode2 |
653-
+-------+------------+------+------------+------+---------+
654-
15 13 10 7 5 2 0
653+
+--------+------------+------+------------+------+---------+
654+
15 13 10 7 5 2 0
655655
@end verbatim
656656

657657
@item CS type: .insn cs opcode2, funct3, rs2', uimm5(rs1')
658658
@verbatim
659-
+-------+------------+------+------------+------+---------+
659+
+--------+------------+------+------------+------+---------+
660660
| funct3 | uimm5[4:2] | rs1' | uimm5[1:0] | rs2' | opcode2 |
661-
+-------+------------+------+------------+------+---------+
662-
15 13 10 7 5 2 0
661+
+--------+------------+------+------------+------+---------+
662+
15 13 10 7 5 2 0
663663
@end verbatim
664664

665665
@item CA type: .insn ca opcode2, funct6, funct2, rd', rs2'
666666
@verbatim
667-
+-- ----+----------+-------+------+---------+
667+
+--------+----------+--------+------+---------+
668668
| funct6 | rd'/rs1' | funct2 | rs2' | opcode2 |
669-
+-------+----------+-------+------+---------+
670-
15 10 7 5 2 0
669+
+--------+----------+--------+------+---------+
670+
15 10 7 5 2 0
671671
@end verbatim
672672

673673
@item CB type: .insn cb opcode2, funct3, rs1', symbol
674674
@verbatim
675-
+-------+--------------+------+------------------+---------+
675+
+--------+--------------+------+------------------+---------+
676676
| funct3 | simm8[8|4:3] | rs1' | simm8[7:6|2:1|5] | opcode2 |
677-
+-------+--------------+------+------------------+---------+
678-
15 13 10 7 2 0
677+
+--------+--------------+------+------------------+---------+
678+
15 13 10 7 2 0
679679
@end verbatim
680680

681681
@item CJ type: .insn cj opcode2, funct3, symbol
682682
@verbatim
683-
+-------+-------------------------------+---------+
683+
+--------+-------------------------------+---------+
684684
| funct3 | simm11[11|4|9:8|10|6|7|3:1|5] | opcode2 |
685-
+-------+-------------------------------+---------+
686-
15 13 2 0
685+
+--------+-------------------------------+---------+
686+
15 13 2 0
687687
@end verbatim
688688

689689

0 commit comments

Comments
 (0)