Skip to content

Commit 6ca27c9

Browse files
committed
Fix missing Assembly section for instructions with no variables
Remove conditional check that hides Assembly section when assembly field is empty. Now instructions like fence.i will properly show "Assembly:: fence.i" in the instruction appendix instead of omitting the section entirely. Co-authored-by: Afonso Oliveira <[email protected]> Co-authored-by: Paul A. Clarke <[email protected]> Signed-off-by: Paul A. Clarke <[email protected]>
1 parent e4e85ce commit 6ca27c9

File tree

2 files changed

+52
-3
lines changed

2 files changed

+52
-3
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3744,6 +3744,9 @@ Included in::
37443744
Synopsis::
37453745
Breakpoint exception
37463746

3747+
Assembly::
3748+
c.ebreak
3749+
37473750
Encoding::
37483751
[wavedrom, ,svg,subs='attributes',width="100%"]
37493752
....
@@ -4678,6 +4681,9 @@ Included in::
46784681
Synopsis::
46794682
Compressed May-Be-Operation
46804683

4684+
Assembly::
4685+
c.mop.n
4686+
46814687
Encoding::
46824688
[wavedrom, ,svg,subs='attributes',width="100%"]
46834689
....
@@ -4789,6 +4795,9 @@ Included in::
47894795
Synopsis::
47904796
Non-operation
47914797

4798+
Assembly::
4799+
c.nop
4800+
47924801
Encoding::
47934802
[wavedrom, ,svg,subs='attributes',width="100%"]
47944803
....
@@ -7146,6 +7155,9 @@ Included in::
71467155
Synopsis::
71477156
No synopsis available
71487157

7158+
Assembly::
7159+
dret
7160+
71497161
Encoding::
71507162
[wavedrom, ,svg,subs='attributes',width="100%"]
71517163
....
@@ -7175,6 +7187,9 @@ Included in::
71757187
Synopsis::
71767188
Breakpoint exception
71777189

7190+
Assembly::
7191+
ebreak
7192+
71787193
Encoding::
71797194
[wavedrom, ,svg,subs='attributes',width="100%"]
71807195
....
@@ -7215,6 +7230,9 @@ Included in::
72157230
Synopsis::
72167231
Environment call
72177232

7233+
Assembly::
7234+
ecall
7235+
72187236
Encoding::
72197237
[wavedrom, ,svg,subs='attributes',width="100%"]
72207238
....
@@ -9860,6 +9878,9 @@ Included in::
98609878
Synopsis::
98619879
Instruction fence
98629880

9881+
Assembly::
9882+
fence.i
9883+
98639884
Encoding::
98649885
[wavedrom, ,svg,subs='attributes',width="100%"]
98659886
....
@@ -9921,6 +9942,9 @@ Included in::
99219942
Synopsis::
99229943
Memory ordering fence, total store ordering
99239944

9945+
Assembly::
9946+
fence.tso
9947+
99249948
Encoding::
99259949
[wavedrom, ,svg,subs='attributes',width="100%"]
99269950
....
@@ -15845,6 +15869,9 @@ Included in::
1584515869
Synopsis::
1584615870
Machine mode resume from the RNMI or Double Trap handler
1584715871

15872+
Assembly::
15873+
mnret
15874+
1584815875
Encoding::
1584915876
[wavedrom, ,svg,subs='attributes',width="100%"]
1585015877
....
@@ -16000,6 +16027,9 @@ Included in::
1600016027
Synopsis::
1600116028
Machine-mode Return from Trap
1600216029

16030+
Assembly::
16031+
mret
16032+
1600316033
Encoding::
1600416034
[wavedrom, ,svg,subs='attributes',width="100%"]
1600516035
....
@@ -17511,6 +17541,9 @@ Included in::
1751117541
Synopsis::
1751217542
No synopsis available
1751317543

17544+
Assembly::
17545+
sctrclr
17546+
1751417547
Encoding::
1751517548
[wavedrom, ,svg,subs='attributes',width="100%"]
1751617549
....
@@ -17719,6 +17752,9 @@ Included in::
1771917752
Synopsis::
1772017753
Order implicit page table reads after invalidation
1772117754

17755+
Assembly::
17756+
sfence.inval.ir
17757+
1772217758
Encoding::
1772317759
[wavedrom, ,svg,subs='attributes',width="100%"]
1772417760
....
@@ -17987,6 +18023,9 @@ Included in::
1798718023
Synopsis::
1798818024
Order writes before sfence
1798918025

18026+
Assembly::
18027+
sfence.w.inval
18028+
1799018029
Encoding::
1799118030
[wavedrom, ,svg,subs='attributes',width="100%"]
1799218031
....
@@ -19598,6 +19637,9 @@ Included in::
1959819637
Synopsis::
1959919638
Supervisor Mode Return from Trap
1960019639

19640+
Assembly::
19641+
sret
19642+
1960119643
Encoding::
1960219644
[wavedrom, ,svg,subs='attributes',width="100%"]
1960319645
....
@@ -46212,6 +46254,9 @@ Included in::
4621246254
Synopsis::
4621346255
Wait for interrupt
4621446256

46257+
Assembly::
46258+
wfi
46259+
4621546260
Encoding::
4621646261
[wavedrom, ,svg,subs='attributes',width="100%"]
4621746262
....
@@ -46279,6 +46324,9 @@ Included in::
4627946324
Synopsis::
4628046325
Wait-on-Reservation-Set-with-No-Timeout
4628146326

46327+
Assembly::
46328+
wrs.nto
46329+
4628246330
Encoding::
4628346331
[wavedrom, ,svg,subs='attributes',width="100%"]
4628446332
....
@@ -46338,6 +46386,9 @@ Included in::
4633846386
Synopsis::
4633946387
Wait-on-Reservation-Set-with-Short-Timeout
4634046388

46389+
Assembly::
46390+
wrs.sto
46391+
4634146392
Encoding::
4634246393
[wavedrom, ,svg,subs='attributes',width="100%"]
4634346394
....

backends/instructions_appendix/templates/instructions.adoc.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
Synopsis::
1111
<%= inst.long_name %>
1212

13-
<%- if inst.assembly.to_s.strip != "" -%>
1413
Assembly::
15-
<%= inst.fix_entities("#{inst.name.downcase} #{inst.assembly}") %>
14+
<%= inst.fix_entities("#{inst.name.downcase}#{inst.assembly.to_s.strip == '' ? '' : ' ' + inst.assembly}") %>
1615

17-
<%- end -%>
1816
Encoding::
1917
<%- if inst.multi_encoding? -%>
2018
[NOTE]

0 commit comments

Comments
 (0)