my $x;
my @fieldnames;
my @flagnames = ('SF', 'CF', 'OF', 'ZF');
+ my $section = "\\subsubsection";
-
+ if($_[9]) {
+ $section = "\\item ";
+ }
@fields = split(/\|/, $_[3]);
foreach my $field (@fields) {
$count = $bits-1;
- $tabular = "\\subsubsection{\\texttt{".$_[1]."} -- ".$_[2]."}\n";
+ $tabular = $section."{\\texttt{".$_[1]."} -- ".$_[2]."}\n";
$tabular .= "\\begin{center} \n \\resizebox{\\textwidth}{!}{\n";
$tabular .= "\\begin{tabular}{|l|";
for($i = $bits-1; $i >= 0; $i--) {
$tabular .= "\\paragraph{Example:}~\\\\ \n \\begin{lstlisting} \n ".$_[7]. " \\end{lstlisting}\n";
}
+ print $tabular;
+
if($_[8]) {
- $tabular .= "\\paragraph{Aliases to this Instruction:}~\\\\\ \n";
+ print "\\paragraph{Aliases to this Instruction:} \n";
my @aliases = split(/\|/, $_[8]);
- $tabular .= "\\begin{table}[!h] \n \\centering \n \\begin{tabular}{|c|c|} \\hline \n";
- $tabular .= "\\textbf{Alias }& \\textbf{".$_[1]." equivalent}\\\\ \\hline \n";
+ print "\\begin{list}{\\labelitemi}{\\leftmargin=0em \\itemindent=1em}";
+
+
foreach my $alias (@aliases) {
- my $equv;
- my $from;
- ($from, $equv) = split(/-/, $alias);
- $tabular .= $from . " & ".$equv." \\\\ \\hline \n";
+ my $long;
+ my $sub;
+ my @params;
+ my $namelist = $_[4];
+
+ @params = split(/-/, $alias);
+ $sub = @params[0];
+ $long = @params[1];
+ shift(@params); shift(@params);
+
+ foreach my $vals (@params) {
+ my $field;
+ my $val;
+ ($field, $val) = split(/\//, $vals);
+
+ my @fieldnames = split(/\|/, $namelist);
+
+ $fieldnames[$field] = $fieldnames[$field]."(".$val.")";
+ $namelist = join("|",@fieldnames);
+ }
+
+ ins($_[0], $sub, $long,$_[3], $namelist, '', '', '', '',1);
}
- $tabular .= "\\end{tabular} \n \\caption{Aliases to the instruction ".$_[1]."} \n \\end{table}";
+ print "\\end{list}";
}
- print $tabular;
}
if($#ARGV != 0) {