Skip to content

Commit b59f255

Browse files
Add flag to ext_pdf and allow either Sail, IDL or both (#469)
* Add flag to ext_pdf and allow either Sail, IDL or both Signed-off-by: Afonso Oliveira <[email protected]> * Add test case to new flags available on ext_pdf Signed-off-by: Afonso Oliveira <[email protected]> * Check for nil Fields instead check for existing field, because of empty fields. Also keeps consistency with the rest of the file Signed-off-by: Afonso Oliveira <[email protected]> * Removing IDL and SAIL tests, for now. Keeping both, so should not change previous behaviour. Signed-off-by: Afonso Oliveira <[email protected]> --------- Signed-off-by: Afonso Oliveira <[email protected]> Co-authored-by: Derek Hower <[email protected]>
1 parent 3888a20 commit b59f255

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/regress.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
EXT: B
111111
VERSION: latest
112112
SINGULARITY: 1
113+
PSEUDO: both
113114
steps:
114115
- name: Clone Github Repo Action
115116
uses: actions/checkout@v4

backends/common_templates/adoc/inst.adoc.erb

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<%
2+
write_flag = ENV["PSEUDO"]
3+
include_idl = include_sail = true
4+
if write_flag
5+
case write_flag.downcase.strip
6+
when "idl"
7+
include_sail = false
8+
when "sail"
9+
include_idl = false
10+
end
11+
end
12+
%>
13+
114
<%= anchor_for_inst(inst.name) %>
215
= <%= inst.name %>
316

@@ -71,13 +84,25 @@ RV64::
7184
<%- end # if multi_encoding? -%>
7285
<%- end # if no decode variables-%>
7386
87+
<% unless inst.data["operation()"].nil? %>
88+
<% if include_idl %>
7489
Operation::
75-
<%- unless inst.data["operation()"].nil? -%>
7690
[source,idl,subs="specialchars,macros"]
7791
----
7892
<%= inst.operation_ast(cfg_arch.symtab).gen_adoc %>
7993
----
80-
<%- end -%>
94+
<% end %>
95+
<% end %>
96+
97+
<% unless inst.data["sail()"].nil? %>
98+
<% if include_sail %>
99+
Sail::
100+
[source,sail]
101+
----
102+
<%= inst.data["sail()"] %>
103+
----
104+
<% end %>
105+
<% end %>
81106
82107
Included in::
83108

0 commit comments

Comments
 (0)