diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-11-26 01:19:47 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-11-26 01:19:47 -0800 |
commit | d1c9392a5461e0d33e226375a8f7986a97d2d66b (patch) | |
tree | 494c19edbe1d1522344b56ced6aa7c040ad37406 /html/subx/030---operands.cc.html | |
parent | 7e00968c99f97e13be8f5269feaf7fd1d33ecd33 (diff) | |
download | mu-d1c9392a5461e0d33e226375a8f7986a97d2d66b.tar.gz |
4782
Diffstat (limited to 'html/subx/030---operands.cc.html')
-rw-r--r-- | html/subx/030---operands.cc.html | 211 |
1 files changed, 105 insertions, 106 deletions
diff --git a/html/subx/030---operands.cc.html b/html/subx/030---operands.cc.html index 7d9e6635..cf670140 100644 --- a/html/subx/030---operands.cc.html +++ b/html/subx/030---operands.cc.html @@ -15,7 +15,6 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.traceContains { color: #008000; } .Identifier { color: #c0a020; } .LineNr { color: #444444; } .Constant { color: #00a0a0; } @@ -25,7 +24,7 @@ a:hover { text-decoration: underline; } .Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } -.cSpecial { color: #008000; } +.traceContains { color: #008000; } --> </style> @@ -75,19 +74,19 @@ if ('onhashchange' in window) { <span id="L13" class="LineNr"> 13 </span><span class="Comment">//: pack and order the bytes corresponding to the operands in an instruction.</span> <span id="L14" class="LineNr"> 14 </span> <span id="L15" class="LineNr"> 15 </span><span class="Delimiter">:(before "End <a href='001help.cc.html#L53'>Help</a> Texts")</span> -<span id="L16" class="LineNr"> 16 </span><a href='001help.cc.html#L253'>put_new</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"instructions"</span><span class="Delimiter">,</span> -<span id="L17" class="LineNr"> 17 </span> <span class="Constant">"Each x86 instruction consists of an instruction or opcode and some number</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L18" class="LineNr"> 18 </span> <span class="Constant">"of operands.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L19" class="LineNr"> 19 </span> <span class="Constant">"Each operand has a type. An instruction won't have more than one operand of</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L20" class="LineNr"> 20 </span> <span class="Constant">"any type.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L21" class="LineNr"> 21 </span> <span class="Constant">"Each instruction has some set of allowed operand types. It'll reject others.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L22" class="LineNr"> 22 </span> <span class="Constant">"The complete list of operand <a href='031check_operands.cc.html#L431'>types</a>: mod, subop, r32 (register), rm32</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L23" class="LineNr"> 23 </span> <span class="Constant">"(register or memory), scale, index, base, disp8, disp16, disp32, imm8,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L24" class="LineNr"> 24 </span> <span class="Constant">"imm32.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L25" class="LineNr"> 25 </span> <span class="Constant">"Each of these has its own help page. Try reading 'subx help mod' next.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L16" class="LineNr"> 16 </span><a href='001help.cc.html#L253'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"instructions"</span><span class="Delimiter">,</span> +<span id="L17" class="LineNr"> 17 </span> <span class="Constant">"Each x86 instruction consists of an instruction or opcode and some number\n"</span> +<span id="L18" class="LineNr"> 18 </span> <span class="Constant">"of operands.\n"</span> +<span id="L19" class="LineNr"> 19 </span> <span class="Constant">"Each operand has a type. An instruction won't have more than one operand of\n"</span> +<span id="L20" class="LineNr"> 20 </span> <span class="Constant">"any type.\n"</span> +<span id="L21" class="LineNr"> 21 </span> <span class="Constant">"Each instruction has some set of allowed operand types. It'll reject others.\n"</span> +<span id="L22" class="LineNr"> 22 </span> <span class="Constant">"The complete list of operand <a href='031check_operands.cc.html#L427'>types</a>: mod, subop, r32 (register), rm32\n"</span> +<span id="L23" class="LineNr"> 23 </span> <span class="Constant">"(register or memory), scale, index, base, disp8, disp16, disp32, imm8,\n"</span> +<span id="L24" class="LineNr"> 24 </span> <span class="Constant">"imm32.\n"</span> +<span id="L25" class="LineNr"> 25 </span> <span class="Constant">"Each of these has its own help page. Try reading 'subx help mod' next.\n"</span> <span id="L26" class="LineNr"> 26 </span><span class="Delimiter">);</span> <span id="L27" class="LineNr"> 27 </span><span class="Delimiter">:(before "End <a href='001help.cc.html#L53'>Help</a> Contents")</span> -<span id="L28" class="LineNr"> 28 </span>cerr << <span class="Constant">" instructions</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L28" class="LineNr"> 28 </span>cerr << <span class="Constant">" instructions\n"</span><span class="Delimiter">;</span> <span id="L29" class="LineNr"> 29 </span> <span id="L30" class="LineNr"> 30 </span><span class="Delimiter">:(scenario pack_immediate_constants)</span> <span id="L31" class="LineNr"> 31 </span>== <span class="Constant">0x1</span> @@ -99,110 +98,110 @@ if ('onhashchange' in window) { <span id="L37" class="LineNr"> 37 </span><span class="Comment">//: complete set of valid operand types</span> <span id="L38" class="LineNr"> 38 </span> <span id="L39" class="LineNr"> 39 </span><span class="Delimiter">:(before "End Globals")</span> -<span id="L40" class="LineNr"> 40 </span>set<string> <a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">;</span> +<span id="L40" class="LineNr"> 40 </span>set<string> <span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">;</span> <span id="L41" class="LineNr"> 41 </span><span class="Delimiter">:(before "End One-time Setup")</span> -<span id="L42" class="LineNr"> 42 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"subop"</span><span class="Delimiter">);</span> -<span id="L43" class="LineNr"> 43 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"mod"</span><span class="Delimiter">);</span> -<span id="L44" class="LineNr"> 44 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"rm32"</span><span class="Delimiter">);</span> -<span id="L45" class="LineNr"> 45 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"base"</span><span class="Delimiter">);</span> -<span id="L46" class="LineNr"> 46 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"index"</span><span class="Delimiter">);</span> -<span id="L47" class="LineNr"> 47 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"scale"</span><span class="Delimiter">);</span> -<span id="L48" class="LineNr"> 48 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"r32"</span><span class="Delimiter">);</span> -<span id="L49" class="LineNr"> 49 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp8"</span><span class="Delimiter">);</span> -<span id="L50" class="LineNr"> 50 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp16"</span><span class="Delimiter">);</span> -<span id="L51" class="LineNr"> 51 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp32"</span><span class="Delimiter">);</span> -<span id="L52" class="LineNr"> 52 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"imm8"</span><span class="Delimiter">);</span> -<span id="L53" class="LineNr"> 53 </span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"imm32"</span><span class="Delimiter">);</span> +<span id="L42" class="LineNr"> 42 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"subop"</span><span class="Delimiter">);</span> +<span id="L43" class="LineNr"> 43 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"mod"</span><span class="Delimiter">);</span> +<span id="L44" class="LineNr"> 44 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"rm32"</span><span class="Delimiter">);</span> +<span id="L45" class="LineNr"> 45 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"base"</span><span class="Delimiter">);</span> +<span id="L46" class="LineNr"> 46 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"index"</span><span class="Delimiter">);</span> +<span id="L47" class="LineNr"> 47 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"scale"</span><span class="Delimiter">);</span> +<span id="L48" class="LineNr"> 48 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"r32"</span><span class="Delimiter">);</span> +<span id="L49" class="LineNr"> 49 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp8"</span><span class="Delimiter">);</span> +<span id="L50" class="LineNr"> 50 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp16"</span><span class="Delimiter">);</span> +<span id="L51" class="LineNr"> 51 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"disp32"</span><span class="Delimiter">);</span> +<span id="L52" class="LineNr"> 52 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"imm8"</span><span class="Delimiter">);</span> +<span id="L53" class="LineNr"> 53 </span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">"imm32"</span><span class="Delimiter">);</span> <span id="L54" class="LineNr"> 54 </span> <span id="L55" class="LineNr"> 55 </span><span class="Delimiter">:(before "End <a href='001help.cc.html#L53'>Help</a> Texts")</span> <span id="L56" class="LineNr"> 56 </span><a href='030---operands.cc.html#L58'>init_operand_type_help</a><span class="Delimiter">();</span> <span id="L57" class="LineNr"> 57 </span><span class="Delimiter">:(code)</span> <span id="L58" class="LineNr"> 58 </span><span class="Normal">void</span> <a href='030---operands.cc.html#L58'>init_operand_type_help</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L59" class="LineNr"> 59 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"mod"</span><span class="Delimiter">,</span> -<span id="L60" class="LineNr"> 60 </span> <span class="Constant">"2-bit operand controlling the _addressing mode_ of many instructions,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L61" class="LineNr"> 61 </span> <span class="Constant">"to determine how to compute the _effective address_ to look up memory at</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L62" class="LineNr"> 62 </span> <span class="Constant">"based on the 'rm32' operand and potentially others.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L63" class="LineNr"> 63 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L64" class="LineNr"> 64 </span> <span class="Constant">"If mod = 3, just operate on the <a href='003trace.cc.html#L74'>contents</a> of the register specified by rm32</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L65" class="LineNr"> 65 </span> <span class="Constant">" (direct mode).</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L66" class="LineNr"> 66 </span> <span class="Constant">"If mod = 2, effective address is usually* rm32 + disp32</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L67" class="LineNr"> 67 </span> <span class="Constant">" (indirect mode with displacement).</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L68" class="LineNr"> 68 </span> <span class="Constant">"If mod = 1, effective address is usually* rm32 + disp8</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L69" class="LineNr"> 69 </span> <span class="Constant">" (indirect mode with displacement).</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L70" class="LineNr"> 70 </span> <span class="Constant">"If mod = 0, effective address is usually* rm32 (indirect mode).</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L71" class="LineNr"> 71 </span> <span class="Constant">"(* - The exception is when rm32 is '4'. Register 4 is the stack pointer (ESP).</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L72" class="LineNr"> 72 </span> <span class="Constant">" Using it as an address gets more involved. For more details,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L73" class="LineNr"> 73 </span> <span class="Constant">" try reading the help pages for 'base', 'index' and 'scale'.)</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L74" class="LineNr"> 74 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L75" class="LineNr"> 75 </span> <span class="Constant">"For complete details, spend some time with two tables in the IA-32 software</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L76" class="LineNr"> 76 </span> <span class="Constant">"developer's manual that are also included in this repo:</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L77" class="LineNr"> 77 </span> <span class="Constant">" - modrm.pdf: volume 2, table 2-2, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the ModR/M byte.</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L78" class="LineNr"> 78 </span> <span class="Constant">" - sib.pdf: volume 2, table 2-3, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the SIB byte.</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L59" class="LineNr"> 59 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"mod"</span><span class="Delimiter">,</span> +<span id="L60" class="LineNr"> 60 </span> <span class="Constant">"2-bit operand controlling the _addressing mode_ of many instructions,\n"</span> +<span id="L61" class="LineNr"> 61 </span> <span class="Constant">"to determine how to compute the _effective address_ to look up memory at\n"</span> +<span id="L62" class="LineNr"> 62 </span> <span class="Constant">"based on the 'rm32' operand and potentially others.\n"</span> +<span id="L63" class="LineNr"> 63 </span> <span class="Constant">"\n"</span> +<span id="L64" class="LineNr"> 64 </span> <span class="Constant">"If mod = 3, just operate on the <a href='003trace.cc.html#L74'>contents</a> of the register specified by rm32\n"</span> +<span id="L65" class="LineNr"> 65 </span> <span class="Constant">" (direct mode).\n"</span> +<span id="L66" class="LineNr"> 66 </span> <span class="Constant">"If mod = 2, effective address is usually* rm32 + disp32\n"</span> +<span id="L67" class="LineNr"> 67 </span> <span class="Constant">" (indirect mode with displacement).\n"</span> +<span id="L68" class="LineNr"> 68 </span> <span class="Constant">"If mod = 1, effective address is usually* rm32 + disp8\n"</span> +<span id="L69" class="LineNr"> 69 </span> <span class="Constant">" (indirect mode with displacement).\n"</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Constant">"If mod = 0, effective address is usually* rm32 (indirect mode).\n"</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Constant">"(* - The exception is when rm32 is '4'. Register 4 is the stack pointer (ESP).\n"</span> +<span id="L72" class="LineNr"> 72 </span> <span class="Constant">" Using it as an address gets more involved. For more details,\n"</span> +<span id="L73" class="LineNr"> 73 </span> <span class="Constant">" try reading the help pages for 'base', 'index' and 'scale'.)\n"</span> +<span id="L74" class="LineNr"> 74 </span> <span class="Constant">"\n"</span> +<span id="L75" class="LineNr"> 75 </span> <span class="Constant">"For complete details, spend some time with two tables in the IA-32 software\n"</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Constant">"developer's manual that are also included in this repo:\n"</span> +<span id="L77" class="LineNr"> 77 </span> <span class="Constant">" - modrm.pdf: volume 2, table 2-2, \"</span><span class="Constant">32</span>-bit addressing with the ModR/<span class="Special">M</span> byte<span class="Delimiter">.</span>\<span class="Constant">".\n"</span> +<span id="L78" class="LineNr"> 78 </span> <span class="Constant">" - sib.pdf: volume 2, table 2-3, \"</span><span class="Constant">32</span>-bit addressing with the SIB byte<span class="Delimiter">.</span>\<span class="Constant">".\n"</span> <span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">);</span> -<span id="L80" class="LineNr"> 80 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"subop"</span><span class="Delimiter">,</span> -<span id="L81" class="LineNr"> 81 </span> <span class="Constant">"Additional 3-bit operand for determining the instruction when the opcode is 81, 8f or ff.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L82" class="LineNr"> 82 </span> <span class="Constant">"Can't coexist with operand of type 'r32' in a single instruction, because the two use the same bits.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L80" class="LineNr"> 80 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"subop"</span><span class="Delimiter">,</span> +<span id="L81" class="LineNr"> 81 </span> <span class="Constant">"Additional 3-bit operand for determining the instruction when the opcode is 81, 8f or ff.\n"</span> +<span id="L82" class="LineNr"> 82 </span> <span class="Constant">"Can't coexist with operand of type 'r32' in a single instruction, because the two use the same bits.\n"</span> <span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">);</span> -<span id="L84" class="LineNr"> 84 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"r32"</span><span class="Delimiter">,</span> -<span id="L85" class="LineNr"> 85 </span> <span class="Constant">"3-bit operand specifying a register operand used directly, without any further addressing modes.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L84" class="LineNr"> 84 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"r32"</span><span class="Delimiter">,</span> +<span id="L85" class="LineNr"> 85 </span> <span class="Constant">"3-bit operand specifying a register operand used directly, without any further addressing modes.\n"</span> <span id="L86" class="LineNr"> 86 </span> <span class="Delimiter">);</span> -<span id="L87" class="LineNr"> 87 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"rm32"</span><span class="Delimiter">,</span> -<span id="L88" class="LineNr"> 88 </span> <span class="Constant">"32-bit value in register or memory. The precise details of its construction</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L89" class="LineNr"> 89 </span> <span class="Constant">"depend on the eponymous 3-bit 'rm32' operand, the 'mod' operand, and also</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L90" class="LineNr"> 90 </span> <span class="Constant">"potentially the 'SIB' operands ('scale', 'index' and 'base') and a displacement</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L91" class="LineNr"> 91 </span> <span class="Constant">"('disp8' or 'disp32').</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L92" class="LineNr"> 92 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L93" class="LineNr"> 93 </span> <span class="Constant">"For complete details, spend some time with two tables in the IA-32 software</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L94" class="LineNr"> 94 </span> <span class="Constant">"developer's manual that are also included in this repo:</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L95" class="LineNr"> 95 </span> <span class="Constant">" - modrm.pdf: volume 2, table 2-2, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the ModR/M byte.</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L96" class="LineNr"> 96 </span> <span class="Constant">" - sib.pdf: volume 2, table 2-3, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the SIB byte.</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L87" class="LineNr"> 87 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"rm32"</span><span class="Delimiter">,</span> +<span id="L88" class="LineNr"> 88 </span> <span class="Constant">"32-bit value in register or memory. The precise details of its construction\n"</span> +<span id="L89" class="LineNr"> 89 </span> <span class="Constant">"depend on the eponymous 3-bit 'rm32' operand, the 'mod' operand, and also\n"</span> +<span id="L90" class="LineNr"> 90 </span> <span class="Constant">"potentially the 'SIB' operands ('scale', 'index' and 'base') and a displacement\n"</span> +<span id="L91" class="LineNr"> 91 </span> <span class="Constant">"('disp8' or 'disp32').\n"</span> +<span id="L92" class="LineNr"> 92 </span> <span class="Constant">"\n"</span> +<span id="L93" class="LineNr"> 93 </span> <span class="Constant">"For complete details, spend some time with two tables in the IA-32 software\n"</span> +<span id="L94" class="LineNr"> 94 </span> <span class="Constant">"developer's manual that are also included in this repo:\n"</span> +<span id="L95" class="LineNr"> 95 </span> <span class="Constant">" - modrm.pdf: volume 2, table 2-2, \"</span><span class="Constant">32</span>-bit addressing with the ModR/<span class="Special">M</span> byte<span class="Delimiter">.</span>\<span class="Constant">".\n"</span> +<span id="L96" class="LineNr"> 96 </span> <span class="Constant">" - sib.pdf: volume 2, table 2-3, \"</span><span class="Constant">32</span>-bit addressing with the SIB byte<span class="Delimiter">.</span>\<span class="Constant">".\n"</span> <span id="L97" class="LineNr"> 97 </span> <span class="Delimiter">);</span> -<span id="L98" class="LineNr"> 98 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"base"</span><span class="Delimiter">,</span> -<span id="L99" class="LineNr"> 99 </span> <span class="Constant">"Additional 3-bit operand (when 'rm32' is 4, unless 'mod' is 3) specifying the</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L100" class="LineNr">100 </span> <span class="Constant">"register containing an address to look up.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L101" class="LineNr">101 </span> <span class="Constant">"This address may be further modified by 'index' and 'scale' operands.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L102" class="LineNr">102 </span> <span class="Constant">" effective address = base + index*scale + displacement (disp8 or disp32)</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L103" class="LineNr">103 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L104" class="LineNr">104 </span> <span class="Constant">"volume 2, table 2-3, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the SIB byte</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L105" class="LineNr">105 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L98" class="LineNr"> 98 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"base"</span><span class="Delimiter">,</span> +<span id="L99" class="LineNr"> 99 </span> <span class="Constant">"Additional 3-bit operand (when 'rm32' is 4, unless 'mod' is 3) specifying the\n"</span> +<span id="L100" class="LineNr">100 </span> <span class="Constant">"register containing an address to look up.\n"</span> +<span id="L101" class="LineNr">101 </span> <span class="Constant">"This address may be further modified by 'index' and 'scale' operands.\n"</span> +<span id="L102" class="LineNr">102 </span> <span class="Constant">" effective address = base + index*scale + displacement (disp8 or disp32)\n"</span> +<span id="L103" class="LineNr">103 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,\n"</span> +<span id="L104" class="LineNr">104 </span> <span class="Constant">"volume 2, table 2-3, \"</span><span class="Constant">32</span>-bit addressing with the SIB byte\<span class="Constant">".\n"</span> +<span id="L105" class="LineNr">105 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.\n"</span> <span id="L106" class="LineNr">106 </span> <span class="Delimiter">);</span> -<span id="L107" class="LineNr">107 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"index"</span><span class="Delimiter">,</span> -<span id="L108" class="LineNr">108 </span> <span class="Constant">"Optional 3-bit operand (when 'rm32' is 4 unless 'mod' is 3) that can be added to</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L109" class="LineNr">109 </span> <span class="Constant">"the 'base' operand to compute the 'effective address' at which to look up memory.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L110" class="LineNr">110 </span> <span class="Constant">" effective address = base + index*scale + displacement (disp8 or disp32)</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L111" class="LineNr">111 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L112" class="LineNr">112 </span> <span class="Constant">"volume 2, table 2-3, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the SIB byte</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L113" class="LineNr">113 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L107" class="LineNr">107 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"index"</span><span class="Delimiter">,</span> +<span id="L108" class="LineNr">108 </span> <span class="Constant">"Optional 3-bit operand (when 'rm32' is 4 unless 'mod' is 3) that can be added to\n"</span> +<span id="L109" class="LineNr">109 </span> <span class="Constant">"the 'base' operand to compute the 'effective address' at which to look up memory.\n"</span> +<span id="L110" class="LineNr">110 </span> <span class="Constant">" effective address = base + index*scale + displacement (disp8 or disp32)\n"</span> +<span id="L111" class="LineNr">111 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,\n"</span> +<span id="L112" class="LineNr">112 </span> <span class="Constant">"volume 2, table 2-3, \"</span><span class="Constant">32</span>-bit addressing with the SIB byte\<span class="Constant">".\n"</span> +<span id="L113" class="LineNr">113 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.\n"</span> <span id="L114" class="LineNr">114 </span> <span class="Delimiter">);</span> -<span id="L115" class="LineNr">115 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"scale"</span><span class="Delimiter">,</span> -<span id="L116" class="LineNr">116 </span> <span class="Constant">"Optional 2-bit operand (when 'rm32' is 4 unless 'mod' is 3) that encodes a</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L117" class="LineNr">117 </span> <span class="Constant">"power of 2 to be multiplied to the 'index' operand before adding the result to</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L118" class="LineNr">118 </span> <span class="Constant">"the 'base' operand to compute the _effective address_ to operate on.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L119" class="LineNr">119 </span> <span class="Constant">" effective address = base + index * scale + displacement (disp8 or disp32)</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L120" class="LineNr">120 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L121" class="LineNr">121 </span> <span class="Constant">"When scale is 0, use index unmodified.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L122" class="LineNr">122 </span> <span class="Constant">"When scale is 1, multiply index by 2.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L123" class="LineNr">123 </span> <span class="Constant">"When scale is 2, multiply index by 4.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L124" class="LineNr">124 </span> <span class="Constant">"When scale is 3, multiply index by 8.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L125" class="LineNr">125 </span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L126" class="LineNr">126 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L127" class="LineNr">127 </span> <span class="Constant">"volume 2, table 2-3, </span><span class="cSpecial">\"</span><span class="Constant">32-bit addressing with the SIB byte</span><span class="cSpecial">\"</span><span class="Constant">.</span><span class="cSpecial">\n</span><span class="Constant">"</span> -<span id="L128" class="LineNr">128 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L115" class="LineNr">115 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"scale"</span><span class="Delimiter">,</span> +<span id="L116" class="LineNr">116 </span> <span class="Constant">"Optional 2-bit operand (when 'rm32' is 4 unless 'mod' is 3) that encodes a\n"</span> +<span id="L117" class="LineNr">117 </span> <span class="Constant">"power of 2 to be multiplied to the 'index' operand before adding the result to\n"</span> +<span id="L118" class="LineNr">118 </span> <span class="Constant">"the 'base' operand to compute the _effective address_ to operate on.\n"</span> +<span id="L119" class="LineNr">119 </span> <span class="Constant">" effective address = base + index * scale + displacement (disp8 or disp32)\n"</span> +<span id="L120" class="LineNr">120 </span> <span class="Constant">"\n"</span> +<span id="L121" class="LineNr">121 </span> <span class="Constant">"When scale is 0, use index unmodified.\n"</span> +<span id="L122" class="LineNr">122 </span> <span class="Constant">"When scale is 1, multiply index by 2.\n"</span> +<span id="L123" class="LineNr">123 </span> <span class="Constant">"When scale is 2, multiply index by 4.\n"</span> +<span id="L124" class="LineNr">124 </span> <span class="Constant">"When scale is 3, multiply index by 8.\n"</span> +<span id="L125" class="LineNr">125 </span> <span class="Constant">"\n"</span> +<span id="L126" class="LineNr">126 </span> <span class="Constant">"For complete details, spend some time with the IA-32 software developer's manual,\n"</span> +<span id="L127" class="LineNr">127 </span> <span class="Constant">"volume 2, table 2-3, \"</span><span class="Constant">32</span>-bit addressing with the SIB byte\<span class="Constant">".\n"</span> +<span id="L128" class="LineNr">128 </span> <span class="Constant">"It is included in this repository as 'sib.pdf'.\n"</span> <span id="L129" class="LineNr">129 </span> <span class="Delimiter">);</span> -<span id="L130" class="LineNr">130 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"disp8"</span><span class="Delimiter">,</span> -<span id="L131" class="LineNr">131 </span> <span class="Constant">"8-bit value to be added in many instructions.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L130" class="LineNr">130 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"disp8"</span><span class="Delimiter">,</span> +<span id="L131" class="LineNr">131 </span> <span class="Constant">"8-bit value to be added in many instructions.\n"</span> <span id="L132" class="LineNr">132 </span> <span class="Delimiter">);</span> -<span id="L133" class="LineNr">133 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"disp16"</span><span class="Delimiter">,</span> -<span id="L134" class="LineNr">134 </span> <span class="Constant">"16-bit value to be added in many instructions.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L133" class="LineNr">133 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"disp16"</span><span class="Delimiter">,</span> +<span id="L134" class="LineNr">134 </span> <span class="Constant">"16-bit value to be added in many instructions.\n"</span> <span id="L135" class="LineNr">135 </span> <span class="Delimiter">);</span> -<span id="L136" class="LineNr">136 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"disp32"</span><span class="Delimiter">,</span> -<span id="L137" class="LineNr">137 </span> <span class="Constant">"32-bit value to be added in many instructions.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L136" class="LineNr">136 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"disp32"</span><span class="Delimiter">,</span> +<span id="L137" class="LineNr">137 </span> <span class="Constant">"32-bit value to be added in many instructions.\n"</span> <span id="L138" class="LineNr">138 </span> <span class="Delimiter">);</span> -<span id="L139" class="LineNr">139 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"imm8"</span><span class="Delimiter">,</span> -<span id="L140" class="LineNr">140 </span> <span class="Constant">"8-bit value for many instructions.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L139" class="LineNr">139 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"imm8"</span><span class="Delimiter">,</span> +<span id="L140" class="LineNr">140 </span> <span class="Constant">"8-bit value for many instructions.\n"</span> <span id="L141" class="LineNr">141 </span> <span class="Delimiter">);</span> -<span id="L142" class="LineNr">142 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><a href='001help.cc.html#L53'>Help</a><span class="Delimiter">,</span> <span class="Constant">"imm32"</span><span class="Delimiter">,</span> -<span id="L143" class="LineNr">143 </span> <span class="Constant">"32-bit value for many instructions.</span><span class="cSpecial">\n</span><span class="Constant">"</span> +<span id="L142" class="LineNr">142 </span> <a href='001help.cc.html#L243'>put</a><span class="Delimiter">(</span><span class="Special"><a href='001help.cc.html#L53'>Help</a></span><span class="Delimiter">,</span> <span class="Constant">"imm32"</span><span class="Delimiter">,</span> +<span id="L143" class="LineNr">143 </span> <span class="Constant">"32-bit value for many instructions.\n"</span> <span id="L144" class="LineNr">144 </span> <span class="Delimiter">);</span> <span id="L145" class="LineNr">145 </span><span class="Delimiter">}</span> <span id="L146" class="LineNr">146 </span> @@ -210,7 +209,7 @@ if ('onhashchange' in window) { <span id="L148" class="LineNr">148 </span> <span id="L149" class="LineNr">149 </span><span class="Delimiter">:(after "Begin Transforms")</span> <span id="L150" class="LineNr">150 </span><span class="Comment">// Begin Level-2 Transforms</span> -<span id="L151" class="LineNr">151 </span><a href='011run.cc.html#L229'>Transform</a><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pack_operands<span class="Delimiter">);</span> +<span id="L151" class="LineNr">151 </span><span class="Special"><a href='011run.cc.html#L229'>Transform</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pack_operands<span class="Delimiter">);</span> <span id="L152" class="LineNr">152 </span><span class="Comment">// End Level-2 Transforms</span> <span id="L153" class="LineNr">153 </span> <span id="L154" class="LineNr">154 </span><span class="Delimiter">:(code)</span> @@ -348,7 +347,7 @@ if ('onhashchange' in window) { <span id="L286" class="LineNr">286 </span>string <a href='030---operands.cc.html#L286'>hex_byte_to_string</a><span class="Delimiter">(</span><span class="Normal">uint8_t</span> val<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L287" class="LineNr">287 </span> ostringstream out<span class="Delimiter">;</span> <span id="L288" class="LineNr">288 </span> <span class="Comment">// uint8_t prints without padding, but int8_t will expand to 32 bits again</span> -<span id="L289" class="LineNr">289 </span> out << <a href='010---vm.cc.html#L403'>HEXBYTE</a> << <a href='010---vm.cc.html#L406'>NUM</a><span class="Delimiter">(</span>val<span class="Delimiter">);</span> +<span id="L289" class="LineNr">289 </span> out << <a href='010---vm.cc.html#L412'>HEXBYTE</a> << <a href='010---vm.cc.html#L415'>NUM</a><span class="Delimiter">(</span>val<span class="Delimiter">);</span> <span id="L290" class="LineNr">290 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L291" class="LineNr">291 </span><span class="Delimiter">}</span> <span id="L292" class="LineNr">292 </span> @@ -457,7 +456,7 @@ if ('onhashchange' in window) { <span id="L395" class="LineNr">395 </span> <span id="L396" class="LineNr">396 </span><span class="Normal">bool</span> <a href='030---operands.cc.html#L396'>contains_any_operand_metadata</a><span class="Delimiter">(</span><span class="Normal">const</span> word& <a href='011run.cc.html#L123'>word</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L397" class="LineNr">397 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span><a href='011run.cc.html#L123'>word</a><span class="Delimiter">.</span>metadata<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L398" class="LineNr">398 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>find<span class="Delimiter">(</span><a href='011run.cc.html#L123'>word</a><span class="Delimiter">.</span>metadata<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> != <a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>end<span class="Delimiter">())</span> +<span id="L398" class="LineNr">398 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>find<span class="Delimiter">(</span><a href='011run.cc.html#L123'>word</a><span class="Delimiter">.</span>metadata<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> != <span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span id="L399" class="LineNr">399 </span> <span class="Identifier">return</span><span class="Constant"> true</span><span class="Delimiter">;</span> <span id="L400" class="LineNr">400 </span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L401" class="LineNr">401 </span><span class="Delimiter">}</span> @@ -467,7 +466,7 @@ if ('onhashchange' in window) { <span id="L405" class="LineNr">405 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L118'>words</a><span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L406" class="LineNr">406 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!has_operand_metadata<span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L118'>words</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> m<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L407" class="LineNr">407 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L408" class="LineNr">408 </span> <a href='003trace.cc.html#L210'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"' has conflicting "</span> << m << <span class="Constant">" operands</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L408" class="LineNr">408 </span> <a href='003trace.cc.html#L210'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"' has conflicting "</span> << m << <span class="Constant">" operands\n"</span> << end<span class="Delimiter">();</span> <span id="L409" class="LineNr">409 </span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L410" class="LineNr">410 </span> <span class="Delimiter">}</span> <span id="L411" class="LineNr">411 </span> result =<span class="Constant"> true</span><span class="Delimiter">;</span> @@ -480,9 +479,9 @@ if ('onhashchange' in window) { <span id="L418" class="LineNr">418 </span> <span class="Normal">bool</span> metadata_found =<span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L419" class="LineNr">419 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span>w<span class="Delimiter">.</span>metadata<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L420" class="LineNr">420 </span> <span class="Normal">const</span> string& curr = w<span class="Delimiter">.</span>metadata<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> -<span id="L421" class="LineNr">421 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>find<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> == <a href='030---operands.cc.html#L40'>Instruction_operands</a><span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// ignore unrecognized metadata</span> +<span id="L421" class="LineNr">421 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>find<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> == <span class="Special"><a href='030---operands.cc.html#L40'>Instruction_operands</a></span><span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// ignore unrecognized metadata</span> <span id="L422" class="LineNr">422 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>metadata_found<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L423" class="LineNr">423 </span> <a href='003trace.cc.html#L210'>raise</a> << <span class="Constant">"'"</span> << w<span class="Delimiter">.</span>original << <span class="Constant">"' has conflicting operand types; it should have only one</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L423" class="LineNr">423 </span> <a href='003trace.cc.html#L210'>raise</a> << <span class="Constant">"'"</span> << w<span class="Delimiter">.</span>original << <span class="Constant">"' has conflicting operand types; it should have only one\n"</span> << end<span class="Delimiter">();</span> <span id="L424" class="LineNr">424 </span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L425" class="LineNr">425 </span> <span class="Delimiter">}</span> <span id="L426" class="LineNr">426 </span> metadata_found =<span class="Constant"> true</span><span class="Delimiter">;</span> |