<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XED2: XED2 User Guide - Tue Nov 22 12:27:08 2011 </title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<h1>Iforms</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxed__iform__info__s.html">xed_iform_info_s</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Statically available information about iforms.  <a href="structxed__iform__info__s.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef XED_DLL_EXPORT <a class="el" href="structxed__iform__info__s.html">xed_iform_info_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Statically available information about iforms.  <a href="#gc38252fa701c4490c72e6a15a36e2695"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT xed_uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#g798d84c0314a0aaadabfad2fa7536b17">xed_iform_first_per_iclass</a> (<a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a> iclass)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the first of the iforms for a particular iclass.  <a href="#g798d84c0314a0aaadabfad2fa7536b17"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT const <a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#ge76693900095e4049ffa6c92af829a2e">xed_iform_map</a> (<a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> iform)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Map the <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> to a pointer to a <a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a> which indicates the <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a>, the <a class="el" href="xed-category-enum_8h.html#c3ab65dd6b957d30b5c148e3efce5076">xed_category_enum_t</a> and the <a class="el" href="xed-extension-enum_8h.html#00c2383e4d7783b7655c6465d3eaddde">xed_extension_enum_t</a> for the iform.  <a href="#ge76693900095e4049ffa6c92af829a2e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT xed_uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#gcbff211f50fc816195ce85f75406893b">xed_iform_max_per_iclass</a> (<a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a> iclass)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the maximum number of iforms for a particular iclass.  <a href="#gcbff211f50fc816195ce85f75406893b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT <a class="el" href="xed-category-enum_8h.html#c3ab65dd6b957d30b5c148e3efce5076">xed_category_enum_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#g7d213d088d3b8ca6269fbe0e6b0c9d86">xed_iform_to_category</a> (<a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> iform)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the category for a given iform.  <a href="#g7d213d088d3b8ca6269fbe0e6b0c9d86"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT <a class="el" href="xed-extension-enum_8h.html#00c2383e4d7783b7655c6465d3eaddde">xed_extension_enum_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#g1610f69e72c6456a23997a3c32681c06">xed_iform_to_extension</a> (<a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> iform)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the extension for a given iform.  <a href="#g1610f69e72c6456a23997a3c32681c06"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a> XED_INLINE&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#g82541617c105caefb5ec16bdd5509339">xed_iform_to_iclass</a> (<a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> iform)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the iclass for a given iform.  <a href="#g82541617c105caefb5ec16bdd5509339"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">XED_DLL_EXPORT <a class="el" href="xed-isa-set-enum_8h.html#aed8e1fff998b4955b324469b2b0ce20">xed_isa_set_enum_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__IFORM.html#g0c5f174ec60781b21a8fe3db9a7ecf75">xed_iform_to_isa_set</a> (<a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> iform)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the isa_set for a given iform.  <a href="#g0c5f174ec60781b21a8fe3db9a7ecf75"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
XED classifies instructions as iclasses (ADD, SUB, MUL, etc.) of type <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a>. To get more information about instructions and their operands, XED creates iforms of type <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>. The iforms are supposed to aid in creating dispatch tables for instructions. You can often use a flat array indexed by iform. The maximum iform is <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6dce5b6c670687c7cbae07418033e31805">XED_IFORM_LAST</a>.<p>
The iforms some times do not uniquely identify instructions. For example, many instructions in the ISA are "scalable" in that their operand width depends on the machine mode and the prefixes. The memory operation of these scalable opcodes is either 16 bits, 32 bits or 64 bits. The same opcode can represent several instrutions if you factor in the machine mode and prefixes. Those instructions often map to a single iform and need to be further refined by the <a class="el" href="group__OPERANDS.html#g3c1fa3ab644e1ae33a4776fe21267ffe">xed_operand_values_get_effective_operand_width</a> function.<p>
The iform enumeration <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> is dense and it has some built-in structure. All the iforms for a particular iclass are sequential. The function <a class="el" href="group__IFORM.html#gcbff211f50fc816195ce85f75406893b">xed_iform_max_per_iclass()</a> indicates the number of iforms for a particular iclass.<p>
To get the first iform of a particular iclass you can use <a class="el" href="group__IFORM.html#g798d84c0314a0aaadabfad2fa7536b17">xed_iform_first_per_iclass()</a> at runtime. There is also the <a class="el" href="xed-iformfl-enum_8h.html#5d4c792a0de45648117a69fb55646473">xed_iformfl_enum_t</a> which indicates for every iclass, the first and last iform in the <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>.<p>
Given an iform, to get <a class="el" href="xed-category-enum_8h.html#c3ab65dd6b957d30b5c148e3efce5076">xed_category_enum_t</a>, <a class="el" href="xed-extension-enum_8h.html#00c2383e4d7783b7655c6465d3eaddde">xed_extension_enum_t</a>, and <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a> information, you can use <a class="el" href="group__IFORM.html#ge76693900095e4049ffa6c92af829a2e">xed_iform_map()</a>, or there are accessors listed below to get the iclass, category or extension from that table directly. <hr><h2>Typedef Documentation</h2>
<a class="anchor" name="gc38252fa701c4490c72e6a15a36e2695"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_info_t" ref="gc38252fa701c4490c72e6a15a36e2695" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef struct XED_DLL_EXPORT <a class="el" href="structxed__iform__info__s.html">xed_iform_info_s</a>  <a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Statically available information about iforms. 
<p>
Values are returned by <a class="el" href="group__IFORM.html#ge76693900095e4049ffa6c92af829a2e">xed_iform_map()</a>.     </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g798d84c0314a0aaadabfad2fa7536b17"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_first_per_iclass" ref="g798d84c0314a0aaadabfad2fa7536b17" args="(xed_iclass_enum_t iclass)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT xed_uint32_t xed_iform_first_per_iclass           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iclass</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the first of the iforms for a particular iclass. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).     </td>
  </tr>
</table>
<a class="anchor" name="ge76693900095e4049ffa6c92af829a2e"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_map" ref="ge76693900095e4049ffa6c92af829a2e" args="(xed_iform_enum_t iform)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT const <a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a>* xed_iform_map           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iform</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Map the <a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a> to a pointer to a <a class="el" href="group__IFORM.html#gc38252fa701c4490c72e6a15a36e2695">xed_iform_info_t</a> which indicates the <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a>, the <a class="el" href="xed-category-enum_8h.html#c3ab65dd6b957d30b5c148e3efce5076">xed_category_enum_t</a> and the <a class="el" href="xed-extension-enum_8h.html#00c2383e4d7783b7655c6465d3eaddde">xed_extension_enum_t</a> for the iform. 
<p>
Returns 0 if the iform is not a valid iform.     </td>
  </tr>
</table>
<a class="anchor" name="gcbff211f50fc816195ce85f75406893b"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_max_per_iclass" ref="gcbff211f50fc816195ce85f75406893b" args="(xed_iclass_enum_t iclass)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT xed_uint32_t xed_iform_max_per_iclass           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iclass</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the maximum number of iforms for a particular iclass. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).     </td>
  </tr>
</table>
<a class="anchor" name="g7d213d088d3b8ca6269fbe0e6b0c9d86"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_to_category" ref="g7d213d088d3b8ca6269fbe0e6b0c9d86" args="(xed_iform_enum_t iform)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT <a class="el" href="xed-category-enum_8h.html#c3ab65dd6b957d30b5c148e3efce5076">xed_category_enum_t</a> xed_iform_to_category           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iform</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the category for a given iform. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).     </td>
  </tr>
</table>
<a class="anchor" name="g1610f69e72c6456a23997a3c32681c06"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_to_extension" ref="g1610f69e72c6456a23997a3c32681c06" args="(xed_iform_enum_t iform)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT <a class="el" href="xed-extension-enum_8h.html#00c2383e4d7783b7655c6465d3eaddde">xed_extension_enum_t</a> xed_iform_to_extension           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iform</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the extension for a given iform. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).     </td>
  </tr>
</table>
<a class="anchor" name="g82541617c105caefb5ec16bdd5509339"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_to_iclass" ref="g82541617c105caefb5ec16bdd5509339" args="(xed_iform_enum_t iform)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">static <a class="el" href="xed-iclass-enum_8h.html#aac14887efb58dc90badb71262573543">xed_iclass_enum_t</a> XED_INLINE xed_iform_to_iclass           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iform</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the iclass for a given iform. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input). 
<p>
Definition at line <a class="el" href="xed-iform-map_8h-source.html#l00078">78</a> of file <a class="el" href="xed-iform-map_8h-source.html">xed-iform-map.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="g0c5f174ec60781b21a8fe3db9a7ecf75"></a><!-- doxytag: member="xed-iform-map.h::xed_iform_to_isa_set" ref="g0c5f174ec60781b21a8fe3db9a7ecf75" args="(xed_iform_enum_t iform)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">XED_DLL_EXPORT <a class="el" href="xed-isa-set-enum_8h.html#aed8e1fff998b4955b324469b2b0ce20">xed_isa_set_enum_t</a> xed_iform_to_isa_set           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="xed-iform-enum_8h.html#4e231bca35f78f25641be3eabcb35f6d">xed_iform_enum_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iform</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the isa_set for a given iform. 
<p>
This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Nov 22 12:27:08 2011 for XED2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>
