mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-10 14:11:59 +00:00
Docs: Regenerate html files
This commit is contained in:
parent
ce399ff2db
commit
690ca3ff2b
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Program Annotations Affecting the Decompiler</title>
|
||||
<link rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../shared/languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="up" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="prev" href="DecompilerConcepts.html" title="Decompiler Concepts">
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Decompiler Concepts</title>
|
||||
<link rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../shared/languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="up" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="prev" href="DecompilerIntro.html" title="Decompiler">
|
||||
@ -182,7 +182,7 @@
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="ops.htmltable"></a><p class="title"><b>Table . P-code Operations</b></p>
|
||||
<a name="ops.htmltable"></a><p class="title"><b>Table . P-code Operations</b></p>
|
||||
<div class="table-contents"><table width="90%" frame="box" rules="all" id="ops.htmltable">
|
||||
|
||||
<col width="40%">
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Decompiler</title>
|
||||
<link rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../shared/languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="up" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="prev" href="Decompiler.html" title="Decompiler">
|
||||
@ -64,7 +64,7 @@
|
||||
<li class="listitem" style="list-style-type: disc">
|
||||
Press the <span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/decompileFunction.gif" width="16" height="16"></span>
|
||||
</span> icon
|
||||
</span> icon
|
||||
in the tool bar, <span class="emphasis"><em>or</em></span>
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: disc">
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Decompiler Options</title>
|
||||
<link rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../shared/languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="up" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="prev" href="DecompilerAnnotations.html" title="Program Annotations Affecting the Decompiler">
|
||||
@ -38,14 +38,14 @@
|
||||
</span><span class="emphasis"><em>Decompiler</em></span> - lists <a class="xref" href="DecompilerOptions.html#GeneralOptions" title="General Options">General Options</a> that affect the engine behavior.
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
 <span class="guiicon">
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/document-properties.png" width="16" height="16"></span>
|
||||
</span> <span class="emphasis"><em>Analysis</em></span> - lists <a class="xref" href="DecompilerOptions.html#AnalysisOptions" title="Analysis Options">Analysis Options</a> that affect the Decompiler's transformation process.
|
||||
</span> <span class="emphasis"><em>Analysis</em></span> - lists <a class="xref" href="DecompilerOptions.html#AnalysisOptions" title="Analysis Options">Analysis Options</a> that affect the Decompiler's transformation process.
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: none">
|
||||
 <span class="guiicon">
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/document-properties.png" width="16" height="16"></span>
|
||||
</span> <span class="emphasis"><em>Display</em></span> - lists <a class="xref" href="DecompilerOptions.html#DisplayOptions" title="Display Options">Display Options</a> that affect the final presentation of Decompiler output.
|
||||
</span> <span class="emphasis"><em>Display</em></span> - lists <a class="xref" href="DecompilerOptions.html#DisplayOptions" title="Display Options">Display Options</a> that affect the final presentation of Decompiler output.
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Decompiler Window</title>
|
||||
<link rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../shared/languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="up" href="Decompiler.html" title="Decompiler">
|
||||
<link rel="prev" href="DecompilerOptions.html" title="Decompiler Options">
|
||||
@ -18,7 +18,7 @@
|
||||
function in the Code Browser, then select the
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/decompileFunction.gif" width="16" height="16"></span>
|
||||
</span> icon from the tool bar, or the
|
||||
</span> icon from the tool bar, or the
|
||||
<span class="bold"><strong>Decompile</strong></span> option from the
|
||||
<span class="bold"><strong>Window</strong></span> menu in the tool.
|
||||
</p>
|
||||
@ -91,7 +91,7 @@
|
||||
Initially pressing
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/decompileFunction.gif" width="16" height="16"></span>
|
||||
</span> or selecting
|
||||
</span> or selecting
|
||||
<span class="bold"><strong>Decompile</strong></span> from the <span class="bold"><strong>Window</strong></span> menu in the tool
|
||||
brings up the <span class="emphasis"><em>main</em></span> window. The main window always displays the function
|
||||
at the <span class="emphasis"><em>current address</em></span> within the Code Browser and follows as the user navigates
|
||||
@ -153,7 +153,7 @@
|
||||
Pressing the
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/camera-photo.png" width="16" height="16"></span>
|
||||
</span> icon
|
||||
</span> icon
|
||||
in any Decompiler window's toolbar causes a <span class="emphasis"><em>Snapshot</em></span> window
|
||||
to be created, which shows decompilation of the same function.
|
||||
Unlike the <span class="emphasis"><em>main</em></span> window however, the <span class="emphasis"><em>Snapshot</em></span> window
|
||||
@ -240,7 +240,7 @@
|
||||
<p>
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/page_edit.png" width="16" height="16"></span>
|
||||
</span> - button
|
||||
</span> - button
|
||||
</p>
|
||||
<p>
|
||||
Exports the decompiled result of the current function to a file. A file chooser
|
||||
@ -265,7 +265,7 @@
|
||||
<p>
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/camera-photo.png" width="16" height="16"></span>
|
||||
</span> - button
|
||||
</span> - button
|
||||
</p>
|
||||
<p>
|
||||
Creates a new <span class="emphasis"><em>Snapshot</em></span> window. The <span class="emphasis"><em>Snapshot</em></span> window
|
||||
@ -282,7 +282,7 @@
|
||||
<p>
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/reload3.png" width="16" height="16"></span>
|
||||
</span> - button
|
||||
</span> - button
|
||||
</p>
|
||||
<p>
|
||||
Triggers a re-decompilation of the current function displayed in the window.
|
||||
@ -310,7 +310,7 @@
|
||||
<p>
|
||||
<span class="guiicon">
|
||||
<span class="inlinemediaobject"><img src="images/page_white_copy.png" width="16" height="16"></span>
|
||||
</span> - button
|
||||
</span> - button
|
||||
</p>
|
||||
<p>
|
||||
Copies the currently selected text in the Decompiler window to the clipboard.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Additional P-CODE Operations</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="up" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="prev" href="pseudo-ops.html" title="Pseudo P-CODE Operations">
|
||||
@ -16,9 +16,9 @@
|
||||
<tr><th colspan="3" align="center">Additional P-CODE Operations</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="pseudo-ops.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="reference.html">Next</a>
|
||||
<a accesskey="p" href="pseudo-ops.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="reference.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -437,15 +437,15 @@ to SLEIGH <span class="bold"><strong>bitrange</strong></span> syntax such as out
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="pseudo-ops.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="reference.html">Next</a>
|
||||
<a accesskey="p" href="pseudo-ops.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="reference.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">Pseudo P-CODE Operations </td>
|
||||
<td width="40%" align="left" valign="top">Pseudo P-CODE Operations </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="pcoderef.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> Syntax Reference</td>
|
||||
<td width="40%" align="right" valign="top"> Syntax Reference</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>P-Code Operation Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="up" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="prev" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
@ -16,9 +16,9 @@
|
||||
<tr><th colspan="3" align="center">P-Code Operation Reference</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="pcoderef.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="pseudo-ops.html">Next</a>
|
||||
<a accesskey="p" href="pcoderef.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="pseudo-ops.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -121,7 +121,7 @@ input0 and output must be the same.
|
||||
</div></div>
|
||||
<p>
|
||||
This instruction loads data from a dynamic location into the output
|
||||
variable by dereferencing a pointer. The “pointer” comes in two
|
||||
variable by dereferencing a pointer. The “pointer” comes in two
|
||||
pieces. One piece, input1, is a normal variable containing the offset
|
||||
of the object being pointed at. The other piece, input0, is a constant
|
||||
indicating the space into which the offset applies. The data in input1
|
||||
@ -133,7 +133,7 @@ loaded by this instruction is determined by the size of the output
|
||||
variable. It is easy to confuse the address space of the output and
|
||||
input1 variables and the Address Space represented by the ID, which
|
||||
could all be different. Unlike many programming models, there are
|
||||
multiple spaces that a “pointer” can refer to, and so an extra ID is
|
||||
multiple spaces that a “pointer” can refer to, and so an extra ID is
|
||||
required.
|
||||
</p>
|
||||
<p>
|
||||
@ -194,7 +194,7 @@ correct byte offset into the space.
|
||||
This instruction is the complement
|
||||
of <span class="bold"><strong>LOAD</strong></span>. The data in the variable
|
||||
input2 is stored at a dynamic location by dereferencing a pointer. As
|
||||
with <span class="bold"><strong>LOAD</strong></span>, the “pointer” comes in two
|
||||
with <span class="bold"><strong>LOAD</strong></span>, the “pointer” comes in two
|
||||
pieces: a space ID part, and an offset variable. The size of input1
|
||||
must match the address space specified by the ID, and the amount of
|
||||
data stored is determined by the size of input2.
|
||||
@ -264,7 +264,7 @@ of the current machine instruction. This allows branching within the
|
||||
operations forming a single instruction. For example, if
|
||||
the <span class="bold"><strong>BRANCH</strong></span> occurs as the pcode
|
||||
operation with index 5 for the instruction, it can branch to operation
|
||||
with index 8 by specifying a constant destination “address” of
|
||||
with index 8 by specifying a constant destination “address” of
|
||||
3. Negative constants can be used for backward branches.
|
||||
</p>
|
||||
</div>
|
||||
@ -1821,7 +1821,7 @@ sign-extended to the desired size.
|
||||
This is an unsigned integer division operation. Divide input0 by
|
||||
input1, truncating the result to the nearest integer, and store the
|
||||
result in output. Both inputs and output must be the same size. There
|
||||
is no handling of division by zero. To simulate a processor’s handling
|
||||
is no handling of division by zero. To simulate a processor’s handling
|
||||
of a division-by-zero trap, other operations must be used before
|
||||
the <span class="bold"><strong>INT_DIV</strong></span>.
|
||||
</p>
|
||||
@ -1923,7 +1923,7 @@ This is a signed integer division operation. The resulting integer is
|
||||
the one closest to the rational value input0/input1 but which is still
|
||||
smaller in absolute value. Both inputs and output must be the same
|
||||
size. There is no handling of division by zero. To simulate a
|
||||
processor’s handling of a division-by-zero trap, other operations must
|
||||
processor’s handling of a division-by-zero trap, other operations must
|
||||
be used before the <span class="bold"><strong>INT_SDIV</strong></span>.
|
||||
</p>
|
||||
</div>
|
||||
@ -3024,15 +3024,15 @@ Input0 and output can be different sizes.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="pcoderef.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="pseudo-ops.html">Next</a>
|
||||
<a accesskey="p" href="pcoderef.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="pseudo-ops.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">P-Code Reference Manual </td>
|
||||
<td width="40%" align="left" valign="top">P-Code Reference Manual </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="pcoderef.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> Pseudo P-CODE Operations</td>
|
||||
<td width="40%" align="right" valign="top"> Pseudo P-CODE Operations</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>P-Code Reference Manual</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="next" href="pcodedescription.html" title="P-Code Operation Reference">
|
||||
</head>
|
||||
@ -13,9 +13,9 @@
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">P-Code Reference Manual</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left"> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="pcodedescription.html">Next</a>
|
||||
<td width="20%" align="left"> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="pcodedescription.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -195,7 +195,7 @@ to as <span class="bold"><strong>raw p-code</strong></span>. Raw p-code can be u
|
||||
instruction execution and generally follows the same control-flow,
|
||||
although it may add some of its own internal control-flow. The subset of
|
||||
opcodes that can occur in raw p-code is described in
|
||||
<a class="xref" href="pcodedescription.html" title="P-Code Operation Reference">the section called “P-Code Operation Reference”</a> and in <a class="xref" href="pseudo-ops.html" title="Pseudo P-CODE Operations">the section called “Pseudo P-CODE Operations”</a>, making up
|
||||
<a class="xref" href="pcodedescription.html" title="P-Code Operation Reference">the section called “P-Code Operation Reference”</a> and in <a class="xref" href="pseudo-ops.html" title="Pseudo P-CODE Operations">the section called “Pseudo P-CODE Operations”</a>, making up
|
||||
the bulk of this document.
|
||||
</p>
|
||||
<p>
|
||||
@ -209,7 +209,7 @@ opcodes. Two of these,
|
||||
<span class="bold"><strong>MULTIEQUAL</strong></span> and <span class="bold"><strong>INDIRECT</strong></span>,
|
||||
are specific to the graph construction process, but other opcodes can be introduced during
|
||||
subsequent analysis and transformation of a graph and help hold recovered data-type relationships.
|
||||
All of the new opcodes are described in <a class="xref" href="additionalpcode.html" title="Additional P-CODE Operations">the section called “Additional P-CODE Operations”</a>, none of which can occur
|
||||
All of the new opcodes are described in <a class="xref" href="additionalpcode.html" title="Additional P-CODE Operations">the section called “Additional P-CODE Operations”</a>, none of which can occur
|
||||
in the original raw p-code translation. Finally, a few of the p-code operators,
|
||||
<span class="bold"><strong>CALL</strong></span>,
|
||||
<span class="bold"><strong>CALLIND</strong></span>, and <span class="bold"><strong>RETURN</strong></span>,
|
||||
@ -319,7 +319,7 @@ its <span class="bold"><strong>opcode</strong></span>.
|
||||
For almost all p-code operations, only the output varnode can have its
|
||||
value modified; there are no indirect effects of the operation.
|
||||
The only possible exceptions are <span class="emphasis"><em>pseudo</em></span> operations,
|
||||
see <a class="xref" href="pseudo-ops.html" title="Pseudo P-CODE Operations">the section called “Pseudo P-CODE Operations”</a>, which are sometimes necessary when there
|
||||
see <a class="xref" href="pseudo-ops.html" title="Pseudo P-CODE Operations">the section called “Pseudo P-CODE Operations”</a>, which are sometimes necessary when there
|
||||
is incomplete knowledge of an instruction's behavior.
|
||||
</p>
|
||||
<p>
|
||||
@ -342,7 +342,7 @@ The list of possible
|
||||
opcodes are similar to many RISC based instruction sets. The effect of
|
||||
each opcode is described in detail in the following sections,
|
||||
and a reference table is given
|
||||
in <a class="xref" href="reference.html" title="Syntax Reference">the section called “Syntax Reference”</a>. In general, the size or
|
||||
in <a class="xref" href="reference.html" title="Syntax Reference">the section called “Syntax Reference”</a>. In general, the size or
|
||||
precision of a particular p-code operation is determined by the size
|
||||
of the varnode inputs or output, not by the opcode.
|
||||
</p>
|
||||
@ -353,15 +353,15 @@ of the varnode inputs or output, not by the opcode.
|
||||
<hr>
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="pcodedescription.html">Next</a>
|
||||
<td width="40%" align="left"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="pcodedescription.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right" valign="top"> P-Code Operation Reference</td>
|
||||
<td width="40%" align="left" valign="top"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right" valign="top"> P-Code Operation Reference</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Pseudo P-CODE Operations</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="up" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="prev" href="pcodedescription.html" title="P-Code Operation Reference">
|
||||
@ -16,9 +16,9 @@
|
||||
<tr><th colspan="3" align="center">Pseudo P-CODE Operations</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="pcodedescription.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="additionalpcode.html">Next</a>
|
||||
<a accesskey="p" href="pcodedescription.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="additionalpcode.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -104,7 +104,7 @@ parameter. Exact details are processor and specification dependent.
|
||||
Ideally, the output parameter is determined by the input
|
||||
parameters, and no variable is affected except the output
|
||||
parameter. But this is no longer a strict requirement, side-effects are possible.
|
||||
Analysis should generally treat these instructions as a “black-box” which
|
||||
Analysis should generally treat these instructions as a “black-box” which
|
||||
still have normal data-flow and can be manipulated symbolically.
|
||||
</p>
|
||||
</div>
|
||||
@ -225,15 +225,15 @@ not modeled in these cases, so the operator serves as a placeholder to allow ana
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="pcodedescription.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="additionalpcode.html">Next</a>
|
||||
<a accesskey="p" href="pcodedescription.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="additionalpcode.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">P-Code Operation Reference </td>
|
||||
<td width="40%" align="left" valign="top">P-Code Operation Reference </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="pcoderef.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> Additional P-CODE Operations</td>
|
||||
<td width="40%" align="right" valign="top"> Additional P-CODE Operations</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Syntax Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="up" href="pcoderef.html" title="P-Code Reference Manual">
|
||||
<link rel="prev" href="additionalpcode.html" title="Additional P-CODE Operations">
|
||||
@ -15,9 +15,9 @@
|
||||
<tr><th colspan="3" align="center">Syntax Reference</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="additionalpcode.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> </td>
|
||||
<a accesskey="p" href="additionalpcode.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
@ -515,14 +515,14 @@
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="additionalpcode.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> </td>
|
||||
<a accesskey="p" href="additionalpcode.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">Additional P-CODE Operations </td>
|
||||
<td width="40%" align="left" valign="top">Additional P-CODE Operations </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="pcoderef.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> </td>
|
||||
<td width="40%" align="right" valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,21 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>SLEIGH</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="next" href="sleigh_layout.html" title="2. Basic Specification Layout">
|
||||
<link rel="next" href="sleigh_layout.html" title="2. Basic Specification Layout">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">SLEIGH</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left"> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_layout.html">Next</a>
|
||||
<td width="20%" align="left"> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_layout.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -108,7 +108,7 @@
|
||||
project. The language that is now called SLEIGH has undergone
|
||||
several redesign iterations, but it can still trace its heritage
|
||||
from the language SLED, from whom its name is derived. SLED, the
|
||||
“Specification Language for Encoding and Decoding”, was defined by
|
||||
“Specification Language for Encoding and Decoding”, was defined by
|
||||
Norman Ramsey and Mary F. Fernandez as a concise way to define the
|
||||
translation, in both directions, between machine instructions and
|
||||
their corresponding assembly statements. This facilitated the
|
||||
@ -162,13 +162,13 @@ Italics are used when defining terms and for named entities. Bold is used for SL
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_introduction"></a>1. Introduction to P-Code</h2></div></div></div>
|
||||
<a name="sleigh_introduction"></a>1. Introduction to P-Code</h2></div></div></div>
|
||||
<p>
|
||||
Although p-code is a distinct language from SLEIGH, because a major
|
||||
purpose of SLEIGH is to specify the translation from machine code to
|
||||
p-code, this document serves as a primer for p-code. The key concepts
|
||||
and terminology are presented in this section, and more detail is
|
||||
given in <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>. There is also a complete set
|
||||
given in <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>. There is also a complete set
|
||||
of tables which list syntax and descriptions for p-code operations in
|
||||
the Appendix.
|
||||
</p>
|
||||
@ -179,9 +179,9 @@ general purpose processor. Code for different processors can be
|
||||
translated in a straightforward manner into p-code, and then a single
|
||||
suite of analysis software can be used to do data-flow analysis and
|
||||
decompilation. In this way, the analysis software
|
||||
becomes <span class="emphasis"><em>retargetable</em></span>, and it isn’t necessary to
|
||||
becomes <span class="emphasis"><em>retargetable</em></span>, and it isn’t necessary to
|
||||
redesign it for each new processor being analyzed. It is only
|
||||
necessary to specify the translation of the processor’s instruction
|
||||
necessary to specify the translation of the processor’s instruction
|
||||
set into p-code.
|
||||
</p>
|
||||
<p>
|
||||
@ -221,7 +221,7 @@ respectively.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_address_spaces"></a>1.1. Address Spaces</h3></div></div></div>
|
||||
<a name="sleigh_address_spaces"></a>1.1. Address Spaces</h3></div></div></div>
|
||||
<p>
|
||||
An <span class="emphasis"><em>address</em></span> space for p-code is a generalization of
|
||||
the indexed memory (RAM) that a typical processor has access to, and
|
||||
@ -261,7 +261,7 @@ Typically, a processor can be modeled with only two spaces,
|
||||
a <span class="emphasis"><em>ram</em></span> address space that represents the main
|
||||
memory accessible to the processor via its data-bus, and
|
||||
a <span class="emphasis"><em>register</em></span> address space that is used to
|
||||
implement the processor’s registers. However, the specification
|
||||
implement the processor’s registers. However, the specification
|
||||
designer can define as many address spaces as needed.
|
||||
</p>
|
||||
<p>
|
||||
@ -272,14 +272,14 @@ semantics into individual p-code operations. It is called
|
||||
the <span class="emphasis"><em>unique</em></span> space. There is also a special address
|
||||
space, called the <span class="emphasis"><em>const</em></span> space, used as a
|
||||
placeholder for constant operands of p-code instructions. For the most
|
||||
part, a SLEIGH specification doesn’t need to be aware of this space,
|
||||
part, a SLEIGH specification doesn’t need to be aware of this space,
|
||||
but it can be used in certain situations to force values to be
|
||||
interpreted as constants.
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_varnodes"></a>1.2. Varnodes</h3></div></div></div>
|
||||
<a name="sleigh_varnodes"></a>1.2. Varnodes</h3></div></div></div>
|
||||
<p>
|
||||
A <span class="emphasis"><em>varnode</em></span> is the unit of data manipulated by
|
||||
p-code. It is simply a contiguous sequence of bytes in some address
|
||||
@ -305,7 +305,7 @@ forces an interpretation on each varnode that it uses, as either an
|
||||
integer, a floating-point number, or a boolean value. In the case of
|
||||
an integer, the varnode is interpreted as having a big endian or
|
||||
little endian encoding, depending on the specification (see
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_endianess_definition" title="4.1. Endianess Definition">Section 4.1, “Endianess Definition”</a>). Certain instructions
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_endianess_definition" title="4.1. Endianess Definition">Section 4.1, “Endianess Definition”</a>). Certain instructions
|
||||
also distinguish between signed and unsigned interpretations. For a
|
||||
signed integer, the varnode is considered to have a standard twos
|
||||
complement encoding. For a boolean interpretation, the varnode must be
|
||||
@ -322,7 +322,7 @@ must be provided and enforced by the specification designer.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_operations"></a>1.3. Operations</h3></div></div></div>
|
||||
<a name="sleigh_operations"></a>1.3. Operations</h3></div></div></div>
|
||||
<p>
|
||||
P-code is intended to emulate a target processor by substituting a
|
||||
sequence of p-code operations for each machine instruction. Thus every
|
||||
@ -352,7 +352,7 @@ general purpose processor instruction sets. They break up into groups.
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="ops.htmltable"></a><p class="title"><b>Table 1. P-code Operations</b></p>
|
||||
<a name="ops.htmltable"></a><p class="title"><b>Table 1. P-code Operations</b></p>
|
||||
<div class="table-contents"><table xml:id="ops.htmltable" width="70%" frame="box" rules="all">
|
||||
<col width="40%">
|
||||
<col width="60%">
|
||||
@ -414,7 +414,7 @@ general purpose processor instruction sets. They break up into groups.
|
||||
<br class="table-break">
|
||||
</div>
|
||||
<p>
|
||||
We postpone a full discussion of the individual operations until <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>.
|
||||
We postpone a full discussion of the individual operations until <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -423,15 +423,15 @@ We postpone a full discussion of the individual operations until <a class="xref"
|
||||
<hr>
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_layout.html">Next</a>
|
||||
<td width="40%" align="left"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_layout.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right" valign="top"> 2. Basic Specification Layout</td>
|
||||
<td width="40%" align="left" valign="top"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right" valign="top"> 2. Basic Specification Layout</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>8. Using Context</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>8. Using Context</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_constructors.html" title="7. Constructors">
|
||||
<link rel="next" href="sleigh_ref.html" title="9. P-code Tables">
|
||||
<link rel="prev" href="sleigh_constructors.html" title="7. Constructors">
|
||||
<link rel="next" href="sleigh_ref.html" title="9. P-code Tables">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">8. Using Context</th></tr>
|
||||
<tr><th colspan="3" align="center">8. Using Context</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_constructors.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_ref.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_constructors.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_ref.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_context"></a>8. Using Context</h2></div></div></div>
|
||||
<a name="sleigh_context"></a>8. Using Context</h2></div></div></div>
|
||||
<p>
|
||||
For most practical specifications, the disassembly and semantic
|
||||
meaning of an instruction can be determined by looking only at the
|
||||
@ -77,7 +77,7 @@ necessary.
|
||||
<p>
|
||||
SLEIGH solves these problems by introducing <span class="emphasis"><em>context
|
||||
variables</em></span>. The syntax for defining these symbols was
|
||||
described in <a class="xref" href="sleigh_tokens.html#sleigh_context_variables" title="6.4. Context Variables">Section 6.4, “Context Variables”</a>. As mentioned
|
||||
described in <a class="xref" href="sleigh_tokens.html#sleigh_context_variables" title="6.4. Context Variables">Section 6.4, “Context Variables”</a>. As mentioned
|
||||
there, the easiest and most common way to use a context variable is as
|
||||
just another field to use in our bit patterns. It gives us the extra
|
||||
information we need to distinguish between different instructions
|
||||
@ -85,7 +85,7 @@ whose encodings are otherwise the same.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_context_basic"></a>8.1. Basic Use of Context Variables</h3></div></div></div>
|
||||
<a name="sleigh_context_basic"></a>8.1. Basic Use of Context Variables</h3></div></div></div>
|
||||
<p>
|
||||
Suppose a processor supports the use of two different sets of
|
||||
registers in its main addressing mode, based on the setting of a
|
||||
@ -149,12 +149,12 @@ although see the following sections.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_local_change"></a>8.2. Local Context Change</h3></div></div></div>
|
||||
<a name="sleigh_local_change"></a>8.2. Local Context Change</h3></div></div></div>
|
||||
<p>
|
||||
SLEIGH can make direct modifications to context variables through
|
||||
statements in the disassembly action section of a constructor. The
|
||||
left-hand side of an assignment statement in this section can be a context variable,
|
||||
see <a class="xref" href="sleigh_constructors.html#sleigh_general_actions" title="7.5.2. General Actions and Pattern Expressions">Section 7.5.2, “General Actions and Pattern Expressions”</a>. Because the result of this
|
||||
see <a class="xref" href="sleigh_constructors.html#sleigh_general_actions" title="7.5.2. General Actions and Pattern Expressions">Section 7.5.2, “General Actions and Pattern Expressions”</a>. Because the result of this
|
||||
assignment is calculated in the middle of the instruction disassembly,
|
||||
the change in value of the context variable can potentially affect any
|
||||
remaining parsing for that instruction. A modal variable is being
|
||||
@ -193,7 +193,7 @@ use <span class="emphasis"><em>mode</em></span>, its value will have reverted to
|
||||
original global state. The same holds for any context variable
|
||||
modified with this syntax. If an instruction needs to permanently
|
||||
modify the state of a context variable, the designer must use
|
||||
constructions described in <a class="xref" href="sleigh_context.html#sleigh_global_change" title="8.3. Global Context Change">Section 8.3, “Global Context Change”</a>.
|
||||
constructions described in <a class="xref" href="sleigh_context.html#sleigh_global_change" title="8.3. Global Context Change">Section 8.3, “Global Context Change”</a>.
|
||||
</p>
|
||||
<p>
|
||||
Clearly, the behavior of the above example could be easily replicated
|
||||
@ -219,7 +219,7 @@ by <span class="bold"><strong>build</strong></span> directives.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_global_change"></a>8.3. Global Context Change</h3></div></div></div>
|
||||
<a name="sleigh_global_change"></a>8.3. Global Context Change</h3></div></div></div>
|
||||
<p>
|
||||
It is possible for an instruction to attempt a permanent change to a
|
||||
context variable, which would then affect the parsing of other
|
||||
@ -261,7 +261,7 @@ select <span class="emphasis"><em>r</em></span> registers
|
||||
via <span class="emphasis"><em>rreg1</em></span>, and <span class="emphasis"><em>smode</em></span>
|
||||
sets <span class="emphasis"><em>mode</em></span> to 1 in order to
|
||||
select <span class="emphasis"><em>s</em></span> registers. As is described in
|
||||
<a class="xref" href="sleigh_context.html#sleigh_local_change" title="8.2. Local Context Change">Section 8.2, “Local Context Change”</a>, these assignments by themselves
|
||||
<a class="xref" href="sleigh_context.html#sleigh_local_change" title="8.2. Local Context Change">Section 8.2, “Local Context Change”</a>, these assignments by themselves
|
||||
cause only a local context change. However, the
|
||||
subsequent <span class="bold"><strong>globalset</strong></span> directives make
|
||||
the change persist outside of the the instructions
|
||||
@ -276,7 +276,7 @@ of <span class="emphasis"><em>mode</em></span> begins at the next address.
|
||||
</p>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_contextflow"></a>8.3.1. Context Flow</h4></div></div></div>
|
||||
<a name="sleigh_contextflow"></a>8.3.1. Context Flow</h4></div></div></div>
|
||||
<p>
|
||||
A global change to context that affects instruction decoding is typically
|
||||
open-ended. I.e. once the mode switching instruction is executed, a permanent change
|
||||
@ -290,7 +290,7 @@ is encountered.
|
||||
</p>
|
||||
<p>
|
||||
Flow following behavior can be overridden by adding the <span class="bold"><strong>noflow</strong></span>
|
||||
attribute to the definition of the context field. (See <a class="xref" href="sleigh_tokens.html#sleigh_context_variables" title="6.4. Context Variables">Section 6.4, “Context Variables”</a>)
|
||||
attribute to the definition of the context field. (See <a class="xref" href="sleigh_tokens.html#sleigh_context_variables" title="6.4. Context Variables">Section 6.4, “Context Variables”</a>)
|
||||
In this case, a <span class="bold"><strong>globalset</strong></span> directive only affects the context
|
||||
of a single instruction at the specified address. Subsequent instructions
|
||||
retain their original context. This can be useful in a variety of situations but is typically
|
||||
@ -348,15 +348,15 @@ end and what to do if there are conflicts.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_constructors.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_ref.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_constructors.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_ref.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">7. Constructors </td>
|
||||
<td width="40%" align="left" valign="top">7. Constructors </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 9. P-code Tables</td>
|
||||
<td width="40%" align="right" valign="top"> 9. P-code Tables</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>4. Basic Definitions</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>4. Basic Definitions</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_preprocessing.html" title="3. Preprocessing">
|
||||
<link rel="next" href="sleigh_symbols.html" title="5. Introduction to Symbols">
|
||||
<link rel="prev" href="sleigh_preprocessing.html" title="3. Preprocessing">
|
||||
<link rel="next" href="sleigh_symbols.html" title="5. Introduction to Symbols">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">4. Basic Definitions</th></tr>
|
||||
<tr><th colspan="3" align="center">4. Basic Definitions</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_preprocessing.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_symbols.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_preprocessing.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_symbols.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,15 +26,15 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_definitions"></a>4. Basic Definitions</h2></div></div></div>
|
||||
<a name="sleigh_definitions"></a>4. Basic Definitions</h2></div></div></div>
|
||||
<p>
|
||||
SLEIGH files must start with all the definitions needed by the rest of
|
||||
the specification. All definition statements start with the keyword
|
||||
<span class="bold"><strong>define</strong></span> and end with a semicolon ‘;’.
|
||||
<span class="bold"><strong>define</strong></span> and end with a semicolon ‘;’.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_endianess_definition"></a>4.1. Endianess Definition</h3></div></div></div>
|
||||
<a name="sleigh_endianess_definition"></a>4.1. Endianess Definition</h3></div></div></div>
|
||||
<p>
|
||||
The first definition in any SLEIGH specification must be for endianess. Either
|
||||
</p>
|
||||
@ -46,7 +46,7 @@ define endian=little;
|
||||
This defines how the processor interprets contiguous sequences of
|
||||
bytes as integers or other values and globally affects values across
|
||||
all address spaces. It also affects how integer fields
|
||||
within an instruction are interpreted, (see <a class="xref" href="sleigh_tokens.html#sleigh_defining_tokens" title="6.1. Defining Tokens and Fields">Section 6.1, “Defining Tokens and Fields”</a>),
|
||||
within an instruction are interpreted, (see <a class="xref" href="sleigh_tokens.html#sleigh_defining_tokens" title="6.1. Defining Tokens and Fields">Section 6.1, “Defining Tokens and Fields”</a>),
|
||||
although it is possible to override this setting in the rare case that endianess is
|
||||
different for data versus instruction encoding.
|
||||
The specification designer generally only needs to worry about
|
||||
@ -56,7 +56,7 @@ otherwise the specification language hides endianess issues.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_alignment_definition"></a>4.2. Alignment Definition</h3></div></div></div>
|
||||
<a name="sleigh_alignment_definition"></a>4.2. Alignment Definition</h3></div></div></div>
|
||||
<p>
|
||||
An alignment definition looks like
|
||||
</p>
|
||||
@ -73,7 +73,7 @@ instruction as an error.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_space_definitions"></a>4.3. Space Definitions</h3></div></div></div>
|
||||
<a name="sleigh_space_definitions"></a>4.3. Space Definitions</h3></div></div></div>
|
||||
<p>
|
||||
The definition of an address space looks like
|
||||
</p>
|
||||
@ -115,7 +115,7 @@ and store from dynamic pointers into the space.
|
||||
</p>
|
||||
<p>
|
||||
A space of type <span class="bold"><strong>register_space</strong></span> is
|
||||
intended to model the processor’s general-purpose registers. In terms
|
||||
intended to model the processor’s general-purpose registers. In terms
|
||||
of accessing and manipulating data within the space, SLEIGH and p-code
|
||||
make no distinction between the
|
||||
type <span class="bold"><strong>ram_space</strong></span> or the
|
||||
@ -157,8 +157,8 @@ At least one space needs to be labeled with
|
||||
the <span class="bold"><strong>default</strong></span> attribute. This should be
|
||||
the space that the processor accesses with its main address bus. In
|
||||
terms of the rest of the specification file, this sets the default
|
||||
space referred to by the ‘*’ operator (see
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_star_operator" title="7.7.1.2. The '*' Operator">Section 7.7.1.2, “The '*' Operator”</a>). It also has meaning to
|
||||
space referred to by the ‘*’ operator (see
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_star_operator" title="7.7.1.2. The '*' Operator">Section 7.7.1.2, “The '*' Operator”</a>). It also has meaning to
|
||||
GHIDRA.
|
||||
</p>
|
||||
<p>
|
||||
@ -184,7 +184,7 @@ bits).
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_naming_registers"></a>4.4. Naming Registers</h3></div></div></div>
|
||||
<a name="sleigh_naming_registers"></a>4.4. Naming Registers</h3></div></div></div>
|
||||
<p>
|
||||
The general purpose registers of the processors can be named with the
|
||||
following define syntax:
|
||||
@ -194,8 +194,8 @@ define <span class="bold"><strong>spacename</strong></span> offset=<span class="
|
||||
</pre></div>
|
||||
<p>
|
||||
A <span class="emphasis"><em>stringlist</em></span> is either a single string or a white
|
||||
space separated list of strings in square brackets ‘[’ and ‘]’. A
|
||||
string of just “_” indicates a skip in the sequence for that
|
||||
space separated list of strings in square brackets ‘[’ and ‘]’. A
|
||||
string of just “_” indicates a skip in the sequence for that
|
||||
definition. The offset corresponding to that position in the list of
|
||||
names will not have a varnode defined at it.
|
||||
</p>
|
||||
@ -228,7 +228,7 @@ define register offset=0 size=1
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_bitrange_registers"></a>4.5. Bit Range Registers</h3></div></div></div>
|
||||
<a name="sleigh_bitrange_registers"></a>4.5. Bit Range Registers</h3></div></div></div>
|
||||
<p>
|
||||
Many processors define registers that either consist of a single bit
|
||||
or otherwise don't use an integral number of bytes. A recurring
|
||||
@ -245,7 +245,7 @@ models because the smallest object they can manipulate directly is a
|
||||
byte. In order to manipulate single bits, p-code must use a
|
||||
combination of bitwise logical, extension, and truncation
|
||||
operations. So a register defined as a bit range is not really a
|
||||
varnode as described in <a class="xref" href="sleigh.html#sleigh_varnodes" title="1.2. Varnodes">Section 1.2, “Varnodes”</a>, but is
|
||||
varnode as described in <a class="xref" href="sleigh.html#sleigh_varnodes" title="1.2. Varnodes">Section 1.2, “Varnodes”</a>, but is
|
||||
really just a signal to the SLEIGH compiler to fill in the proper
|
||||
operators to simulate the bit manipulation. Using this feature may
|
||||
greatly increase the complexity of the compiled specification with
|
||||
@ -265,7 +265,7 @@ register. In this example, <span class="emphasis"><em>statusreg</em></span> is d
|
||||
first as a 4 byte register, and the bit registers themselves are built
|
||||
by the following <span class="bold"><strong>define bitrange</strong></span>
|
||||
statement. A single bit register definition consists of an identifier
|
||||
for the register, followed by ‘=’, then the name of the register
|
||||
for the register, followed by ‘=’, then the name of the register
|
||||
containing the bits, and finally a pair of numbers in square
|
||||
brackets. The first number indicates the lowest significant bit in the
|
||||
containing register of the bit range, where bit 0 is the least
|
||||
@ -282,11 +282,11 @@ bit of <span class="emphasis"><em>statusreg</em></span> respectively.
|
||||
<p>
|
||||
The syntax for defining a new bit register is consistent with the
|
||||
pseudo bit range operator, described in
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_bitrange_operator" title="7.7.1.5. Bit Range Operator">Section 7.7.1.5, “Bit Range Operator”</a>, and the resulting symbol
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_bitrange_operator" title="7.7.1.5. Bit Range Operator">Section 7.7.1.5, “Bit Range Operator”</a>, and the resulting symbol
|
||||
is really just a placeholder for this operator. Whenever SLEIGH sees
|
||||
this symbol it generates p-code precisely as if the designer had used
|
||||
the bit range operator
|
||||
instead. <a class="xref" href="sleigh_constructors.html#sleigh_bitrange_operator" title="7.7.1.5. Bit Range Operator">Section 7.7.1.5, “Bit Range Operator”</a>, provides some
|
||||
instead. <a class="xref" href="sleigh_constructors.html#sleigh_bitrange_operator" title="7.7.1.5. Bit Range Operator">Section 7.7.1.5, “Bit Range Operator”</a>, provides some
|
||||
additional details about how p-code is generated, which apply to the
|
||||
use of bit range registers.
|
||||
</p>
|
||||
@ -299,14 +299,14 @@ used as an alternate syntax for defining overlapping registers.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_userdefined_operations"></a>4.6. User-Defined Operations</h3></div></div></div>
|
||||
<a name="sleigh_userdefined_operations"></a>4.6. User-Defined Operations</h3></div></div></div>
|
||||
<p>
|
||||
The specification designer can define new p-code operations using
|
||||
a <span class="bold"><strong>define pcodeop</strong></span> statement. This
|
||||
statement automatically reserves an internal form for the new p-code
|
||||
operation and associates an identifier with it. This identifier can
|
||||
then be used in semantic expressions (see
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_userdef_op" title="7.7.1.8. User-Defined Operations">Section 7.7.1.8, “User-Defined Operations”</a>). The following example defines a
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_userdef_op" title="7.7.1.8. User-Defined Operations">Section 7.7.1.8, “User-Defined Operations”</a>). The following example defines a
|
||||
new p-code operation <span class="emphasis"><em>arctan</em></span>.
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
@ -338,15 +338,15 @@ actions that are too esoteric or too complicated to implement.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_preprocessing.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_symbols.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_preprocessing.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_symbols.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">3. Preprocessing </td>
|
||||
<td width="40%" align="left" valign="top">3. Preprocessing </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 5. Introduction to Symbols</td>
|
||||
<td width="40%" align="right" valign="top"> 5. Introduction to Symbols</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>2. Basic Specification Layout</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>2. Basic Specification Layout</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="next" href="sleigh_preprocessing.html" title="3. Preprocessing">
|
||||
<link rel="next" href="sleigh_preprocessing.html" title="3. Preprocessing">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">2. Basic Specification Layout</th></tr>
|
||||
<tr><th colspan="3" align="center">2. Basic Specification Layout</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_preprocessing.html">Next</a>
|
||||
<a accesskey="p" href="sleigh.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_preprocessing.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,51 +26,51 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_layout"></a>2. Basic Specification Layout</h2></div></div></div>
|
||||
<a name="sleigh_layout"></a>2. Basic Specification Layout</h2></div></div></div>
|
||||
<p>
|
||||
A SLEIGH specification is typically contained in a single file,
|
||||
although see <a class="xref" href="sleigh_preprocessing.html#sleigh_including_files" title="3.1. Including Files">Section 3.1, “Including Files”</a>. The file must
|
||||
although see <a class="xref" href="sleigh_preprocessing.html#sleigh_including_files" title="3.1. Including Files">Section 3.1, “Including Files”</a>. The file must
|
||||
follow a specific format as parsed by the SLEIGH compiler. In this
|
||||
section, we list the basic formatting rules for this file as enforced
|
||||
by the compiler.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_comments"></a>2.1. Comments</h3></div></div></div>
|
||||
<a name="sleigh_comments"></a>2.1. Comments</h3></div></div></div>
|
||||
<p>
|
||||
Comments start with the ‘#’ character and continue to the end of the
|
||||
Comments start with the ‘#’ character and continue to the end of the
|
||||
line. Comments can appear anywhere except the <span class="emphasis"><em>display section</em></span> of a
|
||||
constructor (see <a class="xref" href="sleigh_constructors.html#sleigh_display_section" title="7.3. The Display Section">Section 7.3, “The Display Section”</a>) where the ‘#’ character will be
|
||||
constructor (see <a class="xref" href="sleigh_constructors.html#sleigh_display_section" title="7.3. The Display Section">Section 7.3, “The Display Section”</a>) where the ‘#’ character will be
|
||||
interpreted as something that should be printed in disassembly.
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_identifiers"></a>2.2. Identifiers</h3></div></div></div>
|
||||
<a name="sleigh_identifiers"></a>2.2. Identifiers</h3></div></div></div>
|
||||
<p>
|
||||
Identifiers are made up of letters a-z, capitals A-Z, digits 0-9 and
|
||||
the characters ‘.’ and ‘_’. An identifier can use these characters in
|
||||
the characters ‘.’ and ‘_’. An identifier can use these characters in
|
||||
any order and for any length, but it must not start with a digit.
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_strings"></a>2.3. Strings</h3></div></div></div>
|
||||
<a name="sleigh_strings"></a>2.3. Strings</h3></div></div></div>
|
||||
<p>
|
||||
String literals can be used, when specifying names and when specifying
|
||||
how disassembly should be printed, so that special characters are
|
||||
treated as literals. Strings are surrounded by the double quote
|
||||
character ‘”’ and all characters in between lose their special
|
||||
character ‘”’ and all characters in between lose their special
|
||||
meaning.
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_integers"></a>2.4. Integers</h3></div></div></div>
|
||||
<a name="sleigh_integers"></a>2.4. Integers</h3></div></div></div>
|
||||
<p>
|
||||
Integers are specified either in a decimal format or in a standard
|
||||
<span class="emphasis"><em>C-style</em></span> hexadecimal format by prepending the
|
||||
number with “0x”. Alternately, a binary representation of an integer
|
||||
number with “0x”. Alternately, a binary representation of an integer
|
||||
can be given by prepending the string of '0' and '1' characters with "0b".
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
@ -82,21 +82,21 @@ can be given by prepending the string of '0' and '1' characters with "0b".
|
||||
<p>
|
||||
Numbers are treated as unsigned
|
||||
except when used in patterns where they are treated as signed (see
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_bit_pattern" title="7.4. The Bit Pattern Section">Section 7.4, “The Bit Pattern Section”</a>). The number of bytes used to
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_bit_pattern" title="7.4. The Bit Pattern Section">Section 7.4, “The Bit Pattern Section”</a>). The number of bytes used to
|
||||
encode the integer when specifying the semantics of an instruction is
|
||||
inferred from other parts of the syntax (see
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_display_section" title="7.3. The Display Section">Section 7.3, “The Display Section”</a>). Otherwise, integers should
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_display_section" title="7.3. The Display Section">Section 7.3, “The Display Section”</a>). Otherwise, integers should
|
||||
be thought of as having arbitrary precision. Currently, SLEIGH stores
|
||||
integers internally with 64 bits of precision.
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_white_space"></a>2.5. White Space</h3></div></div></div>
|
||||
<a name="sleigh_white_space"></a>2.5. White Space</h3></div></div></div>
|
||||
<p>
|
||||
White space characters include space, tab, line-feed, vertical
|
||||
line-feed, and carriage-return (‘ ‘, ‘\t’, ‘\r’, ‘\v’,
|
||||
‘\n’). Variations in spacing have no effect on the parsing of the file
|
||||
line-feed, and carriage-return (‘ ‘, ‘\t’, ‘\r’, ‘\v’,
|
||||
‘\n’). Variations in spacing have no effect on the parsing of the file
|
||||
except in string literals.
|
||||
</p>
|
||||
</div>
|
||||
@ -106,15 +106,15 @@ except in string literals.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_preprocessing.html">Next</a>
|
||||
<a accesskey="p" href="sleigh.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_preprocessing.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">SLEIGH </td>
|
||||
<td width="40%" align="left" valign="top">SLEIGH </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 3. Preprocessing</td>
|
||||
<td width="40%" align="right" valign="top"> 3. Preprocessing</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>3. Preprocessing</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>3. Preprocessing</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_layout.html" title="2. Basic Specification Layout">
|
||||
<link rel="next" href="sleigh_definitions.html" title="4. Basic Definitions">
|
||||
<link rel="prev" href="sleigh_layout.html" title="2. Basic Specification Layout">
|
||||
<link rel="next" href="sleigh_definitions.html" title="4. Basic Definitions">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">3. Preprocessing</th></tr>
|
||||
<tr><th colspan="3" align="center">3. Preprocessing</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_layout.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_definitions.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_layout.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_definitions.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,16 +26,16 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_preprocessing"></a>3. Preprocessing</h2></div></div></div>
|
||||
<a name="sleigh_preprocessing"></a>3. Preprocessing</h2></div></div></div>
|
||||
<p>
|
||||
SLEIGH provides support for simple file inclusion, macros, and other
|
||||
basic preprocessing functions. These are all invoked with directives
|
||||
that start with the ‘@’ character, which must be the first character
|
||||
that start with the ‘@’ character, which must be the first character
|
||||
in the line.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_including_files"></a>3.1. Including Files</h3></div></div></div>
|
||||
<a name="sleigh_including_files"></a>3.1. Including Files</h3></div></div></div>
|
||||
<p>
|
||||
In general a single SLEIGH specification is contained in a single
|
||||
file, and the compiler is invoked on one file at a time. Multiple
|
||||
@ -54,7 +54,7 @@ own <span class="bold"><strong>@include</strong></span> directives.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_preprocessor_macros"></a>3.2. Preprocessor Macros</h3></div></div></div>
|
||||
<a name="sleigh_preprocessor_macros"></a>3.2. Preprocessor Macros</h3></div></div></div>
|
||||
<p>
|
||||
SLEIGH allows simple (unparameterized) macro definitions and
|
||||
expansions. A macro definition occurs on one line and starts with
|
||||
@ -62,7 +62,7 @@ the <span class="bold"><strong>@define</strong></span> directive. This is
|
||||
followed by an identifier for the macro and then a string to which the
|
||||
macro should expand. The string must either be a proper identifier
|
||||
itself or surrounded with double quotes. The macro can then be
|
||||
expanded with typical “$(identifier)” syntax at any other point in the
|
||||
expanded with typical “$(identifier)” syntax at any other point in the
|
||||
specification following the definition.
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
@ -72,9 +72,9 @@ define endian=$(ENDIAN);
|
||||
</pre></div>
|
||||
<p>
|
||||
This example defines a macro identified as <span class="emphasis"><em>ENDIAN</em></span>
|
||||
with the string “big”, and then expands the macro in a later SLEIGH
|
||||
with the string “big”, and then expands the macro in a later SLEIGH
|
||||
statement. Macro definitions can also be made from the command line
|
||||
and in the “.spec” file, allowing multiple specification variations to
|
||||
and in the “.spec” file, allowing multiple specification variations to
|
||||
be derived from one file. SLEIGH also has
|
||||
an <span class="bold"><strong>@undef</strong></span> directive which removes the
|
||||
definition of a macro from that point on in the file.
|
||||
@ -85,7 +85,7 @@ definition of a macro from that point on in the file.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_conditional_compilation"></a>3.3. Conditional Compilation</h3></div></div></div>
|
||||
<a name="sleigh_conditional_compilation"></a>3.3. Conditional Compilation</h3></div></div></div>
|
||||
<p>
|
||||
SLEIGH supports several directives that allow conditional inclusion of
|
||||
parts of a specification, based on the existence of a macro, or its
|
||||
@ -103,7 +103,7 @@ and <span class="bold"><strong>@endif</strong></span>.
|
||||
</p>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_ifdef"></a>3.3.1. @ifdef and @ifndef</h4></div></div></div>
|
||||
<a name="sleigh_ifdef"></a>3.3.1. @ifdef and @ifndef</h4></div></div></div>
|
||||
<p>
|
||||
The <span class="bold"><strong>@ifdef</strong></span> directive is followed by a
|
||||
macro identifier and evaluates to true if the macro is defined.
|
||||
@ -129,14 +129,14 @@ or <span class="bold"><strong>@elif</strong></span> directive (See below).
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_if"></a>3.3.2. @if</h4></div></div></div>
|
||||
<a name="sleigh_if"></a>3.3.2. @if</h4></div></div></div>
|
||||
<p>
|
||||
The <span class="bold"><strong>@if</strong></span> directive is followed by a
|
||||
boolean expression with macros as the variables and strings as the
|
||||
constants. Comparisons between macros and strings are currently
|
||||
limited to string equality or inequality. But individual comparisons
|
||||
can be combined arbitrarily using parentheses and the boolean
|
||||
operators ‘&&’, ‘||’, and ‘^^’. These represent a <span class="emphasis"><em>logical
|
||||
operators ‘&&’, ‘||’, and ‘^^’. These represent a <span class="emphasis"><em>logical
|
||||
and</em></span>, a <span class="emphasis"><em>logical or</em></span>, and
|
||||
a <span class="emphasis"><em>logical exclusive-or</em></span> operation respectively. It
|
||||
is possible to test whether a particular macro is defined within the
|
||||
@ -158,7 +158,7 @@ is defined.
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_else"></a>3.3.3. @else and @elif</h4></div></div></div>
|
||||
<a name="sleigh_else"></a>3.3.3. @else and @elif</h4></div></div></div>
|
||||
<p>
|
||||
An <span class="bold"><strong>@else</strong></span> directive splits the lines
|
||||
bounded by an <span class="bold"><strong>@if</strong></span> directive and
|
||||
@ -180,12 +180,12 @@ one <span class="bold"><strong>@else</strong></span>, which must occur after all
|
||||
the <span class="bold"><strong>@elif</strong></span> directives.
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
@if PROCESSOR == “mips”
|
||||
@ define ENDIAN “big”
|
||||
@elif ((PROCESSOR==”x86”)&&(OS!=”win”))
|
||||
@ define ENDIAN “little”
|
||||
@if PROCESSOR == “mips”
|
||||
@ define ENDIAN “big”
|
||||
@elif ((PROCESSOR==”x86”)&&(OS!=”win”))
|
||||
@ define ENDIAN “little”
|
||||
@else
|
||||
@ define ENDIAN “unknown”
|
||||
@ define ENDIAN “unknown”
|
||||
@endif
|
||||
</pre></div>
|
||||
<p>
|
||||
@ -198,15 +198,15 @@ the <span class="bold"><strong>@elif</strong></span> directives.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_layout.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_definitions.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_layout.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_definitions.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">2. Basic Specification Layout </td>
|
||||
<td width="40%" align="left" valign="top">2. Basic Specification Layout </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 4. Basic Definitions</td>
|
||||
<td width="40%" align="right" valign="top"> 4. Basic Definitions</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,34 +1,34 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>9. P-code Tables</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>9. P-code Tables</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_context.html" title="8. Using Context">
|
||||
<link rel="prev" href="sleigh_context.html" title="8. Using Context">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">9. P-code Tables</th></tr>
|
||||
<tr><th colspan="3" align="center">9. P-code Tables</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_context.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> </td>
|
||||
<a accesskey="p" href="sleigh_context.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_ref"></a>9. P-code Tables</h2></div></div></div>
|
||||
<a name="sleigh_ref"></a>9. P-code Tables</h2></div></div></div>
|
||||
<p>
|
||||
We list all the p-code operations by name along with the syntax for
|
||||
invoking them within the semantic section of a constructor definition
|
||||
(see <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>), and with a
|
||||
(see <a class="xref" href="sleigh_constructors.html#sleigh_semantic_section" title="7.7. The Semantic Section">Section 7.7, “The Semantic Section”</a>), and with a
|
||||
description of the operator. The terms <span class="emphasis"><em>v0</em></span>
|
||||
and <span class="emphasis"><em>v1</em></span> represent identifiers of individual input
|
||||
varnodes to the operation. In terms of syntax, <span class="emphasis"><em>v0</em></span>
|
||||
@ -46,7 +46,7 @@ to lowest.
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="syntaxref.htmltable"></a><p class="title"><b>Table 5. Semantic Expression Operators and Syntax</b></p>
|
||||
<a name="syntaxref.htmltable"></a><p class="title"><b>Table 5. Semantic Expression Operators and Syntax</b></p>
|
||||
<div class="table-contents"><table xml:id="syntaxref.htmltable" width="95%" frame="box" rules="all">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
@ -459,7 +459,7 @@ The following table lists the basic forms of a semantic statement.
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="statementref.htmltable"></a><p class="title"><b>Table 6. Basic Statements and Associated Operators</b></p>
|
||||
<a name="statementref.htmltable"></a><p class="title"><b>Table 6. Basic Statements and Associated Operators</b></p>
|
||||
<div class="table-contents"><table xml:id="statementref.htmltable" width="95%" frame="box" rules="all">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
@ -538,7 +538,7 @@ The following table lists the branching operations and the statements which invo
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="branchref.htmltable"></a><p class="title"><b>Table 7. Branching Statements</b></p>
|
||||
<a name="branchref.htmltable"></a><p class="title"><b>Table 7. Branching Statements</b></p>
|
||||
<div class="table-contents"><table xml:id="branchref.htmltable" width="95%" frame="box" rules="all">
|
||||
<col width="25%">
|
||||
<col width="25%">
|
||||
@ -592,14 +592,14 @@ The following table lists the branching operations and the statements which invo
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_context.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> </td>
|
||||
<a accesskey="p" href="sleigh_context.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">8. Using Context </td>
|
||||
<td width="40%" align="left" valign="top">8. Using Context </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> </td>
|
||||
<td width="40%" align="right" valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>5. Introduction to Symbols</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>5. Introduction to Symbols</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_definitions.html" title="4. Basic Definitions">
|
||||
<link rel="next" href="sleigh_tokens.html" title="6. Tokens and Fields">
|
||||
<link rel="prev" href="sleigh_definitions.html" title="4. Basic Definitions">
|
||||
<link rel="next" href="sleigh_tokens.html" title="6. Tokens and Fields">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">5. Introduction to Symbols</th></tr>
|
||||
<tr><th colspan="3" align="center">5. Introduction to Symbols</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_definitions.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_tokens.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_definitions.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_tokens.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_symbols"></a>5. Introduction to Symbols</h2></div></div></div>
|
||||
<a name="sleigh_symbols"></a>5. Introduction to Symbols</h2></div></div></div>
|
||||
<p>
|
||||
After the definition section, we are prepared to start writing the
|
||||
body of the specification. This part of the specification shows how
|
||||
@ -61,7 +61,7 @@ Formally a <span class="emphasis"><em>Specific Symbol</em></span> is defined as
|
||||
<p>
|
||||
The named registers that we defined earlier are the simplest examples
|
||||
of specific symbols (see
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_naming_registers" title="4.4. Naming Registers">Section 4.4, “Naming Registers”</a>). The symbol identifier
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_naming_registers" title="4.4. Naming Registers">Section 4.4, “Naming Registers”</a>). The symbol identifier
|
||||
itself is the string that will get printed in disassembly and the
|
||||
varnode associated with the symbol is the one constructed by the
|
||||
define statement.
|
||||
@ -79,7 +79,7 @@ instructions to specific symbols.
|
||||
<p>
|
||||
The set of instruction encodings that map to a single specific symbol
|
||||
is called an <span class="emphasis"><em>instruction pattern</em></span> and is described
|
||||
more fully in <a class="xref" href="sleigh_constructors.html#sleigh_bit_pattern" title="7.4. The Bit Pattern Section">Section 7.4, “The Bit Pattern Section”</a>. In most cases, this
|
||||
more fully in <a class="xref" href="sleigh_constructors.html#sleigh_bit_pattern" title="7.4. The Bit Pattern Section">Section 7.4, “The Bit Pattern Section”</a>. In most cases, this
|
||||
can be thought of as a mask on the bits of the instruction and a value
|
||||
that the remaining unmasked bits must match. At any rate, the family
|
||||
symbol identifier, when taken out of context, represents the entire
|
||||
@ -98,14 +98,14 @@ that simulate the instruction.
|
||||
<p>
|
||||
The symbol responsible for combining smaller family symbols is called
|
||||
a <span class="emphasis"><em>table</em></span>, which is fully described in
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_tables" title="7.8. Tables">Section 7.8, “Tables”</a>. Any <span class="emphasis"><em>table</em></span> symbol
|
||||
<a class="xref" href="sleigh_constructors.html#sleigh_tables" title="7.8. Tables">Section 7.8, “Tables”</a>. Any <span class="emphasis"><em>table</em></span> symbol
|
||||
can be used in the definition of other <span class="emphasis"><em>table</em></span>
|
||||
symbols until the root symbol is fully described. The root symbol has
|
||||
the predefined identifier <span class="emphasis"><em>instruction</em></span>.
|
||||
</p>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_notes_namespaces"></a>5.1. Notes on Namespaces</h3></div></div></div>
|
||||
<a name="sleigh_notes_namespaces"></a>5.1. Notes on Namespaces</h3></div></div></div>
|
||||
<p>
|
||||
Almost all identifiers live in the same global "scope". The global scope includes
|
||||
</p>
|
||||
@ -126,15 +126,15 @@ Almost all identifiers live in the same global "scope". The global scope include
|
||||
Names of registers
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: disc">
|
||||
Names of macros (see <a class="xref" href="sleigh_constructors.html#sleigh_macros" title="7.9. P-code Macros">Section 7.9, “P-code Macros”</a>)
|
||||
Names of macros (see <a class="xref" href="sleigh_constructors.html#sleigh_macros" title="7.9. P-code Macros">Section 7.9, “P-code Macros”</a>)
|
||||
</li>
|
||||
<li class="listitem" style="list-style-type: disc">
|
||||
Names of tables (see <a class="xref" href="sleigh_constructors.html#sleigh_tables" title="7.8. Tables">Section 7.8, “Tables”</a>)
|
||||
Names of tables (see <a class="xref" href="sleigh_constructors.html#sleigh_tables" title="7.8. Tables">Section 7.8, “Tables”</a>)
|
||||
</li>
|
||||
</ul></div></div>
|
||||
<p>
|
||||
All of the names in this scope must be unique. Each
|
||||
individual <span class="emphasis"><em>constructor</em></span> (defined in <a class="xref" href="sleigh_constructors.html" title="7. Constructors">Section 7, “Constructors”</a>)
|
||||
individual <span class="emphasis"><em>constructor</em></span> (defined in <a class="xref" href="sleigh_constructors.html" title="7. Constructors">Section 7, “Constructors”</a>)
|
||||
defines a local scope for operand names. As with most languages, a
|
||||
local symbol with the same name as a global
|
||||
symbol <span class="emphasis"><em>hides</em></span> the global symbol while that scope
|
||||
@ -143,13 +143,13 @@ is in effect.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_predefined_symbols"></a>5.2. Predefined Symbols</h3></div></div></div>
|
||||
<a name="sleigh_predefined_symbols"></a>5.2. Predefined Symbols</h3></div></div></div>
|
||||
<p>
|
||||
We list all of the symbols that are predefined by SLEIGH.
|
||||
</p>
|
||||
<div class="informalexample">
|
||||
<div class="table">
|
||||
<a name="predefine.htmltable"></a><p class="title"><b>Table 2. Predefined Symbols</b></p>
|
||||
<a name="predefine.htmltable"></a><p class="title"><b>Table 2. Predefined Symbols</b></p>
|
||||
<div class="table-contents"><table xml:id="predefine.htmltable" width="80%" frame="box" rules="all">
|
||||
<col width="30%">
|
||||
<col width="70%">
|
||||
@ -213,15 +213,15 @@ is the root instruction table.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_definitions.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_tokens.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_definitions.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_tokens.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">4. Basic Definitions </td>
|
||||
<td width="40%" align="left" valign="top">4. Basic Definitions </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 6. Tokens and Fields</td>
|
||||
<td width="40%" align="right" valign="top"> 6. Tokens and Fields</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>6. Tokens and Fields</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>6. Tokens and Fields</title>
|
||||
<link rel="stylesheet" type="text/css" href="DefaultStyle.css">
|
||||
<link rel="stylesheet" type="text/css" href="languages.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="up" href="sleigh.html" title="SLEIGH">
|
||||
<link rel="prev" href="sleigh_symbols.html" title="5. Introduction to Symbols">
|
||||
<link rel="next" href="sleigh_constructors.html" title="7. Constructors">
|
||||
<link rel="prev" href="sleigh_symbols.html" title="5. Introduction to Symbols">
|
||||
<link rel="next" href="sleigh_constructors.html" title="7. Constructors">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr><th colspan="3" align="center">6. Tokens and Fields</th></tr>
|
||||
<tr><th colspan="3" align="center">6. Tokens and Fields</th></tr>
|
||||
<tr>
|
||||
<td width="20%" align="left">
|
||||
<a accesskey="p" href="sleigh_symbols.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_constructors.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_symbols.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="sleigh_constructors.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -26,10 +26,10 @@
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="sleigh_tokens"></a>6. Tokens and Fields</h2></div></div></div>
|
||||
<a name="sleigh_tokens"></a>6. Tokens and Fields</h2></div></div></div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_defining_tokens"></a>6.1. Defining Tokens and Fields</h3></div></div></div>
|
||||
<a name="sleigh_defining_tokens"></a>6.1. Defining Tokens and Fields</h3></div></div></div>
|
||||
<p>
|
||||
A <span class="emphasis"><em>token</em></span> is one of the byte-sized pieces that make
|
||||
up the machine code instructions being modeled.
|
||||
@ -57,7 +57,7 @@ field and the range of bits within the token making up the field. The
|
||||
size of a field does <span class="emphasis"><em>not</em></span> need to be a multiple of
|
||||
8. The range is inclusive where the least significant bit in the token
|
||||
is labeled 0. When defining tokens that are bigger than 1 byte, the
|
||||
global endianess setting (See <a class="xref" href="sleigh_definitions.html#sleigh_endianess_definition" title="4.1. Endianess Definition">Section 4.1, “Endianess Definition”</a>)
|
||||
global endianess setting (See <a class="xref" href="sleigh_definitions.html#sleigh_endianess_definition" title="4.1. Endianess Definition">Section 4.1, “Endianess Definition”</a>)
|
||||
will affect this labeling. Although it is rarely required, it is possible to override
|
||||
the global endianess setting for a specific token by appending either the qualifier
|
||||
<span class="bold"><strong>endian=little</strong></span> or <span class="bold"><strong>endian=big</strong></span>
|
||||
@ -88,11 +88,11 @@ different names.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_fields_family"></a>6.2. Fields as Family Symbols</h3></div></div></div>
|
||||
<a name="sleigh_fields_family"></a>6.2. Fields as Family Symbols</h3></div></div></div>
|
||||
<p>
|
||||
Fields are the most basic form of family symbol; they define a natural
|
||||
map from instruction bits to a specific symbol as follows. We take the
|
||||
set of bits within the instruction as given by the field’s defining
|
||||
set of bits within the instruction as given by the field’s defining
|
||||
range and treat them as an integer encoding. The resulting integer is
|
||||
both the display portion and the semantic meaning of the specific
|
||||
symbol. The display string is obtained by converting the integer into
|
||||
@ -113,7 +113,7 @@ the <span class="bold"><strong>dec</strong></span> attribute is not supported]
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_alternate_meanings"></a>6.3. Attaching Alternate Meanings to Fields</h3></div></div></div>
|
||||
<a name="sleigh_alternate_meanings"></a>6.3. Attaching Alternate Meanings to Fields</h3></div></div></div>
|
||||
<p>
|
||||
The default interpretation of a field is probably the most natural but
|
||||
of course processors interpret fields within an instruction in a wide
|
||||
@ -124,7 +124,7 @@ interpretations must be built up out of tables.
|
||||
</p>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_attaching_registers"></a>6.3.1. Attaching Registers</h4></div></div></div>
|
||||
<a name="sleigh_attaching_registers"></a>6.3.1. Attaching Registers</h4></div></div></div>
|
||||
<p>
|
||||
Probably <span class="emphasis"><em>the</em></span> most common processor interpretation
|
||||
of a field is as an encoding of a particular register. In SLEIGH this
|
||||
@ -140,7 +140,7 @@ space separated list of field identifiers surrounded by square
|
||||
brackets. A <span class="emphasis"><em>registerlist</em></span> must be a square bracket
|
||||
surrounded and space separated list of register identifiers as created
|
||||
with <span class="bold"><strong>define</strong></span> statements (see Section
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_naming_registers" title="4.4. Naming Registers">Section 4.4, “Naming Registers”</a>). For each field in
|
||||
<a class="xref" href="sleigh_definitions.html#sleigh_naming_registers" title="4.4. Naming Registers">Section 4.4, “Naming Registers”</a>). For each field in
|
||||
the <span class="emphasis"><em>fieldlist</em></span>, instead of having the display and
|
||||
semantic meaning of an integer, the field becomes a look-up table for
|
||||
the given list of registers. The original integer interpretation is
|
||||
@ -152,7 +152,7 @@ display and semantic meaning of the field are now taken from the new
|
||||
register.
|
||||
</p>
|
||||
<p>
|
||||
A particular integer can remain unspecified by putting a ‘_’ character
|
||||
A particular integer can remain unspecified by putting a ‘_’ character
|
||||
in the appropriate position of the register list or also if the length
|
||||
of the register list is less than the integer. A specific integer
|
||||
encoding of the field that is unspecified like this
|
||||
@ -163,7 +163,7 @@ of the instruction.
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_attaching_integers"></a>6.3.2. Attaching Other Integers</h4></div></div></div>
|
||||
<a name="sleigh_attaching_integers"></a>6.3.2. Attaching Other Integers</h4></div></div></div>
|
||||
<p>
|
||||
Sometimes a processor interprets a field as an integer but not the
|
||||
integer given by the default interpretation. A different integer
|
||||
@ -180,12 +180,12 @@ register interpretation is assigned to fields with
|
||||
an <span class="bold"><strong>attach variables</strong></span> statement, the
|
||||
integers in the list are assigned to each field specified in
|
||||
the <span class="emphasis"><em>fieldlist</em></span>. [Currently SLEIGH does not support
|
||||
unspecified positions in the list using a ‘_’]
|
||||
unspecified positions in the list using a ‘_’]
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="sleigh_attaching_names"></a>6.3.3. Attaching Names</h4></div></div></div>
|
||||
<a name="sleigh_attaching_names"></a>6.3.3. Attaching Names</h4></div></div></div>
|
||||
<p>
|
||||
It is possible to just modify the display characteristics of a field
|
||||
without changing the semantic meaning. The need for this is rare, but
|
||||
@ -196,7 +196,7 @@ appropriate to define overlapping fields, one of which is defined to
|
||||
have no semantic meaning. The most convenient way to break down the
|
||||
required disassembly may not be the most convenient way to break down
|
||||
the semantics. It is also possible to have symbols with semantic
|
||||
meaning but no display meaning (see <a class="xref" href="sleigh_constructors.html#sleigh_invisible_operands" title="7.4.5. Invisible Operands">Section 7.4.5, “Invisible Operands”</a>).
|
||||
meaning but no display meaning (see <a class="xref" href="sleigh_constructors.html#sleigh_invisible_operands" title="7.4.5. Invisible Operands">Section 7.4.5, “Invisible Operands”</a>).
|
||||
</p>
|
||||
<p>
|
||||
At any rate we can list the display interpretation of a field directly
|
||||
@ -218,7 +218,7 @@ encodings.
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="sleigh_context_variables"></a>6.4. Context Variables</h3></div></div></div>
|
||||
<a name="sleigh_context_variables"></a>6.4. Context Variables</h3></div></div></div>
|
||||
<p>
|
||||
SLEIGH supports the concept of <span class="emphasis"><em>context
|
||||
variables</em></span>. For the most part processor instructions can be
|
||||
@ -254,12 +254,12 @@ By default, globally setting a context variable affects instruction decoding
|
||||
from the point of the change, forward,
|
||||
following the flow of the instructions, but if the variable is labeled as
|
||||
<span class="bold"><strong>noflow</strong></span>, any change is limited to a
|
||||
single instruction. (See <a class="xref" href="sleigh_context.html#sleigh_contextflow" title="8.3.1. Context Flow">Section 8.3.1, “Context Flow”</a>)
|
||||
single instruction. (See <a class="xref" href="sleigh_context.html#sleigh_contextflow" title="8.3.1. Context Flow">Section 8.3.1, “Context Flow”</a>)
|
||||
</p>
|
||||
<p>
|
||||
Once the context variable is defined, in terms of the specification
|
||||
syntax, it can be treated as if it were just another field. See
|
||||
<a class="xref" href="sleigh_context.html" title="8. Using Context">Section 8, “Using Context”</a>, for a complete discussion of how to
|
||||
<a class="xref" href="sleigh_context.html" title="8. Using Context">Section 8, “Using Context”</a>, for a complete discussion of how to
|
||||
use context variables.
|
||||
</p>
|
||||
</div>
|
||||
@ -269,15 +269,15 @@ use context variables.
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<a accesskey="p" href="sleigh_symbols.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_constructors.html">Next</a>
|
||||
<a accesskey="p" href="sleigh_symbols.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="sleigh_constructors.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">5. Introduction to Symbols </td>
|
||||
<td width="40%" align="left" valign="top">5. Introduction to Symbols </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="sleigh.html">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> 7. Constructors</td>
|
||||
<td width="40%" align="right" valign="top"> 7. Constructors</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user