-
Notifications
You must be signed in to change notification settings - Fork 0
/
AssemblerX86_8h_source.html
397 lines (397 loc) · 59 KB
/
AssemblerX86_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ROSE: AssemblerX86.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="ROSE"/>
<link href="roseDoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">ROSE<span id="projectnumber"> 0.11.145.141</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,true,'search.html','Search');
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_8509b06bafa958d2011203a730bf5778.html">frontend</a></li><li class="navelem"><a class="el" href="dir_01d256553a57eab573128ced8c11ea22.html">Disassemblers</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">AssemblerX86.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/* Assembly specific to the x86 architecture. */</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#ifndef ROSE_BinaryAnalysis_AssemblerX86_H</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#define ROSE_BinaryAnalysis_AssemblerX86_H</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <featureTests.h></span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#ifdef ROSE_ENABLE_BINARY_ANALYSIS</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "Assembler.h"</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <Rose/BinaryAnalysis/InstructionEnumsX86.h></span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceRose.html">Rose</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>BinaryAnalysis {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="foldopen" id="foldopen00031" data-start="{" data-end="};">
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html"> 31</a></span><span class="keyword">class </span><a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html">AssemblerX86</a>: <span class="keyword">public</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Assembler</a> {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html">AssemblerX86</a>()</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> : honor_operand_types(<span class="keyword">false</span>) {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">if</span> (defns.size()==0)</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> initAssemblyRules();</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">virtual</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html">~AssemblerX86</a>() {}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a22940e93e91309b0fab5e6cf969bc94a"> 42</a></span> <span class="keyword">virtual</span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a22940e93e91309b0fab5e6cf969bc94a">assembleOne</a>(<a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a>*);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="foldopen" id="foldopen00049" data-start="{" data-end="}">
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#aeb9308a744cf6035ffd37aeb4346157b"> 49</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#aeb9308a744cf6035ffd37aeb4346157b">set_honor_operand_types</a>(<span class="keywordtype">bool</span> b) {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> honor_operand_types = b;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="foldopen" id="foldopen00055" data-start="{" data-end="}">
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a803b72b81448729bc5294bf4527093e4"> 55</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a803b72b81448729bc5294bf4527093e4">get_honor_operand_types</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">return</span> honor_operand_types;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#af89e2f0ae45e21671b75fc3371b63c52"> 60</a></span> <span class="keyword">virtual</span> SgUnsignedCharList <a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#af89e2f0ae45e21671b75fc3371b63c52">assembleProgram</a>(<span class="keyword">const</span> std::string &source);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">/*========================================================================================================================</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> * Members for defining instructions.</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> *========================================================================================================================*/</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="comment">/* These bit masks specify how the opcode part of the encoding is generated. The base opcode bytes are specified with</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> * a 64-bit value so that up to eight bytes of opcode can be specified. The bytes generated come from the 64-bit opcode</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> * value in big-endian order but without leading zero bytes. If the 64-bit opcode is zero then a single zero byte is</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> * generated. For instance, the MONITOR instruction has an opcode of 0x0f01c8, generating the encoding 0x0f, 0x01, 0xc8. */</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e_mask = 0x00000070; <span class="comment">/* mask for numeric value (n) part of En field. */</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e_pres = 0x00000080; <span class="comment">/* bit set if En modification was specified. */</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e0 = 0x00000000 | od_e_pres;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e1 = 0x00000010 | od_e_pres;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e2 = 0x00000020 | od_e_pres;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e3 = 0x00000030 | od_e_pres;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e4 = 0x00000040 | od_e_pres;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e5 = 0x00000050 | od_e_pres;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e6 = 0x00000060 | od_e_pres;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_e7 = 0x00000070 | od_e_pres;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">static</span> <span class="keywordtype">size_t</span> od_e_val(<span class="keywordtype">unsigned</span> opcode_mods) { <span class="keywordflow">return</span> (opcode_mods & od_e_mask)>>4; } </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rex_pres = 0x00000001; <span class="comment">/* bit set if REX prefix is present. */</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rex_mask = 0x00000f00; <span class="comment">/* mask for low nyble of REX byte. */</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rex = 0x00000000 | od_rex_pres;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexb = 0x00000100 | od_rex_pres;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexx = 0x00000200 | od_rex_pres;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexxb = 0x00000300 | od_rex_pres;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexr = 0x00000400 | od_rex_pres;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexrb = 0x00000500 | od_rex_pres;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexrx = 0x00000600 | od_rex_pres;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexrxb = 0x00000700 | od_rex_pres;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexw = 0x00000800 | od_rex_pres;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwb = 0x00000900 | od_rex_pres;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwx = 0x00000a00 | od_rex_pres;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwxb = 0x00000b00 | od_rex_pres;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwr = 0x00000c00 | od_rex_pres;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwrb = 0x00000d00 | od_rex_pres;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwrx = 0x00000e00 | od_rex_pres;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rexwrxb = 0x00000f00 | od_rex_pres;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">static</span> uint8_t od_rex_byte(<span class="keywordtype">unsigned</span> opcode_mods) { <span class="keywordflow">return</span> 0x40 | ((opcode_mods & od_rex_mask) >> 8); }</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_modrm = 0x00000002;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_c_mask = 0x00007000;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_cb = 0x00001000;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_cw = 0x00002000;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_cd = 0x00003000;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_cp = 0x00004000;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_co = 0x00005000;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_ct = 0x00006000;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_i_mask = 0x00070000;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_ib = 0x00010000;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_iw = 0x00020000;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_id = 0x00030000;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_io = 0x00040000;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_r_mask = 0x00700000;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rb = 0x00100000;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rw = 0x00200000;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_rd = 0x00300000;</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_ro = 0x00400000;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> od_i = 0x00000004;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">enum</span> OperandDefn </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> od_none, </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> od_AL, </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> od_AX, </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> od_EAX, </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> od_RAX, </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> od_DX, </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> od_CS, </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> od_DS, </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> od_ES, </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> od_FS, </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> od_GS, </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> od_SS, </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> od_rel8, </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> od_rel16, </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> od_rel32, </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> od_rel64, </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> od_ptr16_16, </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> od_ptr16_32, </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> od_ptr16_64, </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> od_r8, </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> od_r16, </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> od_r32, </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> od_r64, </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> od_imm8, </div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> od_imm16, </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> od_imm32, </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> od_imm64, </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> od_r_m8, </div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> od_r_m16, </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> od_r_m32, </div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> od_r_m64, </div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> od_m, </div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> od_m8, </div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> od_m16, </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> od_m32, </div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> od_m64, </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> od_m128, </div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> od_m16_16, </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> od_m16_32, </div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> od_m16_64, </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> od_m16a16, </div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> od_m16a32, </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> od_m32a32, </div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> od_m16a64, </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> od_moffs8, </div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> od_moffs16, </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> od_moffs32, </div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> od_moffs64, </div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> od_sreg, </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> od_m32fp, </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> od_m64fp, </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> od_m80fp, </div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> od_st0, </div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> od_st1, </div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> od_st2, </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> od_st3, </div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> od_st4, </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> od_st5, </div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> od_st6, </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> od_st7, </div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> od_sti, </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> od_mm, </div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> od_mm_m32, </div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> od_mm_m64, </div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> od_xmm, </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> od_xmm_m16, </div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> od_xmm_m32, </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> od_xmm_m64, </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> od_xmm_m128, </div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="comment">/* The following are not documented in section 3.1.1.2 but are used elsewhere in the manual */</span></div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> od_XMM0, </div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> od_0, </div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> od_1, </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> od_m80, </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> od_dec, </div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> od_m80bcd, </div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> od_m2byte, </div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> od_m14_28byte, </div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> od_m94_108byte, </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> od_m512byte, </div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> od_r16_m16, </div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> od_r32_m8, </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> od_r32_m16, </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> od_r64_m16, </div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> od_CR0, </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> od_CR7, </div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> od_CR8, </div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> od_CR0CR7, </div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> od_DR0DR7, </div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> od_reg, </div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> od_CL, </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> };</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> </div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> COMPAT_LEGACY = 0x01; </div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> COMPAT_64 = 0x02; </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="keyword">static</span> uint8_t build_modrm(<span class="keywordtype">unsigned</span> mod, <span class="keywordtype">unsigned</span> reg, <span class="keywordtype">unsigned</span> rm) {</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="keywordflow">return</span> ((mod&0x3)<<6) | ((reg&0x7)<<3) | (rm&0x7);</div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> }</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> </div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> modrm_mod(uint8_t modrm) { <span class="keywordflow">return</span> modrm>>6; }</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> </div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> modrm_reg(uint8_t modrm) { <span class="keywordflow">return</span> (modrm>>3) & 0x7; }</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> </div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> modrm_rm(uint8_t modrm) { <span class="keywordflow">return</span> modrm & 0x7; }</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> </div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="keyword">static</span> uint8_t build_sib(<span class="keywordtype">unsigned</span> ss, <span class="keywordtype">unsigned</span> index, <span class="keywordtype">unsigned</span> base) {</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> <span class="keywordflow">return</span> ((ss&0x3)<<6) | ((index&0x7)<<3) | (base&0x7);</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> }</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> </div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> sib_ss(uint8_t sib) {<span class="keywordflow">return</span> sib>>6; }</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> </div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> sib_index(uint8_t sib) { <span class="keywordflow">return</span> (sib>>3) & 0x7; }</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> </div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> sib_base(uint8_t sib) { <span class="keywordflow">return</span> sib & 0x7; }</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> </div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> <span class="keyword">class </span>InsnDefn {</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> InsnDefn(<span class="keyword">const</span> std::string &mnemonic, <a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis.html#a60d901bdb3369239fda973246fc9d014">X86InstructionKind</a> kind, <span class="keywordtype">unsigned</span> compatibility, uint64_t opcode,</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> <span class="keywordtype">unsigned</span> opcode_modifiers, OperandDefn op1=od_none, OperandDefn op2=od_none, OperandDefn op3=od_none,</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> OperandDefn op4=od_none)</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> : mnemonic(mnemonic), kind(kind), compatibility(compatibility), opcode(opcode), opcode_modifiers(opcode_modifiers) {</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <span class="keywordflow">if</span> (op1) operands.push_back(op1);</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="keywordflow">if</span> (op2) operands.push_back(op2);</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <span class="keywordflow">if</span> (op3) operands.push_back(op3);</div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="keywordflow">if</span> (op4) operands.push_back(op4);</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> }</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> std::string to_str() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <span class="keywordtype">void</span> set_location(<span class="keyword">const</span> std::string &s) {</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> location = s;</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> }</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> std::string mnemonic;</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> <a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis.html#a60d901bdb3369239fda973246fc9d014">X86InstructionKind</a> kind;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> <span class="keywordtype">unsigned</span> compatibility;</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> uint64_t opcode;</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> <span class="keywordtype">unsigned</span> opcode_modifiers;</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> std::vector<OperandDefn> operands;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> std::string location; <span class="comment">/* location of instruction documentation */</span></div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> };</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> </div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> <span class="keyword">enum</span> MemoryReferencePattern </div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> {</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> mrp_unknown,</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> mrp_disp, <span class="comment">/* displacement */</span></div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> mrp_index, <span class="comment">/* register*scale */</span></div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> mrp_index_disp, <span class="comment">/* register*scale + displacement */</span></div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> mrp_base, <span class="comment">/* register */</span></div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> mrp_base_disp, <span class="comment">/* register + displacement */</span></div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> mrp_base_index, <span class="comment">/* register + register*scale */</span></div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> mrp_base_index_disp <span class="comment">/* register + register*scale + displacement */</span></div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> };</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> </div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> <span class="keyword">typedef</span> std::vector<const InsnDefn*> DictionaryPage;</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> </div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <span class="keyword">typedef</span> std::map<X86InstructionKind, DictionaryPage> InsnDictionary;</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> </div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules();</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part1();</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part2();</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part3();</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part4();</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part5();</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part6();</div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part7();</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part8();</div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keyword">static</span> <span class="keywordtype">void</span> initAssemblyRules_part9();</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> </div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <span class="keyword">static</span> <span class="keywordtype">void</span> define(<span class="keyword">const</span> InsnDefn *d) {</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> defns[d->kind].push_back(d);</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> }</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> </div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> <span class="keyword">static</span> std::string to_str(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis.html#a60d901bdb3369239fda973246fc9d014">X86InstructionKind</a>);</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> </div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> SgUnsignedCharList fixup_prefix_bytes(<a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a> *insn, SgUnsignedCharList source);</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> </div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> SgUnsignedCharList assemble(<a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a> *insn, <span class="keyword">const</span> InsnDefn *defn);</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> </div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> <span class="keywordtype">void</span> matches(<span class="keyword">const</span> InsnDefn *defn, <a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a> *insn, int64_t *disp, int64_t *imm) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> </div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> <span class="keywordtype">bool</span> matches(OperandDefn, <a class="code hl_class" href="classSgAsmExpression.html">SgAsmExpression</a>*, <a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a>*, int64_t *disp, int64_t *imm) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> </div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> matches_rel(<a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a>*, int64_t val, <span class="keywordtype">size_t</span> nbytes);</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> </div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> <span class="keyword">static</span> MemoryReferencePattern parse_memref(<a class="code hl_class" href="classSgAsmInstruction.html">SgAsmInstruction</a> *insn, <a class="code hl_class" href="classSgAsmMemoryReferenceExpression.html">SgAsmMemoryReferenceExpression</a> *expr,</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <a class="code hl_class" href="classSgAsmRegisterReferenceExpression.html">SgAsmRegisterReferenceExpression</a> **base_reg<span class="comment">/*out*/</span>,</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <a class="code hl_class" href="classSgAsmRegisterReferenceExpression.html">SgAsmRegisterReferenceExpression</a> **index_reg<span class="comment">/*out*/</span>,</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> <a class="code hl_class" href="classSgAsmValueExpression.html">SgAsmValueExpression</a> **scale<span class="comment">/*out*/</span>, <a class="code hl_class" href="classSgAsmValueExpression.html">SgAsmValueExpression</a> **displacement<span class="comment">/*out*/</span>);</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> </div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> uint8_t build_modrm(<span class="keyword">const</span> InsnDefn*, <a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a>*, <span class="keywordtype">size_t</span> argno,</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> uint8_t *sib, int64_t *displacement, uint8_t *rex) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> </div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <span class="keywordtype">void</span> build_modreg(<span class="keyword">const</span> InsnDefn*, <a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a>*, <span class="keywordtype">size_t</span> argno, uint8_t *modrm, uint8_t *rex) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> </div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> uint8_t segment_override(<a class="code hl_class" href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a>*);</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> </div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> <span class="keyword">static</span> InsnDictionary defns; </div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> <span class="keywordtype">bool</span> honor_operand_types; </div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span>};</div>
</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> </div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> </div>
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1AssemblerX86_html"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html">Rose::BinaryAnalysis::AssemblerX86</a></div><div class="ttdoc">This class contains methods for assembling x86 instructions (SgAsmX86Instruction).</div><div class="ttdef"><b>Definition</b> <a href="AssemblerX86_8h_source.html#l00031">AssemblerX86.h:31</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1AssemblerX86_html_a22940e93e91309b0fab5e6cf969bc94a"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a22940e93e91309b0fab5e6cf969bc94a">Rose::BinaryAnalysis::AssemblerX86::assembleOne</a></div><div class="ttdeci">virtual SgUnsignedCharList assembleOne(SgAsmInstruction *)</div><div class="ttdoc">Assemble an instruction (SgAsmInstruction) into byte code.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1AssemblerX86_html_a803b72b81448729bc5294bf4527093e4"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#a803b72b81448729bc5294bf4527093e4">Rose::BinaryAnalysis::AssemblerX86::get_honor_operand_types</a></div><div class="ttdeci">bool get_honor_operand_types() const</div><div class="ttdoc">Returns true if the assembler is honoring operand data types, or false if the assembler is using the ...</div><div class="ttdef"><b>Definition</b> <a href="AssemblerX86_8h_source.html#l00055">AssemblerX86.h:55</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1AssemblerX86_html_aeb9308a744cf6035ffd37aeb4346157b"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#aeb9308a744cf6035ffd37aeb4346157b">Rose::BinaryAnalysis::AssemblerX86::set_honor_operand_types</a></div><div class="ttdeci">void set_honor_operand_types(bool b)</div><div class="ttdoc">Causes the assembler to honor (if true) or disregard (if false) the data types of operands when assem...</div><div class="ttdef"><b>Definition</b> <a href="AssemblerX86_8h_source.html#l00049">AssemblerX86.h:49</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1AssemblerX86_html_af89e2f0ae45e21671b75fc3371b63c52"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1AssemblerX86.html#af89e2f0ae45e21671b75fc3371b63c52">Rose::BinaryAnalysis::AssemblerX86::assembleProgram</a></div><div class="ttdeci">virtual SgUnsignedCharList assembleProgram(const std::string &source)</div><div class="ttdoc">Assemble an x86 program from assembly source code using the nasm assembler.</div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1Assembler_html"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1Assembler.html">Rose::BinaryAnalysis::Assembler</a></div><div class="ttdoc">Virtual base class for instruction assemblers.</div><div class="ttdef"><b>Definition</b> <a href="Assembler_8h_source.html#l00058">Assembler.h:58</a></div></div>
<div class="ttc" id="aclassSgAsmExpression_html"><div class="ttname"><a href="classSgAsmExpression.html">SgAsmExpression</a></div><div class="ttdoc">Base class for expressions.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l43964">binaryInstruction.C:43964</a></div></div>
<div class="ttc" id="aclassSgAsmInstruction_html"><div class="ttname"><a href="classSgAsmInstruction.html">SgAsmInstruction</a></div><div class="ttdoc">Base class for machine instructions.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l43208">binaryInstruction.C:43208</a></div></div>
<div class="ttc" id="aclassSgAsmMemoryReferenceExpression_html"><div class="ttname"><a href="classSgAsmMemoryReferenceExpression.html">SgAsmMemoryReferenceExpression</a></div><div class="ttdoc">Reference to memory locations.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l07358">binaryInstruction.C:7358</a></div></div>
<div class="ttc" id="aclassSgAsmRegisterReferenceExpression_html"><div class="ttname"><a href="classSgAsmRegisterReferenceExpression.html">SgAsmRegisterReferenceExpression</a></div><div class="ttdoc">Base class for references to a machine register.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l29226">binaryInstruction.C:29226</a></div></div>
<div class="ttc" id="aclassSgAsmValueExpression_html"><div class="ttname"><a href="classSgAsmValueExpression.html">SgAsmValueExpression</a></div><div class="ttdoc">Base class for values.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l29500">binaryInstruction.C:29500</a></div></div>
<div class="ttc" id="aclassSgAsmX86Instruction_html"><div class="ttname"><a href="classSgAsmX86Instruction.html">SgAsmX86Instruction</a></div><div class="ttdoc">Represents one Intel x86 machine instruction.</div><div class="ttdef"><b>Definition</b> <a href="binaryInstruction_8C_source.html#l00122">binaryInstruction.C:122</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_html_a60d901bdb3369239fda973246fc9d014"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis.html#a60d901bdb3369239fda973246fc9d014">Rose::BinaryAnalysis::X86InstructionKind</a></div><div class="ttdeci">X86InstructionKind</div><div class="ttdoc">List of all x86 instructions known to the ROSE disassembler/assembler.</div><div class="ttdef"><b>Definition</b> <a href="AssemblerX86Init_8h_source.html#l00027">AssemblerX86Init.h:28</a></div></div>
<div class="ttc" id="anamespaceRose_html"><div class="ttname"><a href="namespaceRose.html">Rose</a></div><div class="ttdoc">The ROSE library.</div><div class="ttdef"><b>Definition</b> <a href="BinaryTutorial_8dox_source.html#l00003">BinaryTutorial.dox:3</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 2 2024 00:07:47 for ROSE by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>