diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-25 00:08:23 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-25 00:10:56 -0700 |
commit | 695f9bf8d0a7d0a871b8ab75270ceb29715d9be3 (patch) | |
tree | 358d7fda9f7eb1714d9a7f0e0838be2bd64d336f /html/subx/013direct_addressing.cc.html | |
parent | 51a20da6b30f4afe0405d13bf862b5d72ccefa6d (diff) | |
download | mu-695f9bf8d0a7d0a871b8ab75270ceb29715d9be3.tar.gz |
5468
Diffstat (limited to 'html/subx/013direct_addressing.cc.html')
-rw-r--r-- | html/subx/013direct_addressing.cc.html | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/html/subx/013direct_addressing.cc.html b/html/subx/013direct_addressing.cc.html index 1c4a0346..109ef0db 100644 --- a/html/subx/013direct_addressing.cc.html +++ b/html/subx/013direct_addressing.cc.html @@ -62,7 +62,7 @@ if ('onhashchange' in window) { <span id="L1" class="LineNr"> 1 </span><span class="Comment">//: operating directly on a register</span> <span id="L2" class="LineNr"> 2 </span> <span id="L3" class="LineNr"> 3 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L4" class="LineNr"> 4 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"01"</span><span class="Delimiter">,</span> <span class="Constant">"add r32 to rm32 (add)"</span><span class="Delimiter">);</span> +<span id="L4" class="LineNr"> 4 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"01"</span><span class="Delimiter">,</span> <span class="Constant">"add r32 to rm32 (add)"</span><span class="Delimiter">);</span> <span id="L5" class="LineNr"> 5 </span> <span id="L6" class="LineNr"> 6 </span><span class="Delimiter">:(code)</span> <span id="L7" class="LineNr"> 7 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L7'>test_add_r32_to_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -74,7 +74,7 @@ if ('onhashchange' in window) { <span id="L13" class="LineNr"> 13 </span> <span class="Constant">" 01 d8 \n"</span> <span class="Comment">// add EBX to EAX</span> <span id="L14" class="LineNr"> 14 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L15" class="LineNr"> 15 </span> <span class="Delimiter">);</span> -<span id="L16" class="LineNr"> 16 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L16" class="LineNr"> 16 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L17" class="LineNr"> 17 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L18" class="LineNr"> 18 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L19" class="LineNr"> 19 </span> <span class="Constant">"run: storing 0x00000011\n"</span> @@ -83,7 +83,7 @@ if ('onhashchange' in window) { <span id="L22" class="LineNr"> 22 </span> <span id="L23" class="LineNr"> 23 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L24" class="LineNr"> 24 </span><span class="Normal">case</span> <span class="Constant">0x01</span>: <span class="Delimiter">{</span> <span class="Comment">// add r32 to r/m32</span> -<span id="L25" class="LineNr"> 25 </span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L25" class="LineNr"> 25 </span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L26" class="LineNr"> 26 </span> <span class="Normal">uint8_t</span> arg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L27" class="LineNr"> 27 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"add "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" to r/m32"</span> << end<span class="Delimiter">();</span> <span id="L28" class="LineNr"> 28 </span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -99,7 +99,7 @@ if ('onhashchange' in window) { <span id="L38" class="LineNr"> 38 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Delimiter">(</span>unsigned_result != unsigned_full_result<span class="Delimiter">);</span> <span id="L39" class="LineNr"> 39 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> <span id="L40" class="LineNr"> 40 </span> *signed_arg1 = signed_result<span class="Delimiter">;</span> -<span id="L41" class="LineNr"> 41 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> +<span id="L41" class="LineNr"> 41 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> <span id="L42" class="LineNr"> 42 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L43" class="LineNr"> 43 </span><span class="Delimiter">}</span> <span id="L44" class="LineNr"> 44 </span> @@ -113,7 +113,7 @@ if ('onhashchange' in window) { <span id="L52" class="LineNr"> 52 </span> <span class="Constant">" 01 d8 \n"</span> <span class="Comment">// add EBX to EAX</span> <span id="L53" class="LineNr"> 53 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L54" class="LineNr"> 54 </span> <span class="Delimiter">);</span> -<span id="L55" class="LineNr"> 55 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L55" class="LineNr"> 55 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L56" class="LineNr"> 56 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L57" class="LineNr"> 57 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L58" class="LineNr"> 58 </span> <span class="Constant">"run: SF=1; ZF=0; CF=0; OF=1\n"</span> @@ -130,7 +130,7 @@ if ('onhashchange' in window) { <span id="L69" class="LineNr"> 69 </span> <span class="Constant">" 01 d8 \n"</span> <span class="Comment">// add EBX to EAX</span> <span id="L70" class="LineNr"> 70 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L71" class="LineNr"> 71 </span> <span class="Delimiter">);</span> -<span id="L72" class="LineNr"> 72 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L72" class="LineNr"> 72 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L73" class="LineNr"> 73 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L74" class="LineNr"> 74 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L75" class="LineNr"> 75 </span> <span class="Constant">"run: SF=0; ZF=1; CF=1; OF=0\n"</span> @@ -146,7 +146,7 @@ if ('onhashchange' in window) { <span id="L85" class="LineNr"> 85 </span> <span class="Constant">" 01 d8 \n"</span> <span class="Comment">// add EBX to EAX</span> <span id="L86" class="LineNr"> 86 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L87" class="LineNr"> 87 </span> <span class="Delimiter">);</span> -<span id="L88" class="LineNr"> 88 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L88" class="LineNr"> 88 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L89" class="LineNr"> 89 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L90" class="LineNr"> 90 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L91" class="LineNr"> 91 </span> <span class="Constant">"run: SF=0; ZF=1; CF=1; OF=1\n"</span> @@ -170,7 +170,7 @@ if ('onhashchange' in window) { <span id="L109" class="LineNr"> 109 </span> <span class="Delimiter">}</span> <span id="L110" class="LineNr"> 110 </span> <span class="Normal">uint32_t</span> addr = <a href='013direct_addressing.cc.html#L116'>effective_address_number</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L111" class="LineNr"> 111 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"effective address contains "</span> << <a href='010---vm.cc.html#L190'>read_mem_i32</a><span class="Delimiter">(</span>addr<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> -<span id="L112" class="LineNr"> 112 </span> <span class="Identifier">return</span> <a href='010---vm.cc.html#L229'>mem_addr_i32</a><span class="Delimiter">(</span>addr<span class="Delimiter">);</span> +<span id="L112" class="LineNr"> 112 </span> <span class="Identifier">return</span> <a href='010---vm.cc.html#L230'>mem_addr_i32</a><span class="Delimiter">(</span>addr<span class="Delimiter">);</span> <span id="L113" class="LineNr"> 113 </span><span class="Delimiter">}</span> <span id="L114" class="LineNr"> 114 </span> <span id="L115" class="LineNr"> 115 </span><span class="Comment">// beware: will eventually have side-effects</span> @@ -182,11 +182,11 @@ if ('onhashchange' in window) { <span id="L121" class="LineNr"> 121 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>mod<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L122" class="LineNr"> 122 </span> <span class="Normal">case</span> <span class="Constant">3</span>: <span id="L123" class="LineNr"> 123 </span> <span class="Comment">// mod 3 is just register direct addressing</span> -<span id="L124" class="LineNr"> 124 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"unexpected direct addressing mode\n"</span> << end<span class="Delimiter">();</span> +<span id="L124" class="LineNr"> 124 </span> <a href='003trace.cc.html#L226'>raise</a> << <span class="Constant">"unexpected direct addressing mode\n"</span> << end<span class="Delimiter">();</span> <span id="L125" class="LineNr"> 125 </span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L126" class="LineNr"> 126 </span> <span class="Comment">// End Mod Special-cases(addr)</span> <span id="L127" class="LineNr"> 127 </span> <span class="Normal">default</span>: -<span id="L128" class="LineNr"> 128 </span> cerr << <span class="Constant">"unrecognized mod bits: "</span> << <a href='010---vm.cc.html#L410'>NUM</a><span class="Delimiter">(</span>mod<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L128" class="LineNr"> 128 </span> cerr << <span class="Constant">"unrecognized mod bits: "</span> << <a href='010---vm.cc.html#L411'>NUM</a><span class="Delimiter">(</span>mod<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L129" class="LineNr"> 129 </span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L130" class="LineNr"> 130 </span> <span class="Delimiter">}</span> <span id="L131" class="LineNr"> 131 </span> <span class="Comment">//: other mods are indirect, and they'll set addr appropriately</span> @@ -204,14 +204,14 @@ if ('onhashchange' in window) { <span id="L143" class="LineNr"> 143 </span> <span class="Normal">case</span> <span class="Constant">5</span>: <span class="Identifier">return</span> <span class="Constant">"EBP"</span><span class="Delimiter">;</span> <span id="L144" class="LineNr"> 144 </span> <span class="Normal">case</span> <span class="Constant">6</span>: <span class="Identifier">return</span> <span class="Constant">"ESI"</span><span class="Delimiter">;</span> <span id="L145" class="LineNr"> 145 </span> <span class="Normal">case</span> <span class="Constant">7</span>: <span class="Identifier">return</span> <span class="Constant">"EDI"</span><span class="Delimiter">;</span> -<span id="L146" class="LineNr"> 146 </span> <span class="Normal">default</span>: <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"invalid register "</span> << r << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Identifier">return</span> <span class="Constant">""</span><span class="Delimiter">;</span> +<span id="L146" class="LineNr"> 146 </span> <span class="Normal">default</span>: <a href='003trace.cc.html#L226'>raise</a> << <span class="Constant">"invalid register "</span> << r << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Identifier">return</span> <span class="Constant">""</span><span class="Delimiter">;</span> <span id="L147" class="LineNr"> 147 </span> <span class="Delimiter">}</span> <span id="L148" class="LineNr"> 148 </span><span class="Delimiter">}</span> <span id="L149" class="LineNr"> 149 </span> <span id="L150" class="LineNr"> 150 </span><span class="SalientComment">//:: subtract</span> <span id="L151" class="LineNr"> 151 </span> <span id="L152" class="LineNr"> 152 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L153" class="LineNr"> 153 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"29"</span><span class="Delimiter">,</span> <span class="Constant">"subtract r32 from rm32 (sub)"</span><span class="Delimiter">);</span> +<span id="L153" class="LineNr"> 153 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"29"</span><span class="Delimiter">,</span> <span class="Constant">"subtract r32 from rm32 (sub)"</span><span class="Delimiter">);</span> <span id="L154" class="LineNr"> 154 </span> <span id="L155" class="LineNr"> 155 </span><span class="Delimiter">:(code)</span> <span id="L156" class="LineNr"> 156 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L156'>test_subtract_r32_from_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -223,7 +223,7 @@ if ('onhashchange' in window) { <span id="L162" class="LineNr"> 162 </span> <span class="Constant">" 29 d8 \n"</span> <span class="Comment">// subtract EBX from EAX</span> <span id="L163" class="LineNr"> 163 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L164" class="LineNr"> 164 </span> <span class="Delimiter">);</span> -<span id="L165" class="LineNr"> 165 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L165" class="LineNr"> 165 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L166" class="LineNr"> 166 </span> <span class="Constant">"run: subtract <a href='010---vm.cc.html#L16'>EBX</a> from r/m32\n"</span> <span id="L167" class="LineNr"> 167 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L168" class="LineNr"> 168 </span> <span class="Constant">"run: storing 0x00000009\n"</span> @@ -232,7 +232,7 @@ if ('onhashchange' in window) { <span id="L171" class="LineNr"> 171 </span> <span id="L172" class="LineNr"> 172 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L173" class="LineNr"> 173 </span><span class="Normal">case</span> <span class="Constant">0x29</span>: <span class="Delimiter">{</span> <span class="Comment">// subtract r32 from r/m32</span> -<span id="L174" class="LineNr"> 174 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L174" class="LineNr"> 174 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L175" class="LineNr"> 175 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> arg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L176" class="LineNr"> 176 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"subtract "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" from r/m32"</span> << end<span class="Delimiter">();</span> <span id="L177" class="LineNr"> 177 </span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -248,7 +248,7 @@ if ('onhashchange' in window) { <span id="L187" class="LineNr"> 187 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Delimiter">(</span>unsigned_result != unsigned_full_result<span class="Delimiter">);</span> <span id="L188" class="LineNr"> 188 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> <span id="L189" class="LineNr"> 189 </span> *signed_arg1 = signed_result<span class="Delimiter">;</span> -<span id="L190" class="LineNr"> 190 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> +<span id="L190" class="LineNr"> 190 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> <span id="L191" class="LineNr"> 191 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L192" class="LineNr"> 192 </span><span class="Delimiter">}</span> <span id="L193" class="LineNr"> 193 </span> @@ -262,7 +262,7 @@ if ('onhashchange' in window) { <span id="L201" class="LineNr"> 201 </span> <span class="Constant">" 29 d8 \n"</span> <span class="Comment">// subtract EBX from EAX</span> <span id="L202" class="LineNr"> 202 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L203" class="LineNr"> 203 </span> <span class="Delimiter">);</span> -<span id="L204" class="LineNr"> 204 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L204" class="LineNr"> 204 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L205" class="LineNr"> 205 </span> <span class="Constant">"run: subtract <a href='010---vm.cc.html#L16'>EBX</a> from r/m32\n"</span> <span id="L206" class="LineNr"> 206 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L207" class="LineNr"> 207 </span> <span class="Constant">"run: SF=0; ZF=0; CF=0; OF=1\n"</span> @@ -279,7 +279,7 @@ if ('onhashchange' in window) { <span id="L218" class="LineNr"> 218 </span> <span class="Constant">" 29 d8 \n"</span> <span class="Comment">// subtract EBX from EAX</span> <span id="L219" class="LineNr"> 219 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L220" class="LineNr"> 220 </span> <span class="Delimiter">);</span> -<span id="L221" class="LineNr"> 221 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L221" class="LineNr"> 221 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L222" class="LineNr"> 222 </span> <span class="Constant">"run: subtract <a href='010---vm.cc.html#L16'>EBX</a> from r/m32\n"</span> <span id="L223" class="LineNr"> 223 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L224" class="LineNr"> 224 </span> <span class="Constant">"run: SF=1; ZF=0; CF=1; OF=0\n"</span> @@ -296,7 +296,7 @@ if ('onhashchange' in window) { <span id="L235" class="LineNr"> 235 </span> <span class="Constant">" 29 d8 \n"</span> <span class="Comment">// subtract EBX from EAX</span> <span id="L236" class="LineNr"> 236 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L237" class="LineNr"> 237 </span> <span class="Delimiter">);</span> -<span id="L238" class="LineNr"> 238 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L238" class="LineNr"> 238 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L239" class="LineNr"> 239 </span> <span class="Constant">"run: subtract <a href='010---vm.cc.html#L16'>EBX</a> from r/m32\n"</span> <span id="L240" class="LineNr"> 240 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L241" class="LineNr"> 241 </span> <span class="Constant">"run: SF=1; ZF=0; CF=1; OF=1\n"</span> @@ -307,7 +307,7 @@ if ('onhashchange' in window) { <span id="L246" class="LineNr"> 246 </span><span class="SalientComment">//:: multiply</span> <span id="L247" class="LineNr"> 247 </span> <span id="L248" class="LineNr"> 248 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L249" class="LineNr"> 249 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"f7"</span><span class="Delimiter">,</span> <span class="Constant">"negate/multiply/divide rm32 (with <a href='010---vm.cc.html#L13'>EAX</a> and <a href='010---vm.cc.html#L15'>EDX</a> if necessary) depending on subop (neg/mul/idiv)"</span><span class="Delimiter">);</span> +<span id="L249" class="LineNr"> 249 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"f7"</span><span class="Delimiter">,</span> <span class="Constant">"negate/multiply/divide rm32 (with <a href='010---vm.cc.html#L13'>EAX</a> and <a href='010---vm.cc.html#L15'>EDX</a> if necessary) depending on subop (neg/mul/idiv)"</span><span class="Delimiter">);</span> <span id="L250" class="LineNr"> 250 </span> <span id="L251" class="LineNr"> 251 </span><span class="Delimiter">:(code)</span> <span id="L252" class="LineNr"> 252 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L252'>test_multiply_EAX_by_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -319,7 +319,7 @@ if ('onhashchange' in window) { <span id="L258" class="LineNr"> 258 </span> <span class="Constant">" f7 e1 \n"</span> <span class="Comment">// multiply EAX by ECX</span> <span id="L259" class="LineNr"> 259 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 100 (subop mul) 001 (src ECX)</span> <span id="L260" class="LineNr"> 260 </span> <span class="Delimiter">);</span> -<span id="L261" class="LineNr"> 261 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L261" class="LineNr"> 261 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L262" class="LineNr"> 262 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L263" class="LineNr"> 263 </span> <span class="Constant">"run: r/m32 is ECX\n"</span> <span id="L264" class="LineNr"> 264 </span> <span class="Constant">"run: subop: multiply <a href='010---vm.cc.html#L13'>EAX</a> by r/m32\n"</span> @@ -329,7 +329,7 @@ if ('onhashchange' in window) { <span id="L268" class="LineNr"> 268 </span> <span id="L269" class="LineNr"> 269 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L270" class="LineNr"> 270 </span><span class="Normal">case</span> <span class="Constant">0xf7</span>: <span class="Delimiter">{</span> -<span id="L271" class="LineNr"> 271 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L271" class="LineNr"> 271 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L272" class="LineNr"> 272 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"operate on r/m32"</span> << end<span class="Delimiter">();</span> <span id="L273" class="LineNr"> 273 </span> <span class="Normal">int32_t</span>* arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L274" class="LineNr"> 274 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> subop = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span class="Comment">// middle 3 'reg opcode' bits</span> @@ -342,12 +342,12 @@ if ('onhashchange' in window) { <span id="L281" class="LineNr"> 281 </span> <a href='010---vm.cc.html#L85'>OF</a> = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EDX]<span class="Delimiter">.</span>u != <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L282" class="LineNr"> 282 </span> <a href='010---vm.cc.html#L84'>CF</a> = <a href='010---vm.cc.html#L85'>OF</a><span class="Delimiter">;</span> <span id="L283" class="LineNr"> 283 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> -<span id="L284" class="LineNr"> 284 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> +<span id="L284" class="LineNr"> 284 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> <span id="L285" class="LineNr"> 285 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L286" class="LineNr"> 286 </span> <span class="Delimiter">}</span> <span id="L287" class="LineNr"> 287 </span> <span class="Comment">// End Op f7 Subops</span> <span id="L288" class="LineNr"> 288 </span> <span class="Normal">default</span>: -<span id="L289" class="LineNr"> 289 </span> cerr << <span class="Constant">"unrecognized subop for opcode f7: "</span> << <a href='010---vm.cc.html#L410'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L289" class="LineNr"> 289 </span> cerr << <span class="Constant">"unrecognized subop for opcode f7: "</span> << <a href='010---vm.cc.html#L411'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L290" class="LineNr"> 290 </span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L291" class="LineNr"> 291 </span> <span class="Delimiter">}</span> <span id="L292" class="LineNr"> 292 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -356,7 +356,7 @@ if ('onhashchange' in window) { <span id="L295" class="LineNr"> 295 </span><span class="Comment">//:</span> <span id="L296" class="LineNr"> 296 </span> <span id="L297" class="LineNr"> 297 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L298" class="LineNr"> 298 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name_0f</a></span><span class="Delimiter">,</span> <span class="Constant">"af"</span><span class="Delimiter">,</span> <span class="Constant">"multiply rm32 into r32 (imul)"</span><span class="Delimiter">);</span> +<span id="L298" class="LineNr"> 298 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L357'>Name_0f</a></span><span class="Delimiter">,</span> <span class="Constant">"af"</span><span class="Delimiter">,</span> <span class="Constant">"multiply rm32 into r32 (imul)"</span><span class="Delimiter">);</span> <span id="L299" class="LineNr"> 299 </span> <span id="L300" class="LineNr"> 300 </span><span class="Delimiter">:(code)</span> <span id="L301" class="LineNr"> 301 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L301'>test_multiply_r32_into_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -368,7 +368,7 @@ if ('onhashchange' in window) { <span id="L307" class="LineNr"> 307 </span> <span class="Constant">" 0f af d8 \n"</span> <span class="Comment">// subtract EBX into EAX</span> <span id="L308" class="LineNr"> 308 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L309" class="LineNr"> 309 </span> <span class="Delimiter">);</span> -<span id="L310" class="LineNr"> 310 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L310" class="LineNr"> 310 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L311" class="LineNr"> 311 </span> <span class="Constant">"run: multiply <a href='010---vm.cc.html#L16'>EBX</a> by r/m32\n"</span> <span id="L312" class="LineNr"> 312 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L313" class="LineNr"> 313 </span> <span class="Constant">"run: storing 0x00000008\n"</span> @@ -377,7 +377,7 @@ if ('onhashchange' in window) { <span id="L316" class="LineNr"> 316 </span> <span id="L317" class="LineNr"> 317 </span><span class="Delimiter">:(before "End Two-Byte Opcodes Starting With 0f")</span> <span id="L318" class="LineNr"> 318 </span><span class="Normal">case</span> <span class="Constant">0xaf</span>: <span class="Delimiter">{</span> <span class="Comment">// multiply r32 by r/m32</span> -<span id="L319" class="LineNr"> 319 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L319" class="LineNr"> 319 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L320" class="LineNr"> 320 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L321" class="LineNr"> 321 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"multiply "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << <span class="Constant">" by r/m32"</span> << end<span class="Delimiter">();</span> <span id="L322" class="LineNr"> 322 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -389,7 +389,7 @@ if ('onhashchange' in window) { <span id="L328" class="LineNr"> 328 </span> <a href='010---vm.cc.html#L84'>CF</a> = <a href='010---vm.cc.html#L85'>OF</a><span class="Delimiter">;</span> <span id="L329" class="LineNr"> 329 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> <span id="L330" class="LineNr"> 330 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i = result<span class="Delimiter">;</span> -<span id="L331" class="LineNr"> 331 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> +<span id="L331" class="LineNr"> 331 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> <span id="L332" class="LineNr"> 332 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L333" class="LineNr"> 333 </span><span class="Delimiter">}</span> <span id="L334" class="LineNr"> 334 </span> @@ -404,7 +404,7 @@ if ('onhashchange' in window) { <span id="L343" class="LineNr"> 343 </span> <span class="Constant">" f7 db \n"</span> <span class="Comment">// negate EBX</span> <span id="L344" class="LineNr"> 344 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (subop negate) 011 (dest EBX)</span> <span id="L345" class="LineNr"> 345 </span> <span class="Delimiter">);</span> -<span id="L346" class="LineNr"> 346 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L346" class="LineNr"> 346 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L347" class="LineNr"> 347 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L348" class="LineNr"> 348 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L349" class="LineNr"> 349 </span> <span class="Constant">"run: subop: negate\n"</span> @@ -430,7 +430,7 @@ if ('onhashchange' in window) { <span id="L369" class="LineNr"> 369 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Delimiter">(</span>*arg1 != <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L370" class="LineNr"> 370 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> <span id="L371" class="LineNr"> 371 </span> *arg1 = result<span class="Delimiter">;</span> -<span id="L372" class="LineNr"> 372 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> +<span id="L372" class="LineNr"> 372 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> <span id="L373" class="LineNr"> 373 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L374" class="LineNr"> 374 </span><span class="Delimiter">}</span> <span id="L375" class="LineNr"> 375 </span> @@ -444,7 +444,7 @@ if ('onhashchange' in window) { <span id="L383" class="LineNr"> 383 </span> <span class="Constant">" f7 db \n"</span> <span class="Comment">// negate EBX</span> <span id="L384" class="LineNr"> 384 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (subop negate) 011 (dest EBX)</span> <span id="L385" class="LineNr"> 385 </span> <span class="Delimiter">);</span> -<span id="L386" class="LineNr"> 386 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L386" class="LineNr"> 386 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L387" class="LineNr"> 387 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L388" class="LineNr"> 388 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L389" class="LineNr"> 389 </span> <span class="Constant">"run: subop: negate\n"</span> @@ -464,7 +464,7 @@ if ('onhashchange' in window) { <span id="L403" class="LineNr"> 403 </span> <span class="Constant">" f7 f9 \n"</span> <span class="Comment">// multiply EAX by ECX</span> <span id="L404" class="LineNr"> 404 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop idiv) 001 (divisor ECX)</span> <span id="L405" class="LineNr"> 405 </span> <span class="Delimiter">);</span> -<span id="L406" class="LineNr"> 406 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L406" class="LineNr"> 406 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L407" class="LineNr"> 407 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L408" class="LineNr"> 408 </span> <span class="Constant">"run: r/m32 is ECX\n"</span> <span id="L409" class="LineNr"> 409 </span> <span class="Constant">"run: subop: divide <a href='010---vm.cc.html#L15'>EDX</a>:<a href='010---vm.cc.html#L13'>EAX</a> by r/m32, storing quotient in <a href='010---vm.cc.html#L13'>EAX</a> and remainder in EDX\n"</span> @@ -482,8 +482,8 @@ if ('onhashchange' in window) { <span id="L421" class="LineNr"> 421 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = dividend/divisor<span class="Delimiter">;</span> <span class="Comment">// quotient</span> <span id="L422" class="LineNr"> 422 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EDX]<span class="Delimiter">.</span>i = dividend%divisor<span class="Delimiter">;</span> <span class="Comment">// remainder</span> <span id="L423" class="LineNr"> 423 </span> <span class="Comment">// flag state undefined</span> -<span id="L424" class="LineNr"> 424 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"quotient: 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> -<span id="L425" class="LineNr"> 425 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"remainder: 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EDX]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> +<span id="L424" class="LineNr"> 424 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"quotient: 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> +<span id="L425" class="LineNr"> 425 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"remainder: 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EDX]<span class="Delimiter">.</span>i << end<span class="Delimiter">();</span> <span id="L426" class="LineNr"> 426 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L427" class="LineNr"> 427 </span><span class="Delimiter">}</span> <span id="L428" class="LineNr"> 428 </span> @@ -498,7 +498,7 @@ if ('onhashchange' in window) { <span id="L437" class="LineNr"> 437 </span> <span class="Constant">" f7 f9 \n"</span> <span class="Comment">// multiply EAX by ECX</span> <span id="L438" class="LineNr"> 438 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop idiv) 001 (divisor ECX)</span> <span id="L439" class="LineNr"> 439 </span> <span class="Delimiter">);</span> -<span id="L440" class="LineNr"> 440 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L440" class="LineNr"> 440 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L441" class="LineNr"> 441 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L442" class="LineNr"> 442 </span> <span class="Constant">"run: r/m32 is ECX\n"</span> <span id="L443" class="LineNr"> 443 </span> <span class="Constant">"run: subop: divide <a href='010---vm.cc.html#L15'>EDX</a>:<a href='010---vm.cc.html#L13'>EAX</a> by r/m32, storing quotient in <a href='010---vm.cc.html#L13'>EAX</a> and remainder in EDX\n"</span> @@ -517,7 +517,7 @@ if ('onhashchange' in window) { <span id="L456" class="LineNr"> 456 </span> <span class="Constant">" f7 f9 \n"</span> <span class="Comment">// multiply EAX by ECX</span> <span id="L457" class="LineNr"> 457 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop idiv) 001 (divisor ECX)</span> <span id="L458" class="LineNr"> 458 </span> <span class="Delimiter">);</span> -<span id="L459" class="LineNr"> 459 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L459" class="LineNr"> 459 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L460" class="LineNr"> 460 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L461" class="LineNr"> 461 </span> <span class="Constant">"run: r/m32 is ECX\n"</span> <span id="L462" class="LineNr"> 462 </span> <span class="Constant">"run: subop: divide <a href='010---vm.cc.html#L15'>EDX</a>:<a href='010---vm.cc.html#L13'>EAX</a> by r/m32, storing quotient in <a href='010---vm.cc.html#L13'>EAX</a> and remainder in EDX\n"</span> @@ -536,7 +536,7 @@ if ('onhashchange' in window) { <span id="L475" class="LineNr"> 475 </span> <span class="Constant">" f7 f9 \n"</span> <span class="Comment">// multiply EAX by ECX</span> <span id="L476" class="LineNr"> 476 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop idiv) 001 (divisor ECX)</span> <span id="L477" class="LineNr"> 477 </span> <span class="Delimiter">);</span> -<span id="L478" class="LineNr"> 478 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L478" class="LineNr"> 478 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L479" class="LineNr"> 479 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L480" class="LineNr"> 480 </span> <span class="Constant">"run: r/m32 is ECX\n"</span> <span id="L481" class="LineNr"> 481 </span> <span class="Constant">"run: subop: divide <a href='010---vm.cc.html#L15'>EDX</a>:<a href='010---vm.cc.html#L13'>EAX</a> by r/m32, storing quotient in <a href='010---vm.cc.html#L13'>EAX</a> and remainder in EDX\n"</span> @@ -548,7 +548,7 @@ if ('onhashchange' in window) { <span id="L487" class="LineNr"> 487 </span><span class="SalientComment">//:: shift left</span> <span id="L488" class="LineNr"> 488 </span> <span id="L489" class="LineNr"> 489 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L490" class="LineNr"> 490 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"d3"</span><span class="Delimiter">,</span> <span class="Constant">"shift rm32 by CL bits depending on subop (sal/sar/shl/shr)"</span><span class="Delimiter">);</span> +<span id="L490" class="LineNr"> 490 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"d3"</span><span class="Delimiter">,</span> <span class="Constant">"shift rm32 by CL bits depending on subop (sal/sar/shl/shr)"</span><span class="Delimiter">);</span> <span id="L491" class="LineNr"> 491 </span> <span id="L492" class="LineNr"> 492 </span><span class="Delimiter">:(code)</span> <span id="L493" class="LineNr"> 493 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L493'>test_shift_left_r32_with_cl</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -560,7 +560,7 @@ if ('onhashchange' in window) { <span id="L499" class="LineNr"> 499 </span> <span class="Constant">" d3 e3 \n"</span> <span class="Comment">// shift EBX left by CL bits</span> <span id="L500" class="LineNr"> 500 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 100 (subop shift left) 011 (dest EBX)</span> <span id="L501" class="LineNr"> 501 </span> <span class="Delimiter">);</span> -<span id="L502" class="LineNr"> 502 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L502" class="LineNr"> 502 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L503" class="LineNr"> 503 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L504" class="LineNr"> 504 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L505" class="LineNr"> 505 </span> <span class="Constant">"run: subop: shift left by CL bits\n"</span> @@ -570,7 +570,7 @@ if ('onhashchange' in window) { <span id="L509" class="LineNr"> 509 </span> <span id="L510" class="LineNr"> 510 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L511" class="LineNr"> 511 </span><span class="Normal">case</span> <span class="Constant">0xd3</span>: <span class="Delimiter">{</span> -<span id="L512" class="LineNr"> 512 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L512" class="LineNr"> 512 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L513" class="LineNr"> 513 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"operate on r/m32"</span> << end<span class="Delimiter">();</span> <span id="L514" class="LineNr"> 514 </span> <span class="Normal">int32_t</span>* arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L515" class="LineNr"> 515 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> subop = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span class="Comment">// middle 3 'reg opcode' bits</span> @@ -590,12 +590,12 @@ if ('onhashchange' in window) { <span id="L529" class="LineNr"> 529 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Delimiter">(</span>*arg1 << <span class="Delimiter">(</span>count-<span class="Constant">1</span><span class="Delimiter">))</span> & <span class="Constant">0x80000000</span><span class="Delimiter">;</span> <span id="L530" class="LineNr"> 530 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"SF="</span> << SF << <span class="Constant">"; ZF="</span> << <a href='010---vm.cc.html#L83'>ZF</a> << <span class="Constant">"; CF="</span> << <a href='010---vm.cc.html#L84'>CF</a> << <span class="Constant">"; OF="</span> << <a href='010---vm.cc.html#L85'>OF</a> << end<span class="Delimiter">();</span> <span id="L531" class="LineNr"> 531 </span> *arg1 = result<span class="Delimiter">;</span> -<span id="L532" class="LineNr"> 532 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> +<span id="L532" class="LineNr"> 532 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> <span id="L533" class="LineNr"> 533 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L534" class="LineNr"> 534 </span> <span class="Delimiter">}</span> <span id="L535" class="LineNr"> 535 </span> <span class="Comment">// End Op d3 Subops</span> <span id="L536" class="LineNr"> 536 </span> <span class="Normal">default</span>: -<span id="L537" class="LineNr"> 537 </span> cerr << <span class="Constant">"unrecognized subop for opcode d3: "</span> << <a href='010---vm.cc.html#L410'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L537" class="LineNr"> 537 </span> cerr << <span class="Constant">"unrecognized subop for opcode d3: "</span> << <a href='010---vm.cc.html#L411'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L538" class="LineNr"> 538 </span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L539" class="LineNr"> 539 </span> <span class="Delimiter">}</span> <span id="L540" class="LineNr"> 540 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -613,7 +613,7 @@ if ('onhashchange' in window) { <span id="L552" class="LineNr"> 552 </span> <span class="Constant">" d3 fb \n"</span> <span class="Comment">// shift EBX right by CL bits, while preserving sign</span> <span id="L553" class="LineNr"> 553 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop shift right arithmetic) 011 (dest EBX)</span> <span id="L554" class="LineNr"> 554 </span> <span class="Delimiter">);</span> -<span id="L555" class="LineNr"> 555 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L555" class="LineNr"> 555 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L556" class="LineNr"> 556 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L557" class="LineNr"> 557 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L558" class="LineNr"> 558 </span> <span class="Constant">"run: subop: shift right by CL bits, while preserving sign\n"</span> @@ -631,7 +631,7 @@ if ('onhashchange' in window) { <span id="L570" class="LineNr"> 570 </span> <span class="Comment">// OF is only defined if count is 1</span> <span id="L571" class="LineNr"> 571 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>count == <span class="Constant">1</span><span class="Delimiter">)</span> <a href='010---vm.cc.html#L85'>OF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L572" class="LineNr"> 572 </span> <span class="Comment">// CF undefined</span> -<span id="L573" class="LineNr"> 573 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> +<span id="L573" class="LineNr"> 573 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> <span id="L574" class="LineNr"> 574 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L575" class="LineNr"> 575 </span><span class="Delimiter">}</span> <span id="L576" class="LineNr"> 576 </span> @@ -645,7 +645,7 @@ if ('onhashchange' in window) { <span id="L584" class="LineNr"> 584 </span> <span class="Constant">" d3 fb \n"</span> <span class="Comment">// shift EBX right by CL bits, while preserving sign</span> <span id="L585" class="LineNr"> 585 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop shift right arithmetic) 011 (dest EBX)</span> <span id="L586" class="LineNr"> 586 </span> <span class="Delimiter">);</span> -<span id="L587" class="LineNr"> 587 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L587" class="LineNr"> 587 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L588" class="LineNr"> 588 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L589" class="LineNr"> 589 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L590" class="LineNr"> 590 </span> <span class="Constant">"run: subop: shift right by CL bits, while preserving sign\n"</span> @@ -663,7 +663,7 @@ if ('onhashchange' in window) { <span id="L602" class="LineNr"> 602 </span> <span class="Constant">" d3 fb \n"</span> <span class="Comment">// shift EBX right by CL bits, while preserving sign</span> <span id="L603" class="LineNr"> 603 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 111 (subop shift right arithmetic) 011 (dest EBX)</span> <span id="L604" class="LineNr"> 604 </span> <span class="Delimiter">);</span> -<span id="L605" class="LineNr"> 605 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L605" class="LineNr"> 605 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L606" class="LineNr"> 606 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L607" class="LineNr"> 607 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L608" class="LineNr"> 608 </span> <span class="Constant">"run: subop: shift right by CL bits, while preserving sign\n"</span> @@ -684,7 +684,7 @@ if ('onhashchange' in window) { <span id="L623" class="LineNr"> 623 </span> <span class="Constant">" d3 eb \n"</span> <span class="Comment">// shift EBX right by CL bits, while padding zeroes</span> <span id="L624" class="LineNr"> 624 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 101 (subop shift right logical) 011 (dest EBX)</span> <span id="L625" class="LineNr"> 625 </span> <span class="Delimiter">);</span> -<span id="L626" class="LineNr"> 626 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L626" class="LineNr"> 626 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L627" class="LineNr"> 627 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L628" class="LineNr"> 628 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L629" class="LineNr"> 629 </span> <span class="Constant">"run: subop: shift right by CL bits, while padding zeroes\n"</span> @@ -709,7 +709,7 @@ if ('onhashchange' in window) { <span id="L648" class="LineNr"> 648 </span> <span class="Comment">// result is always positive by definition</span> <span id="L649" class="LineNr"> 649 </span> SF = <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L650" class="LineNr"> 650 </span> <span class="Comment">// CF undefined</span> -<span id="L651" class="LineNr"> 651 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> +<span id="L651" class="LineNr"> 651 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> <span id="L652" class="LineNr"> 652 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L653" class="LineNr"> 653 </span><span class="Delimiter">}</span> <span id="L654" class="LineNr"> 654 </span> @@ -723,7 +723,7 @@ if ('onhashchange' in window) { <span id="L662" class="LineNr"> 662 </span> <span class="Constant">" d3 eb \n"</span> <span class="Comment">// shift EBX right by CL bits, while padding zeroes</span> <span id="L663" class="LineNr"> 663 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 101 (subop shift right logical) 011 (dest EBX)</span> <span id="L664" class="LineNr"> 664 </span> <span class="Delimiter">);</span> -<span id="L665" class="LineNr"> 665 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L665" class="LineNr"> 665 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L666" class="LineNr"> 666 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L667" class="LineNr"> 667 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L668" class="LineNr"> 668 </span> <span class="Constant">"run: subop: shift right by CL bits, while padding zeroes\n"</span> @@ -741,7 +741,7 @@ if ('onhashchange' in window) { <span id="L680" class="LineNr"> 680 </span> <span class="Constant">" d3 eb \n"</span> <span class="Comment">// shift EBX right by CL bits, while padding zeroes</span> <span id="L681" class="LineNr"> 681 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 101 (subop shift right logical) 011 (dest EBX)</span> <span id="L682" class="LineNr"> 682 </span> <span class="Delimiter">);</span> -<span id="L683" class="LineNr"> 683 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L683" class="LineNr"> 683 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L684" class="LineNr"> 684 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L685" class="LineNr"> 685 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L686" class="LineNr"> 686 </span> <span class="Constant">"run: subop: shift right by CL bits, while padding zeroes\n"</span> @@ -752,7 +752,7 @@ if ('onhashchange' in window) { <span id="L691" class="LineNr"> 691 </span><span class="SalientComment">//:: and</span> <span id="L692" class="LineNr"> 692 </span> <span id="L693" class="LineNr"> 693 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L694" class="LineNr"> 694 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"21"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise AND of r32 with rm32 (and)"</span><span class="Delimiter">);</span> +<span id="L694" class="LineNr"> 694 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"21"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise AND of r32 with rm32 (and)"</span><span class="Delimiter">);</span> <span id="L695" class="LineNr"> 695 </span> <span id="L696" class="LineNr"> 696 </span><span class="Delimiter">:(code)</span> <span id="L697" class="LineNr"> 697 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L697'>test_and_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -764,7 +764,7 @@ if ('onhashchange' in window) { <span id="L703" class="LineNr"> 703 </span> <span class="Constant">" 21 d8 \n"</span> <span class="Comment">// and EBX with destination EAX</span> <span id="L704" class="LineNr"> 704 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L705" class="LineNr"> 705 </span> <span class="Delimiter">);</span> -<span id="L706" class="LineNr"> 706 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L706" class="LineNr"> 706 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L707" class="LineNr"> 707 </span> <span class="Constant">"run: and <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L708" class="LineNr"> 708 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L709" class="LineNr"> 709 </span> <span class="Constant">"run: storing 0x0000000d\n"</span> @@ -773,14 +773,14 @@ if ('onhashchange' in window) { <span id="L712" class="LineNr"> 712 </span> <span id="L713" class="LineNr"> 713 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L714" class="LineNr"> 714 </span><span class="Normal">case</span> <span class="Constant">0x21</span>: <span class="Delimiter">{</span> <span class="Comment">// and r32 with r/m32</span> -<span id="L715" class="LineNr"> 715 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L715" class="LineNr"> 715 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L716" class="LineNr"> 716 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> arg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L717" class="LineNr"> 717 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"and "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L718" class="LineNr"> 718 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L719" class="LineNr"> 719 </span> <span class="Comment">// difference</span> <span id="L720" class="LineNr"> 720 </span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L721" class="LineNr"> 721 </span> *signed_arg1 &= <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg2]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> -<span id="L722" class="LineNr"> 722 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> +<span id="L722" class="LineNr"> 722 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> <span id="L723" class="LineNr"> 723 </span> SF = <span class="Delimiter">(</span>*signed_arg1 >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L724" class="LineNr"> 724 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span>*signed_arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L725" class="LineNr"> 725 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -792,7 +792,7 @@ if ('onhashchange' in window) { <span id="L731" class="LineNr"> 731 </span><span class="SalientComment">//:: or</span> <span id="L732" class="LineNr"> 732 </span> <span id="L733" class="LineNr"> 733 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L734" class="LineNr"> 734 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"09"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise OR of r32 with rm32 (or)"</span><span class="Delimiter">);</span> +<span id="L734" class="LineNr"> 734 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"09"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise OR of r32 with rm32 (or)"</span><span class="Delimiter">);</span> <span id="L735" class="LineNr"> 735 </span> <span id="L736" class="LineNr"> 736 </span><span class="Delimiter">:(code)</span> <span id="L737" class="LineNr"> 737 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L737'>test_or_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -804,7 +804,7 @@ if ('onhashchange' in window) { <span id="L743" class="LineNr"> 743 </span> <span class="Constant">" 09 d8 \n"</span> <span class="Comment">// or EBX with destination EAX</span> <span id="L744" class="LineNr"> 744 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L745" class="LineNr"> 745 </span> <span class="Delimiter">);</span> -<span id="L746" class="LineNr"> 746 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L746" class="LineNr"> 746 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L747" class="LineNr"> 747 </span> <span class="Constant">"run: or <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L748" class="LineNr"> 748 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L749" class="LineNr"> 749 </span> <span class="Constant">"run: storing 0xaabbccdd\n"</span> @@ -813,14 +813,14 @@ if ('onhashchange' in window) { <span id="L752" class="LineNr"> 752 </span> <span id="L753" class="LineNr"> 753 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L754" class="LineNr"> 754 </span><span class="Normal">case</span> <span class="Constant">0x09</span>: <span class="Delimiter">{</span> <span class="Comment">// or r32 with r/m32</span> -<span id="L755" class="LineNr"> 755 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L755" class="LineNr"> 755 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L756" class="LineNr"> 756 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> arg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L757" class="LineNr"> 757 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"or "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L758" class="LineNr"> 758 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L759" class="LineNr"> 759 </span> <span class="Comment">// difference</span> <span id="L760" class="LineNr"> 760 </span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L761" class="LineNr"> 761 </span> *signed_arg1 |= <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg2]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> -<span id="L762" class="LineNr"> 762 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> +<span id="L762" class="LineNr"> 762 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> <span id="L763" class="LineNr"> 763 </span> SF = <span class="Delimiter">(</span>*signed_arg1 >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L764" class="LineNr"> 764 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span>*signed_arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L765" class="LineNr"> 765 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -832,7 +832,7 @@ if ('onhashchange' in window) { <span id="L771" class="LineNr"> 771 </span><span class="SalientComment">//:: xor</span> <span id="L772" class="LineNr"> 772 </span> <span id="L773" class="LineNr"> 773 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L774" class="LineNr"> 774 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"31"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise XOR of r32 with rm32 (xor)"</span><span class="Delimiter">);</span> +<span id="L774" class="LineNr"> 774 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"31"</span><span class="Delimiter">,</span> <span class="Constant">"rm32 = bitwise XOR of r32 with rm32 (xor)"</span><span class="Delimiter">);</span> <span id="L775" class="LineNr"> 775 </span> <span id="L776" class="LineNr"> 776 </span><span class="Delimiter">:(code)</span> <span id="L777" class="LineNr"> 777 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L777'>test_xor_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -844,7 +844,7 @@ if ('onhashchange' in window) { <span id="L783" class="LineNr"> 783 </span> <span class="Constant">" 31 d8 \n"</span> <span class="Comment">// xor EBX with destination EAX</span> <span id="L784" class="LineNr"> 784 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L785" class="LineNr"> 785 </span> <span class="Delimiter">);</span> -<span id="L786" class="LineNr"> 786 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L786" class="LineNr"> 786 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L787" class="LineNr"> 787 </span> <span class="Constant">"run: xor <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L788" class="LineNr"> 788 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L789" class="LineNr"> 789 </span> <span class="Constant">"run: storing 0xa0b0ccdd\n"</span> @@ -853,14 +853,14 @@ if ('onhashchange' in window) { <span id="L792" class="LineNr"> 792 </span> <span id="L793" class="LineNr"> 793 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L794" class="LineNr"> 794 </span><span class="Normal">case</span> <span class="Constant">0x31</span>: <span class="Delimiter">{</span> <span class="Comment">// xor r32 with r/m32</span> -<span id="L795" class="LineNr"> 795 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L795" class="LineNr"> 795 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L796" class="LineNr"> 796 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> arg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L797" class="LineNr"> 797 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"xor "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg2<span class="Delimiter">)</span> << <span class="Constant">" with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L798" class="LineNr"> 798 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L799" class="LineNr"> 799 </span> <span class="Comment">// difference</span> <span id="L800" class="LineNr"> 800 </span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L801" class="LineNr"> 801 </span> *signed_arg1 ^= <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg2]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> -<span id="L802" class="LineNr"> 802 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> +<span id="L802" class="LineNr"> 802 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *signed_arg1 << end<span class="Delimiter">();</span> <span id="L803" class="LineNr"> 803 </span> SF = <span class="Delimiter">(</span>*signed_arg1 >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L804" class="LineNr"> 804 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span>*signed_arg1 == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L805" class="LineNr"> 805 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -880,7 +880,7 @@ if ('onhashchange' in window) { <span id="L819" class="LineNr"> 819 </span> <span class="Constant">" f7 d3 \n"</span> <span class="Comment">// not EBX</span> <span id="L820" class="LineNr"> 820 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 010 (subop not) 011 (dest EBX)</span> <span id="L821" class="LineNr"> 821 </span> <span class="Delimiter">);</span> -<span id="L822" class="LineNr"> 822 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L822" class="LineNr"> 822 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L823" class="LineNr"> 823 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L824" class="LineNr"> 824 </span> <span class="Constant">"run: r/m32 is EBX\n"</span> <span id="L825" class="LineNr"> 825 </span> <span class="Constant">"run: subop: not\n"</span> @@ -892,7 +892,7 @@ if ('onhashchange' in window) { <span id="L831" class="LineNr"> 831 </span><span class="Normal">case</span> <span class="Constant">2</span>: <span class="Delimiter">{</span> <span class="Comment">// not r/m32</span> <span id="L832" class="LineNr"> 832 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"subop: not"</span> << end<span class="Delimiter">();</span> <span id="L833" class="LineNr"> 833 </span> *arg1 = ~<span class="Delimiter">(</span>*arg1<span class="Delimiter">);</span> -<span id="L834" class="LineNr"> 834 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> +<span id="L834" class="LineNr"> 834 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << end<span class="Delimiter">();</span> <span id="L835" class="LineNr"> 835 </span> <span class="Comment">// no flags affected</span> <span id="L836" class="LineNr"> 836 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L837" class="LineNr"> 837 </span><span class="Delimiter">}</span> @@ -900,7 +900,7 @@ if ('onhashchange' in window) { <span id="L839" class="LineNr"> 839 </span><span class="SalientComment">//:: compare (cmp)</span> <span id="L840" class="LineNr"> 840 </span> <span id="L841" class="LineNr"> 841 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L842" class="LineNr"> 842 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"39"</span><span class="Delimiter">,</span> <span class="Constant">"compare: set SF if rm32 < r32 (cmp)"</span><span class="Delimiter">);</span> +<span id="L842" class="LineNr"> 842 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"39"</span><span class="Delimiter">,</span> <span class="Constant">"compare: set SF if rm32 < r32 (cmp)"</span><span class="Delimiter">);</span> <span id="L843" class="LineNr"> 843 </span> <span id="L844" class="LineNr"> 844 </span><span class="Delimiter">:(code)</span> <span id="L845" class="LineNr"> 845 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L845'>test_compare_r32_with_r32_greater</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -912,7 +912,7 @@ if ('onhashchange' in window) { <span id="L851" class="LineNr"> 851 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX with EBX</span> <span id="L852" class="LineNr"> 852 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L853" class="LineNr"> 853 </span> <span class="Delimiter">);</span> -<span id="L854" class="LineNr"> 854 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L854" class="LineNr"> 854 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L855" class="LineNr"> 855 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L856" class="LineNr"> 856 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L857" class="LineNr"> 857 </span> <span class="Constant">"run: SF=0; ZF=0; CF=0; OF=0\n"</span> @@ -921,7 +921,7 @@ if ('onhashchange' in window) { <span id="L860" class="LineNr"> 860 </span> <span id="L861" class="LineNr"> 861 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L862" class="LineNr"> 862 </span><span class="Normal">case</span> <span class="Constant">0x39</span>: <span class="Delimiter">{</span> <span class="Comment">// set SF if r/m32 < r32</span> -<span id="L863" class="LineNr"> 863 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L863" class="LineNr"> 863 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L864" class="LineNr"> 864 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> reg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L865" class="LineNr"> 865 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"compare r/m32 with "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>reg2<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L866" class="LineNr"> 866 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -949,7 +949,7 @@ if ('onhashchange' in window) { <span id="L888" class="LineNr"> 888 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX with EBX</span> <span id="L889" class="LineNr"> 889 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L890" class="LineNr"> 890 </span> <span class="Delimiter">);</span> -<span id="L891" class="LineNr"> 891 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L891" class="LineNr"> 891 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L892" class="LineNr"> 892 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L893" class="LineNr"> 893 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L894" class="LineNr"> 894 </span> <span class="Constant">"run: SF=1; ZF=0; CF=1; OF=0\n"</span> @@ -965,7 +965,7 @@ if ('onhashchange' in window) { <span id="L904" class="LineNr"> 904 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX with EBX</span> <span id="L905" class="LineNr"> 905 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L906" class="LineNr"> 906 </span> <span class="Delimiter">);</span> -<span id="L907" class="LineNr"> 907 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L907" class="LineNr"> 907 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L908" class="LineNr"> 908 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L909" class="LineNr"> 909 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L910" class="LineNr"> 910 </span> <span class="Constant">"run: SF=1; ZF=0; CF=1; OF=1\n"</span> @@ -981,7 +981,7 @@ if ('onhashchange' in window) { <span id="L920" class="LineNr"> 920 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX with EBX</span> <span id="L921" class="LineNr"> 921 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L922" class="LineNr"> 922 </span> <span class="Delimiter">);</span> -<span id="L923" class="LineNr"> 923 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L923" class="LineNr"> 923 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L924" class="LineNr"> 924 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L925" class="LineNr"> 925 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L926" class="LineNr"> 926 </span> <span class="Constant">"run: SF=1; ZF=0; CF=0; OF=0\n"</span> @@ -997,7 +997,7 @@ if ('onhashchange' in window) { <span id="L936" class="LineNr"> 936 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX with EBX</span> <span id="L937" class="LineNr"> 937 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L938" class="LineNr"> 938 </span> <span class="Delimiter">);</span> -<span id="L939" class="LineNr"> 939 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L939" class="LineNr"> 939 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L940" class="LineNr"> 940 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L941" class="LineNr"> 941 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L942" class="LineNr"> 942 </span> <span class="Constant">"run: SF=0; ZF=0; CF=1; OF=0\n"</span> @@ -1013,7 +1013,7 @@ if ('onhashchange' in window) { <span id="L952" class="LineNr"> 952 </span> <span class="Constant">" 39 d8 \n"</span> <span class="Comment">// compare EAX and EBX</span> <span id="L953" class="LineNr"> 953 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L954" class="LineNr"> 954 </span> <span class="Delimiter">);</span> -<span id="L955" class="LineNr"> 955 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L955" class="LineNr"> 955 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L956" class="LineNr"> 956 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L957" class="LineNr"> 957 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L958" class="LineNr"> 958 </span> <span class="Constant">"run: SF=0; ZF=1; CF=0; OF=0\n"</span> @@ -1023,7 +1023,7 @@ if ('onhashchange' in window) { <span id="L962" class="LineNr"> 962 </span><span class="SalientComment">//:: copy (mov)</span> <span id="L963" class="LineNr"> 963 </span> <span id="L964" class="LineNr"> 964 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L965" class="LineNr"> 965 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"89"</span><span class="Delimiter">,</span> <span class="Constant">"copy r32 to rm32 (mov)"</span><span class="Delimiter">);</span> +<span id="L965" class="LineNr"> 965 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"89"</span><span class="Delimiter">,</span> <span class="Constant">"copy r32 to rm32 (mov)"</span><span class="Delimiter">);</span> <span id="L966" class="LineNr"> 966 </span> <span id="L967" class="LineNr"> 967 </span><span class="Delimiter">:(code)</span> <span id="L968" class="LineNr"> 968 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L968'>test_copy_r32_to_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1034,7 +1034,7 @@ if ('onhashchange' in window) { <span id="L973" class="LineNr"> 973 </span> <span class="Constant">" 89 d8 \n"</span> <span class="Comment">// copy EBX to EAX</span> <span id="L974" class="LineNr"> 974 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L975" class="LineNr"> 975 </span> <span class="Delimiter">);</span> -<span id="L976" class="LineNr"> 976 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L976" class="LineNr"> 976 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L977" class="LineNr"> 977 </span> <span class="Constant">"run: copy <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L978" class="LineNr"> 978 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L979" class="LineNr"> 979 </span> <span class="Constant">"run: storing 0x000000af\n"</span> @@ -1043,19 +1043,19 @@ if ('onhashchange' in window) { <span id="L982" class="LineNr"> 982 </span> <span id="L983" class="LineNr"> 983 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L984" class="LineNr"> 984 </span><span class="Normal">case</span> <span class="Constant">0x89</span>: <span class="Delimiter">{</span> <span class="Comment">// copy r32 to r/m32</span> -<span id="L985" class="LineNr"> 985 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L985" class="LineNr"> 985 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L986" class="LineNr"> 986 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> rsrc = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L987" class="LineNr"> 987 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"copy "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rsrc<span class="Delimiter">)</span> << <span class="Constant">" to r/m32"</span> << end<span class="Delimiter">();</span> <span id="L988" class="LineNr"> 988 </span> <span class="Normal">int32_t</span>* dest = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L989" class="LineNr"> 989 </span> *dest = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rsrc]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> -<span id="L990" class="LineNr"> 990 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *dest << end<span class="Delimiter">();</span> +<span id="L990" class="LineNr"> 990 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *dest << end<span class="Delimiter">();</span> <span id="L991" class="LineNr"> 991 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L992" class="LineNr"> 992 </span><span class="Delimiter">}</span> <span id="L993" class="LineNr"> 993 </span> <span id="L994" class="LineNr"> 994 </span><span class="SalientComment">//:: xchg</span> <span id="L995" class="LineNr"> 995 </span> <span id="L996" class="LineNr"> 996 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L997" class="LineNr"> 997 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"87"</span><span class="Delimiter">,</span> <span class="Constant">"swap the <a href='003trace.cc.html#L117'>contents</a> of r32 and rm32 (xchg)"</span><span class="Delimiter">);</span> +<span id="L997" class="LineNr"> 997 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"87"</span><span class="Delimiter">,</span> <span class="Constant">"swap the <a href='003trace.cc.html#L117'>contents</a> of r32 and rm32 (xchg)"</span><span class="Delimiter">);</span> <span id="L998" class="LineNr"> 998 </span> <span id="L999" class="LineNr"> 999 </span><span class="Delimiter">:(code)</span> <span id="L1000" class="LineNr">1000 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1000'>test_xchg_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1067,7 +1067,7 @@ if ('onhashchange' in window) { <span id="L1006" class="LineNr">1006 </span> <span class="Constant">" 87 d8 \n"</span> <span class="Comment">// exchange EBX with EAX</span> <span id="L1007" class="LineNr">1007 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 011 (src EBX) 000 (dest EAX)</span> <span id="L1008" class="LineNr">1008 </span> <span class="Delimiter">);</span> -<span id="L1009" class="LineNr">1009 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1009" class="LineNr">1009 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1010" class="LineNr">1010 </span> <span class="Constant">"run: exchange <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L1011" class="LineNr">1011 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L1012" class="LineNr">1012 </span> <span class="Constant">"run: storing 0x000000af in r/m32\n"</span> @@ -1077,29 +1077,29 @@ if ('onhashchange' in window) { <span id="L1016" class="LineNr">1016 </span> <span id="L1017" class="LineNr">1017 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L1018" class="LineNr">1018 </span><span class="Normal">case</span> <span class="Constant">0x87</span>: <span class="Delimiter">{</span> <span class="Comment">// exchange r32 with r/m32</span> -<span id="L1019" class="LineNr">1019 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L1019" class="LineNr">1019 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L1020" class="LineNr">1020 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> reg2 = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L1021" class="LineNr">1021 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"exchange "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>reg2<span class="Delimiter">)</span> << <span class="Constant">" with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L1022" class="LineNr">1022 </span> <span class="Normal">int32_t</span>* arg1 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L1023" class="LineNr">1023 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> tmp = *arg1<span class="Delimiter">;</span> <span id="L1024" class="LineNr">1024 </span> *arg1 = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg2]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> <span id="L1025" class="LineNr">1025 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg2]<span class="Delimiter">.</span>i = tmp<span class="Delimiter">;</span> -<span id="L1026" class="LineNr">1026 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg1 << <span class="Constant">" in r/m32"</span> << end<span class="Delimiter">();</span> -<span id="L1027" class="LineNr">1027 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg2]<span class="Delimiter">.</span>i << <span class="Constant">" in "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>reg2<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L1026" class="LineNr">1026 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg1 << <span class="Constant">" in r/m32"</span> << end<span class="Delimiter">();</span> +<span id="L1027" class="LineNr">1027 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg2]<span class="Delimiter">.</span>i << <span class="Constant">" in "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>reg2<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L1028" class="LineNr">1028 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L1029" class="LineNr">1029 </span><span class="Delimiter">}</span> <span id="L1030" class="LineNr">1030 </span> <span id="L1031" class="LineNr">1031 </span><span class="SalientComment">//:: increment</span> <span id="L1032" class="LineNr">1032 </span> <span id="L1033" class="LineNr">1033 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L1034" class="LineNr">1034 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"40"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L13'>EAX</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1035" class="LineNr">1035 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"41"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L14'>ECX</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1036" class="LineNr">1036 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"42"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L15'>EDX</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1037" class="LineNr">1037 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"43"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L16'>EBX</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1038" class="LineNr">1038 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"44"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L17'>ESP</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1039" class="LineNr">1039 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"45"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L18'>EBP</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1040" class="LineNr">1040 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"46"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L19'>ESI</a> (inc)"</span><span class="Delimiter">);</span> -<span id="L1041" class="LineNr">1041 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"47"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L20'>EDI</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1034" class="LineNr">1034 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"40"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L13'>EAX</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1035" class="LineNr">1035 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"41"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L14'>ECX</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1036" class="LineNr">1036 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"42"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L15'>EDX</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1037" class="LineNr">1037 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"43"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L16'>EBX</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1038" class="LineNr">1038 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"44"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L17'>ESP</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1039" class="LineNr">1039 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"45"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L18'>EBP</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1040" class="LineNr">1040 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"46"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L19'>ESI</a> (inc)"</span><span class="Delimiter">);</span> +<span id="L1041" class="LineNr">1041 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"47"</span><span class="Delimiter">,</span> <span class="Constant">"increment <a href='010---vm.cc.html#L20'>EDI</a> (inc)"</span><span class="Delimiter">);</span> <span id="L1042" class="LineNr">1042 </span> <span id="L1043" class="LineNr">1043 </span><span class="Delimiter">:(code)</span> <span id="L1044" class="LineNr">1044 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1044'>test_increment_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1109,7 +1109,7 @@ if ('onhashchange' in window) { <span id="L1048" class="LineNr">1048 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L1049" class="LineNr">1049 </span> <span class="Constant">" 41 \n"</span> <span class="Comment">// increment ECX</span> <span id="L1050" class="LineNr">1050 </span> <span class="Delimiter">);</span> -<span id="L1051" class="LineNr">1051 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1051" class="LineNr">1051 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1052" class="LineNr">1052 </span> <span class="Constant">"run: increment ECX\n"</span> <span id="L1053" class="LineNr">1053 </span> <span class="Constant">"run: storing value 0x00000020\n"</span> <span id="L1054" class="LineNr">1054 </span> <span class="Delimiter">);</span> @@ -1127,12 +1127,12 @@ if ('onhashchange' in window) { <span id="L1066" class="LineNr">1066 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> <a href='010---vm.cc.html#L23'>reg</a> = op & <span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L1067" class="LineNr">1067 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"increment "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L23'>reg</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L1068" class="LineNr">1068 </span> ++<span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> -<span id="L1069" class="LineNr">1069 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> +<span id="L1069" class="LineNr">1069 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> <span id="L1070" class="LineNr">1070 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L1071" class="LineNr">1071 </span><span class="Delimiter">}</span> <span id="L1072" class="LineNr">1072 </span> <span id="L1073" class="LineNr">1073 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L1074" class="LineNr">1074 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"ff"</span><span class="Delimiter">,</span> <span class="Constant">"increment/decrement/jump/push/call rm32 based on subop (inc/dec/jmp/push/call)"</span><span class="Delimiter">);</span> +<span id="L1074" class="LineNr">1074 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"ff"</span><span class="Delimiter">,</span> <span class="Constant">"increment/decrement/jump/push/call rm32 based on subop (inc/dec/jmp/push/call)"</span><span class="Delimiter">);</span> <span id="L1075" class="LineNr">1075 </span> <span id="L1076" class="LineNr">1076 </span><span class="Delimiter">:(code)</span> <span id="L1077" class="LineNr">1077 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1077'>test_increment_rm32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1143,7 +1143,7 @@ if ('onhashchange' in window) { <span id="L1082" class="LineNr">1082 </span> <span class="Constant">" ff c0 \n"</span> <span class="Comment">// increment EAX</span> <span id="L1083" class="LineNr">1083 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 000 (subop inc) 000 (EAX)</span> <span id="L1084" class="LineNr">1084 </span> <span class="Delimiter">);</span> -<span id="L1085" class="LineNr">1085 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1085" class="LineNr">1085 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1086" class="LineNr">1086 </span> <span class="Constant">"run: increment r/m32\n"</span> <span id="L1087" class="LineNr">1087 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L1088" class="LineNr">1088 </span> <span class="Constant">"run: storing value 0x00000021\n"</span> @@ -1152,18 +1152,18 @@ if ('onhashchange' in window) { <span id="L1091" class="LineNr">1091 </span> <span id="L1092" class="LineNr">1092 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L1093" class="LineNr">1093 </span><span class="Normal">case</span> <span class="Constant">0xff</span>: <span class="Delimiter">{</span> -<span id="L1094" class="LineNr">1094 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">();</span> +<span id="L1094" class="LineNr">1094 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">();</span> <span id="L1095" class="LineNr">1095 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> subop = <span class="Delimiter">(</span>modrm>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span class="Comment">// middle 3 'reg opcode' bits</span> <span id="L1096" class="LineNr">1096 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>subop<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L1097" class="LineNr">1097 </span> <span class="Normal">case</span> <span class="Constant">0</span>: <span class="Delimiter">{</span> <span class="Comment">// increment r/m32</span> <span id="L1098" class="LineNr">1098 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"increment r/m32"</span> << end<span class="Delimiter">();</span> <span id="L1099" class="LineNr">1099 </span> <span class="Normal">int32_t</span>* <a href='001help.cc.html#L15'>arg</a> = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L1100" class="LineNr">1100 </span> ++*arg<span class="Delimiter">;</span> -<span id="L1101" class="LineNr">1101 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg << end<span class="Delimiter">();</span> +<span id="L1101" class="LineNr">1101 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg << end<span class="Delimiter">();</span> <span id="L1102" class="LineNr">1102 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L1103" class="LineNr">1103 </span> <span class="Delimiter">}</span> <span id="L1104" class="LineNr">1104 </span> <span class="Normal">default</span>: -<span id="L1105" class="LineNr">1105 </span> cerr << <span class="Constant">"unrecognized subop for ff: "</span> << <a href='010---vm.cc.html#L407'>HEXBYTE</a> << <a href='010---vm.cc.html#L410'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L1105" class="LineNr">1105 </span> cerr << <span class="Constant">"unrecognized subop for ff: "</span> << <a href='010---vm.cc.html#L408'>HEXBYTE</a> << <a href='010---vm.cc.html#L411'>NUM</a><span class="Delimiter">(</span>subop<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L1106" class="LineNr">1106 </span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L1107" class="LineNr">1107 </span> <span class="Comment">// End Op ff Subops</span> <span id="L1108" class="LineNr">1108 </span> <span class="Delimiter">}</span> @@ -1173,14 +1173,14 @@ if ('onhashchange' in window) { <span id="L1112" class="LineNr">1112 </span><span class="SalientComment">//:: decrement</span> <span id="L1113" class="LineNr">1113 </span> <span id="L1114" class="LineNr">1114 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L1115" class="LineNr">1115 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"48"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L13'>EAX</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1116" class="LineNr">1116 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"49"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L14'>ECX</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1117" class="LineNr">1117 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4a"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L15'>EDX</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1118" class="LineNr">1118 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4b"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L16'>EBX</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1119" class="LineNr">1119 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4c"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L17'>ESP</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1120" class="LineNr">1120 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4d"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L18'>EBP</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1121" class="LineNr">1121 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4e"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L19'>ESI</a> (dec)"</span><span class="Delimiter">);</span> -<span id="L1122" class="LineNr">1122 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4f"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L20'>EDI</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1115" class="LineNr">1115 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"48"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L13'>EAX</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1116" class="LineNr">1116 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"49"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L14'>ECX</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1117" class="LineNr">1117 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4a"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L15'>EDX</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1118" class="LineNr">1118 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4b"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L16'>EBX</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1119" class="LineNr">1119 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4c"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L17'>ESP</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1120" class="LineNr">1120 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4d"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L18'>EBP</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1121" class="LineNr">1121 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4e"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L19'>ESI</a> (dec)"</span><span class="Delimiter">);</span> +<span id="L1122" class="LineNr">1122 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"4f"</span><span class="Delimiter">,</span> <span class="Constant">"decrement <a href='010---vm.cc.html#L20'>EDI</a> (dec)"</span><span class="Delimiter">);</span> <span id="L1123" class="LineNr">1123 </span> <span id="L1124" class="LineNr">1124 </span><span class="Delimiter">:(code)</span> <span id="L1125" class="LineNr">1125 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1125'>test_decrement_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1190,7 +1190,7 @@ if ('onhashchange' in window) { <span id="L1129" class="LineNr">1129 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L1130" class="LineNr">1130 </span> <span class="Constant">" 49 \n"</span> <span class="Comment">// decrement ECX</span> <span id="L1131" class="LineNr">1131 </span> <span class="Delimiter">);</span> -<span id="L1132" class="LineNr">1132 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1132" class="LineNr">1132 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1133" class="LineNr">1133 </span> <span class="Constant">"run: decrement ECX\n"</span> <span id="L1134" class="LineNr">1134 </span> <span class="Constant">"run: storing value 0x0000001e\n"</span> <span id="L1135" class="LineNr">1135 </span> <span class="Delimiter">);</span> @@ -1208,7 +1208,7 @@ if ('onhashchange' in window) { <span id="L1147" class="LineNr">1147 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> <a href='010---vm.cc.html#L23'>reg</a> = op & <span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L1148" class="LineNr">1148 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"decrement "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L23'>reg</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L1149" class="LineNr">1149 </span> --<span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> -<span id="L1150" class="LineNr">1150 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> +<span id="L1150" class="LineNr">1150 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[reg]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> <span id="L1151" class="LineNr">1151 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L1152" class="LineNr">1152 </span><span class="Delimiter">}</span> <span id="L1153" class="LineNr">1153 </span> @@ -1221,7 +1221,7 @@ if ('onhashchange' in window) { <span id="L1160" class="LineNr">1160 </span> <span class="Constant">" ff c8 \n"</span> <span class="Comment">// decrement EAX</span> <span id="L1161" class="LineNr">1161 </span> <span class="Comment">// ModR/M in binary: 11 (direct mode) 001 (subop inc) 000 (EAX)</span> <span id="L1162" class="LineNr">1162 </span> <span class="Delimiter">);</span> -<span id="L1163" class="LineNr">1163 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1163" class="LineNr">1163 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1164" class="LineNr">1164 </span> <span class="Constant">"run: decrement r/m32\n"</span> <span id="L1165" class="LineNr">1165 </span> <span class="Constant">"run: r/m32 is EAX\n"</span> <span id="L1166" class="LineNr">1166 </span> <span class="Constant">"run: storing value 0x0000001f\n"</span> @@ -1233,21 +1233,21 @@ if ('onhashchange' in window) { <span id="L1172" class="LineNr">1172 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"decrement r/m32"</span> << end<span class="Delimiter">();</span> <span id="L1173" class="LineNr">1173 </span> <span class="Normal">int32_t</span>* <a href='001help.cc.html#L15'>arg</a> = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L1174" class="LineNr">1174 </span> --*arg<span class="Delimiter">;</span> -<span id="L1175" class="LineNr">1175 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << *arg << end<span class="Delimiter">();</span> +<span id="L1175" class="LineNr">1175 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"storing value 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << *arg << end<span class="Delimiter">();</span> <span id="L1176" class="LineNr">1176 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L1177" class="LineNr">1177 </span><span class="Delimiter">}</span> <span id="L1178" class="LineNr">1178 </span> <span id="L1179" class="LineNr">1179 </span><span class="SalientComment">//:: push</span> <span id="L1180" class="LineNr">1180 </span> <span id="L1181" class="LineNr">1181 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L1182" class="LineNr">1182 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"50"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L13'>EAX</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1183" class="LineNr">1183 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"51"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L14'>ECX</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1184" class="LineNr">1184 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"52"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L15'>EDX</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1185" class="LineNr">1185 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"53"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L16'>EBX</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1186" class="LineNr">1186 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"54"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L17'>ESP</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1187" class="LineNr">1187 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"55"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L18'>EBP</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1188" class="LineNr">1188 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"56"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L19'>ESI</a> to stack (push)"</span><span class="Delimiter">);</span> -<span id="L1189" class="LineNr">1189 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"57"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L20'>EDI</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1182" class="LineNr">1182 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"50"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L13'>EAX</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1183" class="LineNr">1183 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"51"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L14'>ECX</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1184" class="LineNr">1184 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"52"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L15'>EDX</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1185" class="LineNr">1185 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"53"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L16'>EBX</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1186" class="LineNr">1186 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"54"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L17'>ESP</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1187" class="LineNr">1187 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"55"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L18'>EBP</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1188" class="LineNr">1188 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"56"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L19'>ESI</a> to stack (push)"</span><span class="Delimiter">);</span> +<span id="L1189" class="LineNr">1189 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"57"</span><span class="Delimiter">,</span> <span class="Constant">"push <a href='010---vm.cc.html#L20'>EDI</a> to stack (push)"</span><span class="Delimiter">);</span> <span id="L1190" class="LineNr">1190 </span> <span id="L1191" class="LineNr">1191 </span><span class="Delimiter">:(code)</span> <span id="L1192" class="LineNr">1192 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1192'>test_push_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1259,7 +1259,7 @@ if ('onhashchange' in window) { <span id="L1198" class="LineNr">1198 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L1199" class="LineNr">1199 </span> <span class="Constant">" 53 \n"</span> <span class="Comment">// push EBX to stack</span> <span id="L1200" class="LineNr">1200 </span> <span class="Delimiter">);</span> -<span id="L1201" class="LineNr">1201 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1201" class="LineNr">1201 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1202" class="LineNr">1202 </span> <span class="Constant">"run: <a href='012elf.cc.html#L91'>push</a> EBX\n"</span> <span id="L1203" class="LineNr">1203 </span> <span class="Constant">"run: decrementing <a href='010---vm.cc.html#L17'>ESP</a> to 0xbd000004\n"</span> <span id="L1204" class="LineNr">1204 </span> <span class="Constant">"run: pushing value 0x0000000a\n"</span> @@ -1285,20 +1285,20 @@ if ('onhashchange' in window) { <span id="L1224" class="LineNr">1224 </span><span class="SalientComment">//:: pop</span> <span id="L1225" class="LineNr">1225 </span> <span id="L1226" class="LineNr">1226 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L1227" class="LineNr">1227 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"58"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L13'>EAX</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1228" class="LineNr">1228 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"59"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L14'>ECX</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1229" class="LineNr">1229 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5a"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L15'>EDX</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1230" class="LineNr">1230 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5b"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L16'>EBX</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1231" class="LineNr">1231 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5c"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L17'>ESP</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1232" class="LineNr">1232 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5d"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L18'>EBP</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1233" class="LineNr">1233 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5e"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L19'>ESI</a> (pop)"</span><span class="Delimiter">);</span> -<span id="L1234" class="LineNr">1234 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L355'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5f"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L20'>EDI</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1227" class="LineNr">1227 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"58"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L13'>EAX</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1228" class="LineNr">1228 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"59"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L14'>ECX</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1229" class="LineNr">1229 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5a"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L15'>EDX</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1230" class="LineNr">1230 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5b"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L16'>EBX</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1231" class="LineNr">1231 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5c"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L17'>ESP</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1232" class="LineNr">1232 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5d"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L18'>EBP</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1233" class="LineNr">1233 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5e"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L19'>ESI</a> (pop)"</span><span class="Delimiter">);</span> +<span id="L1234" class="LineNr">1234 </span><a href='001help.cc.html#L261'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L356'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">"5f"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to <a href='010---vm.cc.html#L20'>EDI</a> (pop)"</span><span class="Delimiter">);</span> <span id="L1235" class="LineNr">1235 </span> <span id="L1236" class="LineNr">1236 </span><span class="Delimiter">:(code)</span> <span id="L1237" class="LineNr">1237 </span><span class="Normal">void</span> <a href='013direct_addressing.cc.html#L1237'>test_pop_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L1238" class="LineNr">1238 </span> <span class="Special"><a href='010---vm.cc.html#L157'>Mem</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>vma<span class="Delimiter">(</span><span class="Constant">0xbd000000</span><span class="Delimiter">));</span> <span class="Comment">// manually allocate memory</span> <span id="L1239" class="LineNr">1239 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u = <span class="Constant">0xbd000008</span><span class="Delimiter">;</span> -<span id="L1240" class="LineNr">1240 </span> <a href='010---vm.cc.html#L256'>write_mem_i32</a><span class="Delimiter">(</span><span class="Constant">0xbd000008</span><span class="Delimiter">,</span> <span class="Constant">0x0000000a</span><span class="Delimiter">);</span> <span class="Comment">// ..before this write</span> +<span id="L1240" class="LineNr">1240 </span> <a href='010---vm.cc.html#L257'>write_mem_i32</a><span class="Delimiter">(</span><span class="Constant">0xbd000008</span><span class="Delimiter">,</span> <span class="Constant">0x0000000a</span><span class="Delimiter">);</span> <span class="Comment">// ..before this write</span> <span id="L1241" class="LineNr">1241 </span> <a href='011run.cc.html#L85'>run</a><span class="Delimiter">(</span> <span id="L1242" class="LineNr">1242 </span> <span class="Constant">"== code 0x1\n"</span> <span class="Comment">// code segment</span> <span id="L1243" class="LineNr">1243 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> @@ -1306,7 +1306,7 @@ if ('onhashchange' in window) { <span id="L1245" class="LineNr">1245 </span> <span class="Constant">"== data 0x2000\n"</span> <span class="Comment">// data segment</span> <span id="L1246" class="LineNr">1246 </span> <span class="Constant">"0a 00 00 00\n"</span> <span class="Comment">// 0x0000000a</span> <span id="L1247" class="LineNr">1247 </span> <span class="Delimiter">);</span> -<span id="L1248" class="LineNr">1248 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L1248" class="LineNr">1248 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L1249" class="LineNr">1249 </span> <span class="Constant">"run: <a href='013direct_addressing.cc.html#L1272'>pop</a> into EBX\n"</span> <span id="L1250" class="LineNr">1250 </span> <span class="Constant">"run: popping value 0x0000000a\n"</span> <span id="L1251" class="LineNr">1251 </span> <span class="Constant">"run: incrementing <a href='010---vm.cc.html#L17'>ESP</a> to 0xbd00000c\n"</span> @@ -1332,10 +1332,10 @@ if ('onhashchange' in window) { <span id="L1271" class="LineNr">1271 </span><span class="Delimiter">:(code)</span> <span id="L1272" class="LineNr">1272 </span><span class="Normal">uint32_t</span> <a href='013direct_addressing.cc.html#L1272'>pop</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L1273" class="LineNr">1273 </span> <span class="Normal">const</span> <span class="Normal">uint32_t</span> result = <a href='010---vm.cc.html#L186'>read_mem_u32</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u<span class="Delimiter">);</span> -<span id="L1274" class="LineNr">1274 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"popping value 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << result << end<span class="Delimiter">();</span> +<span id="L1274" class="LineNr">1274 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"popping value 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << result << end<span class="Delimiter">();</span> <span id="L1275" class="LineNr">1275 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u += <span class="Constant">4</span><span class="Delimiter">;</span> -<span id="L1276" class="LineNr">1276 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"incrementing <a href='010---vm.cc.html#L17'>ESP</a> to 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> -<span id="L1277" class="LineNr">1277 </span> assert<span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u < <a href='012elf.cc.html#L151'>AFTER_STACK</a><span class="Delimiter">);</span> +<span id="L1276" class="LineNr">1276 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span>+<span class="Constant">1</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"incrementing <a href='010---vm.cc.html#L17'>ESP</a> to 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u << end<span class="Delimiter">();</span> +<span id="L1277" class="LineNr">1277 </span> assert<span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u < <a href='012elf.cc.html#L150'>AFTER_STACK</a><span class="Delimiter">);</span> <span id="L1278" class="LineNr">1278 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L1279" class="LineNr">1279 </span><span class="Delimiter">}</span> </pre> |