File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ reset__find_lookup_start:
6363#% call print_str()
6464 #{- 'pc =\\n'
6565 #{- 'op =\\n'
66+ #{- 'rs1 =\\n'
67+ #{- 'rs2 =\\n'
6668 #{- 'imm =\\n'
6769 #{- 'rs1id =\\n'
68- #{- 'rs1 =\\n'
6970 #{- 'rs2id =\\n'
70- #{- 'rs2 =\\n'
7171 #{- 'rdid =\\n\\n'
7272
7373 #{- 'satp =\\n'
@@ -784,35 +784,37 @@ format_op_id__priv__ok:
784784 format name
785785 jump format_op_id__I-type always
786786
787- #% macro format_conditional(cond, n )
787+ #% macro format_conditional(cond)
788788#% if cond
789789#{ caller()
790790#% else
791- #% for _ in range(n)
792791 format ""
793- #% endfor
794792#% endif
795793#% endmacro
796794
797795#% macro format_op_args(imm, rs1, rs2, rd)
798- #% call format_conditional(imm, 1 )
799- set n imm
796+ #% call format_conditional(rs1 )
797+ read n {{REGISTERS}} rs1_id
800798 op add ret @counter 1
801799 jump format_hex always
802800#% endcall
803- #% call format_conditional(rs1, 2)
804- format rs1_id
805- read n {{REGISTERS}} rs1_id
801+ #% call format_conditional(rs2)
802+ read n {{REGISTERS}} rs2_id
806803 op add ret @counter 1
807804 jump format_hex always
808805#% endcall
809- #% call format_conditional(rs2, 2)
810- format rs2_id
811- read n {{REGISTERS}} rs2_id
806+ #% call format_conditional(imm)
807+ set n imm
812808 op add ret @counter 1
813809 jump format_hex always
814810#% endcall
815- #% call format_conditional(rd, 1)
811+ #% call format_conditional(rs1)
812+ format rs1_id
813+ #% endcall
814+ #% call format_conditional(rs2)
815+ format rs2_id
816+ #% endcall
817+ #% call format_conditional(rd)
816818 format rd_id
817819#% endcall
818820#% endmacro
You can’t perform that action at this time.
0 commit comments