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/014indirect_addressing.cc.html | |
parent | 51a20da6b30f4afe0405d13bf862b5d72ccefa6d (diff) | |
download | mu-695f9bf8d0a7d0a871b8ab75270ceb29715d9be3.tar.gz |
5468
Diffstat (limited to 'html/subx/014indirect_addressing.cc.html')
-rw-r--r-- | html/subx/014indirect_addressing.cc.html | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/html/subx/014indirect_addressing.cc.html b/html/subx/014indirect_addressing.cc.html index d10849d9..6c030be3 100644 --- a/html/subx/014indirect_addressing.cc.html +++ b/html/subx/014indirect_addressing.cc.html @@ -71,7 +71,7 @@ if ('onhashchange' in window) { <span id="L12" class="LineNr"> 12 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L13" class="LineNr"> 13 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L14" class="LineNr"> 14 </span> <span class="Delimiter">);</span> -<span id="L15" class="LineNr"> 15 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L15" class="LineNr"> 15 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L16" class="LineNr"> 16 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L17" class="LineNr"> 17 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L18" class="LineNr"> 18 </span> <span class="Constant">"run: storing 0x00000011\n"</span> @@ -82,7 +82,7 @@ if ('onhashchange' in window) { <span id="L23" class="LineNr"> 23 </span><span class="Normal">case</span> <span class="Constant">0</span>: <span class="Comment">// indirect addressing</span> <span id="L24" class="LineNr"> 24 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>rm<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L25" class="LineNr"> 25 </span> <span class="Normal">default</span>: <span class="Comment">// address in register</span> -<span id="L26" class="LineNr"> 26 </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 is 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rm]<span class="Delimiter">.</span>u << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> +<span id="L26" class="LineNr"> 26 </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 is 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rm]<span class="Delimiter">.</span>u << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> <span id="L27" class="LineNr"> 27 </span> addr = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rm]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> <span id="L28" class="LineNr"> 28 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L29" class="LineNr"> 29 </span> <span class="Comment">// End Mod 0 Special-cases(addr)</span> @@ -92,7 +92,7 @@ if ('onhashchange' in window) { <span id="L33" class="LineNr"> 33 </span><span class="Comment">//:</span> <span id="L34" class="LineNr"> 34 </span> <span id="L35" class="LineNr"> 35 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L36" class="LineNr"> 36 </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">"03"</span><span class="Delimiter">,</span> <span class="Constant">"add rm32 to r32 (add)"</span><span class="Delimiter">);</span> +<span id="L36" class="LineNr"> 36 </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">"03"</span><span class="Delimiter">,</span> <span class="Constant">"add rm32 to r32 (add)"</span><span class="Delimiter">);</span> <span id="L37" class="LineNr"> 37 </span> <span id="L38" class="LineNr"> 38 </span><span class="Delimiter">:(code)</span> <span id="L39" class="LineNr"> 39 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L39'>test_add_mem_at_r32_to_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -106,7 +106,7 @@ if ('onhashchange' in window) { <span id="L47" class="LineNr"> 47 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L48" class="LineNr"> 48 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L49" class="LineNr"> 49 </span> <span class="Delimiter">);</span> -<span id="L50" class="LineNr"> 50 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L50" class="LineNr"> 50 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L51" class="LineNr"> 51 </span> <span class="Constant">"run: add r/m32 to EBX\n"</span> <span id="L52" class="LineNr"> 52 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L53" class="LineNr"> 53 </span> <span class="Constant">"run: storing 0x00000011\n"</span> @@ -115,7 +115,7 @@ if ('onhashchange' in window) { <span id="L56" class="LineNr"> 56 </span> <span id="L57" class="LineNr"> 57 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L58" class="LineNr"> 58 </span><span class="Normal">case</span> <span class="Constant">0x03</span>: <span class="Delimiter">{</span> <span class="Comment">// add r/m32 to r32</span> -<span id="L59" class="LineNr"> 59 </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="L59" class="LineNr"> 59 </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="L60" class="LineNr"> 60 </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="L61" class="LineNr"> 61 </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 r/m32 to "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L62" class="LineNr"> 62 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -131,7 +131,7 @@ if ('onhashchange' in window) { <span id="L72" class="LineNr"> 72 </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="L73" class="LineNr"> 73 </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="L74" class="LineNr"> 74 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i = signed_result<span class="Delimiter">;</span> -<span id="L75" class="LineNr"> 75 </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="L75" class="LineNr"> 75 </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="L76" class="LineNr"> 76 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L77" class="LineNr"> 77 </span><span class="Delimiter">}</span> <span id="L78" class="LineNr"> 78 </span> @@ -147,7 +147,7 @@ if ('onhashchange' in window) { <span id="L88" class="LineNr"> 88 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L89" class="LineNr"> 89 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 1</span> <span id="L90" class="LineNr"> 90 </span> <span class="Delimiter">);</span> -<span id="L91" class="LineNr"> 91 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L91" class="LineNr"> 91 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L92" class="LineNr"> 92 </span> <span class="Constant">"run: add r/m32 to EBX\n"</span> <span id="L93" class="LineNr"> 93 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L94" class="LineNr"> 94 </span> <span class="Constant">"run: effective address contains 1\n"</span> @@ -167,7 +167,7 @@ if ('onhashchange' in window) { <span id="L108" class="LineNr"> 108 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L109" class="LineNr"> 109 </span> <span class="Constant">"01 00 00 00\n"</span> <span id="L110" class="LineNr"> 110 </span> <span class="Delimiter">);</span> -<span id="L111" class="LineNr"> 111 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L111" class="LineNr"> 111 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L112" class="LineNr"> 112 </span> <span class="Constant">"run: add r/m32 to EBX\n"</span> <span id="L113" class="LineNr"> 113 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L114" class="LineNr"> 114 </span> <span class="Constant">"run: effective address contains 1\n"</span> @@ -187,7 +187,7 @@ if ('onhashchange' in window) { <span id="L128" class="LineNr"> 128 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L129" class="LineNr"> 129 </span> <span class="Constant">"00 00 00 80\n"</span> <span class="Comment">// smallest negative signed integer</span> <span id="L130" class="LineNr"> 130 </span> <span class="Delimiter">);</span> -<span id="L131" class="LineNr"> 131 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L131" class="LineNr"> 131 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L132" class="LineNr"> 132 </span> <span class="Constant">"run: add r/m32 to EBX\n"</span> <span id="L133" class="LineNr"> 133 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L134" class="LineNr"> 134 </span> <span class="Constant">"run: effective address contains 80000000\n"</span> @@ -210,7 +210,7 @@ if ('onhashchange' in window) { <span id="L151" class="LineNr"> 151 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L152" class="LineNr"> 152 </span> <span class="Constant">"0a 00 00 00\n"</span> <span class="Comment">// 0x0000000a</span> <span id="L153" class="LineNr"> 153 </span> <span class="Delimiter">);</span> -<span id="L154" class="LineNr"> 154 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L154" class="LineNr"> 154 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L155" class="LineNr"> 155 </span> <span class="Constant">"run: subtract <a href='010---vm.cc.html#L16'>EBX</a> from r/m32\n"</span> <span id="L156" class="LineNr"> 156 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L157" class="LineNr"> 157 </span> <span class="Constant">"run: storing 0x00000009\n"</span> @@ -220,7 +220,7 @@ if ('onhashchange' in window) { <span id="L161" class="LineNr"> 161 </span><span class="Comment">//:</span> <span id="L162" class="LineNr"> 162 </span> <span id="L163" class="LineNr"> 163 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L164" class="LineNr"> 164 </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">"2b"</span><span class="Delimiter">,</span> <span class="Constant">"subtract rm32 from r32 (sub)"</span><span class="Delimiter">);</span> +<span id="L164" class="LineNr"> 164 </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">"2b"</span><span class="Delimiter">,</span> <span class="Constant">"subtract rm32 from r32 (sub)"</span><span class="Delimiter">);</span> <span id="L165" class="LineNr"> 165 </span> <span id="L166" class="LineNr"> 166 </span><span class="Delimiter">:(code)</span> <span id="L167" class="LineNr"> 167 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L167'>test_subtract_mem_at_r32_from_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -234,7 +234,7 @@ if ('onhashchange' in window) { <span id="L175" class="LineNr"> 175 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L176" class="LineNr"> 176 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L177" class="LineNr"> 177 </span> <span class="Delimiter">);</span> -<span id="L178" class="LineNr"> 178 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L178" class="LineNr"> 178 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L179" class="LineNr"> 179 </span> <span class="Constant">"run: subtract r/m32 from EBX\n"</span> <span id="L180" class="LineNr"> 180 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L181" class="LineNr"> 181 </span> <span class="Constant">"run: storing 0x00000009\n"</span> @@ -243,7 +243,7 @@ if ('onhashchange' in window) { <span id="L184" class="LineNr"> 184 </span> <span id="L185" class="LineNr"> 185 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L186" class="LineNr"> 186 </span><span class="Normal">case</span> <span class="Constant">0x2b</span>: <span class="Delimiter">{</span> <span class="Comment">// subtract r/m32 from r32</span> -<span id="L187" class="LineNr"> 187 </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="L187" class="LineNr"> 187 </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="L188" class="LineNr"> 188 </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="L189" class="LineNr"> 189 </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 r/m32 from "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L190" class="LineNr"> 190 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -259,7 +259,7 @@ if ('onhashchange' in window) { <span id="L200" class="LineNr"> 200 </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="L201" class="LineNr"> 201 </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="L202" class="LineNr"> 202 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i = signed_result<span class="Delimiter">;</span> -<span id="L203" class="LineNr"> 203 </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="L203" class="LineNr"> 203 </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="L204" class="LineNr"> 204 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L205" class="LineNr"> 205 </span><span class="Delimiter">}</span> <span id="L206" class="LineNr"> 206 </span> @@ -275,7 +275,7 @@ if ('onhashchange' in window) { <span id="L216" class="LineNr"> 216 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L217" class="LineNr"> 217 </span> <span class="Constant">"ff ff ff 7f\n"</span> <span class="Comment">// largest positive signed integer</span> <span id="L218" class="LineNr"> 218 </span> <span class="Delimiter">);</span> -<span id="L219" class="LineNr"> 219 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L219" class="LineNr"> 219 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L220" class="LineNr"> 220 </span> <span class="Constant">"run: subtract r/m32 from EBX\n"</span> <span id="L221" class="LineNr"> 221 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L222" class="LineNr"> 222 </span> <span class="Constant">"run: effective address contains 7fffffff\n"</span> @@ -295,7 +295,7 @@ if ('onhashchange' in window) { <span id="L236" class="LineNr"> 236 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L237" class="LineNr"> 237 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 1</span> <span id="L238" class="LineNr"> 238 </span> <span class="Delimiter">);</span> -<span id="L239" class="LineNr"> 239 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L239" class="LineNr"> 239 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L240" class="LineNr"> 240 </span> <span class="Constant">"run: subtract r/m32 from EBX\n"</span> <span id="L241" class="LineNr"> 241 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L242" class="LineNr"> 242 </span> <span class="Constant">"run: effective address contains 1\n"</span> @@ -315,7 +315,7 @@ if ('onhashchange' in window) { <span id="L256" class="LineNr"> 256 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L257" class="LineNr"> 257 </span> <span class="Constant">"00 00 00 80\n"</span> <span class="Comment">// smallest negative signed integer</span> <span id="L258" class="LineNr"> 258 </span> <span class="Delimiter">);</span> -<span id="L259" class="LineNr"> 259 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L259" class="LineNr"> 259 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L260" class="LineNr"> 260 </span> <span class="Constant">"run: subtract r/m32 from EBX\n"</span> <span id="L261" class="LineNr"> 261 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L262" class="LineNr"> 262 </span> <span class="Constant">"run: effective address contains 80000000\n"</span> @@ -337,7 +337,7 @@ if ('onhashchange' in window) { <span id="L278" class="LineNr"> 278 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L279" class="LineNr"> 279 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L280" class="LineNr"> 280 </span> <span class="Delimiter">);</span> -<span id="L281" class="LineNr"> 281 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L281" class="LineNr"> 281 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L282" class="LineNr"> 282 </span> <span class="Constant">"run: and <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L283" class="LineNr"> 283 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L284" class="LineNr"> 284 </span> <span class="Constant">"run: storing 0x0000000d\n"</span> @@ -347,7 +347,7 @@ if ('onhashchange' in window) { <span id="L288" class="LineNr"> 288 </span><span class="Comment">//:</span> <span id="L289" class="LineNr"> 289 </span> <span id="L290" class="LineNr"> 290 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L291" class="LineNr"> 291 </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">"23"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise AND of r32 with rm32 (and)"</span><span class="Delimiter">);</span> +<span id="L291" class="LineNr"> 291 </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">"23"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise AND of r32 with rm32 (and)"</span><span class="Delimiter">);</span> <span id="L292" class="LineNr"> 292 </span> <span id="L293" class="LineNr"> 293 </span><span class="Delimiter">:(code)</span> <span id="L294" class="LineNr"> 294 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L294'>test_and_mem_at_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -361,7 +361,7 @@ if ('onhashchange' in window) { <span id="L302" class="LineNr"> 302 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L303" class="LineNr"> 303 </span> <span class="Constant">"ff 00 00 00\n"</span> <span class="Comment">// 0x000000ff</span> <span id="L304" class="LineNr"> 304 </span> <span class="Delimiter">);</span> -<span id="L305" class="LineNr"> 305 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L305" class="LineNr"> 305 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L306" class="LineNr"> 306 </span> <span class="Constant">"run: and r/m32 with EBX\n"</span> <span id="L307" class="LineNr"> 307 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L308" class="LineNr"> 308 </span> <span class="Constant">"run: storing 0x0000000d\n"</span> @@ -370,14 +370,14 @@ if ('onhashchange' in window) { <span id="L311" class="LineNr"> 311 </span> <span id="L312" class="LineNr"> 312 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L313" class="LineNr"> 313 </span><span class="Normal">case</span> <span class="Constant">0x23</span>: <span class="Delimiter">{</span> <span class="Comment">// and r/m32 with r32</span> -<span id="L314" class="LineNr"> 314 </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="L314" class="LineNr"> 314 </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="L315" class="LineNr"> 315 </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="L316" class="LineNr"> 316 </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 r/m32 with "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L317" class="LineNr"> 317 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L318" class="LineNr"> 318 </span> <span class="Comment">// difference</span> <span id="L319" class="LineNr"> 319 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L320" class="LineNr"> 320 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i &= *signed_arg2<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">"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="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">"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="L322" class="LineNr"> 322 </span> SF = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L323" class="LineNr"> 323 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L324" class="LineNr"> 324 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -400,7 +400,7 @@ if ('onhashchange' in window) { <span id="L341" class="LineNr"> 341 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L342" class="LineNr"> 342 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L343" class="LineNr"> 343 </span> <span class="Delimiter">);</span> -<span id="L344" class="LineNr"> 344 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L344" class="LineNr"> 344 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L345" class="LineNr"> 345 </span> <span class="Constant">"run: or <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L346" class="LineNr"> 346 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L347" class="LineNr"> 347 </span> <span class="Constant">"run: storing 0xaabbccdd\n"</span> @@ -410,7 +410,7 @@ if ('onhashchange' in window) { <span id="L351" class="LineNr"> 351 </span><span class="Comment">//:</span> <span id="L352" class="LineNr"> 352 </span> <span id="L353" class="LineNr"> 353 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L354" class="LineNr"> 354 </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">"0b"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise OR of r32 with rm32 (or)"</span><span class="Delimiter">);</span> +<span id="L354" class="LineNr"> 354 </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">"0b"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise OR of r32 with rm32 (or)"</span><span class="Delimiter">);</span> <span id="L355" class="LineNr"> 355 </span> <span id="L356" class="LineNr"> 356 </span><span class="Delimiter">:(code)</span> <span id="L357" class="LineNr"> 357 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L357'>test_or_mem_at_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -424,7 +424,7 @@ if ('onhashchange' in window) { <span id="L365" class="LineNr"> 365 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L366" class="LineNr"> 366 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L367" class="LineNr"> 367 </span> <span class="Delimiter">);</span> -<span id="L368" class="LineNr"> 368 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L368" class="LineNr"> 368 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L369" class="LineNr"> 369 </span> <span class="Constant">"run: or r/m32 with EBX\n"</span> <span id="L370" class="LineNr"> 370 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L371" class="LineNr"> 371 </span> <span class="Constant">"run: storing 0xaabbccdd\n"</span> @@ -433,14 +433,14 @@ if ('onhashchange' in window) { <span id="L374" class="LineNr"> 374 </span> <span id="L375" class="LineNr"> 375 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L376" class="LineNr"> 376 </span><span class="Normal">case</span> <span class="Constant">0x0b</span>: <span class="Delimiter">{</span> <span class="Comment">// or r/m32 with r32</span> -<span id="L377" class="LineNr"> 377 </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="L377" class="LineNr"> 377 </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="L378" class="LineNr"> 378 </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="L379" class="LineNr"> 379 </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 r/m32 with "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L380" class="LineNr"> 380 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L381" class="LineNr"> 381 </span> <span class="Comment">// difference</span> <span id="L382" class="LineNr"> 382 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L383" class="LineNr"> 383 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i |= *signed_arg2<span class="Delimiter">;</span> -<span id="L384" class="LineNr"> 384 </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="L384" class="LineNr"> 384 </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="L385" class="LineNr"> 385 </span> SF = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L386" class="LineNr"> 386 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L387" class="LineNr"> 387 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -462,7 +462,7 @@ if ('onhashchange' in window) { <span id="L403" class="LineNr"> 403 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L404" class="LineNr"> 404 </span> <span class="Constant">"0d 0c bb aa\n"</span> <span class="Comment">// 0xaabb0c0d</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: xor <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L408" class="LineNr"> 408 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L409" class="LineNr"> 409 </span> <span class="Constant">"run: storing 0x0a0bccdd\n"</span> @@ -472,7 +472,7 @@ if ('onhashchange' in window) { <span id="L413" class="LineNr"> 413 </span><span class="Comment">//:</span> <span id="L414" class="LineNr"> 414 </span> <span id="L415" class="LineNr"> 415 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L416" class="LineNr"> 416 </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">"33"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise XOR of r32 with rm32 (xor)"</span><span class="Delimiter">);</span> +<span id="L416" class="LineNr"> 416 </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">"33"</span><span class="Delimiter">,</span> <span class="Constant">"r32 = bitwise XOR of r32 with rm32 (xor)"</span><span class="Delimiter">);</span> <span id="L417" class="LineNr"> 417 </span> <span id="L418" class="LineNr"> 418 </span><span class="Delimiter">:(code)</span> <span id="L419" class="LineNr"> 419 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L419'>test_xor_mem_at_r32_with_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -486,7 +486,7 @@ if ('onhashchange' in window) { <span id="L427" class="LineNr"> 427 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L428" class="LineNr"> 428 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L429" class="LineNr"> 429 </span> <span class="Delimiter">);</span> -<span id="L430" class="LineNr"> 430 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L430" class="LineNr"> 430 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L431" class="LineNr"> 431 </span> <span class="Constant">"run: xor r/m32 with EBX\n"</span> <span id="L432" class="LineNr"> 432 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L433" class="LineNr"> 433 </span> <span class="Constant">"run: storing 0xaabbccdd\n"</span> @@ -495,14 +495,14 @@ if ('onhashchange' in window) { <span id="L436" class="LineNr"> 436 </span> <span id="L437" class="LineNr"> 437 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L438" class="LineNr"> 438 </span><span class="Normal">case</span> <span class="Constant">0x33</span>: <span class="Delimiter">{</span> <span class="Comment">// xor r/m32 with r32</span> -<span id="L439" class="LineNr"> 439 </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="L439" class="LineNr"> 439 </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="L440" class="LineNr"> 440 </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="L441" class="LineNr"> 441 </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 r/m32 with "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L442" class="LineNr"> 442 </span> <span class="Comment">// bitwise ops technically operate on unsigned numbers, but it makes no</span> <span id="L443" class="LineNr"> 443 </span> <span class="Comment">// difference</span> <span id="L444" class="LineNr"> 444 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L445" class="LineNr"> 445 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i |= *signed_arg2<span class="Delimiter">;</span> -<span id="L446" class="LineNr"> 446 </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="L446" class="LineNr"> 446 </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="L447" class="LineNr"> 447 </span> SF = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i >> <span class="Constant">31</span><span class="Delimiter">);</span> <span id="L448" class="LineNr"> 448 </span> <a href='010---vm.cc.html#L83'>ZF</a> = <span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>i == <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L449" class="LineNr"> 449 </span> <a href='010---vm.cc.html#L84'>CF</a> = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -524,7 +524,7 @@ if ('onhashchange' in window) { <span id="L465" class="LineNr"> 465 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L466" class="LineNr"> 466 </span> <span class="Constant">"ff 00 0f 0f\n"</span> <span class="Comment">// 0x0f0f00ff</span> <span id="L467" class="LineNr"> 467 </span> <span class="Delimiter">);</span> -<span id="L468" class="LineNr"> 468 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L468" class="LineNr"> 468 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L469" class="LineNr"> 469 </span> <span class="Constant">"run: operate on r/m32\n"</span> <span id="L470" class="LineNr"> 470 </span> <span class="Constant">"run: effective address is 0x00002000 (EBX)\n"</span> <span id="L471" class="LineNr"> 471 </span> <span class="Constant">"run: subop: not\n"</span> @@ -546,7 +546,7 @@ if ('onhashchange' in window) { <span id="L487" class="LineNr"> 487 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L488" class="LineNr"> 488 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L489" class="LineNr"> 489 </span> <span class="Delimiter">);</span> -<span id="L490" class="LineNr"> 490 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L490" class="LineNr"> 490 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L491" class="LineNr"> 491 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L492" class="LineNr"> 492 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L493" class="LineNr"> 493 </span> <span class="Constant">"run: SF=0; ZF=0; CF=0; OF=0\n"</span> @@ -565,7 +565,7 @@ if ('onhashchange' in window) { <span id="L506" class="LineNr"> 506 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L507" class="LineNr"> 507 </span> <span class="Constant">"07 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L508" class="LineNr"> 508 </span> <span class="Delimiter">);</span> -<span id="L509" class="LineNr"> 509 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L509" class="LineNr"> 509 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L510" class="LineNr"> 510 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L511" class="LineNr"> 511 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L512" class="LineNr"> 512 </span> <span class="Constant">"run: SF=1; ZF=0; CF=1; OF=0\n"</span> @@ -584,7 +584,7 @@ if ('onhashchange' in window) { <span id="L525" class="LineNr"> 525 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L526" class="LineNr"> 526 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L527" class="LineNr"> 527 </span> <span class="Delimiter">);</span> -<span id="L528" class="LineNr"> 528 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L528" class="LineNr"> 528 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L529" class="LineNr"> 529 </span> <span class="Constant">"run: compare r/m32 with EBX\n"</span> <span id="L530" class="LineNr"> 530 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L531" class="LineNr"> 531 </span> <span class="Constant">"run: SF=0; ZF=1; CF=0; OF=0\n"</span> @@ -594,7 +594,7 @@ if ('onhashchange' in window) { <span id="L535" class="LineNr"> 535 </span><span class="Comment">//:</span> <span id="L536" class="LineNr"> 536 </span> <span id="L537" class="LineNr"> 537 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L538" class="LineNr"> 538 </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">"3b"</span><span class="Delimiter">,</span> <span class="Constant">"compare: set SF if r32 < rm32 (cmp)"</span><span class="Delimiter">);</span> +<span id="L538" class="LineNr"> 538 </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">"3b"</span><span class="Delimiter">,</span> <span class="Constant">"compare: set SF if r32 < rm32 (cmp)"</span><span class="Delimiter">);</span> <span id="L539" class="LineNr"> 539 </span> <span id="L540" class="LineNr"> 540 </span><span class="Delimiter">:(code)</span> <span id="L541" class="LineNr"> 541 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L541'>test_compare_r32_with_mem_at_r32_greater</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -608,7 +608,7 @@ if ('onhashchange' in window) { <span id="L549" class="LineNr"> 549 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L550" class="LineNr"> 550 </span> <span class="Constant">"07 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c07</span> <span id="L551" class="LineNr"> 551 </span> <span class="Delimiter">);</span> -<span id="L552" class="LineNr"> 552 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L552" class="LineNr"> 552 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L553" class="LineNr"> 553 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L554" class="LineNr"> 554 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L555" class="LineNr"> 555 </span> <span class="Constant">"run: SF=0; ZF=0; CF=0; OF=0\n"</span> @@ -617,7 +617,7 @@ if ('onhashchange' in window) { <span id="L558" class="LineNr"> 558 </span> <span id="L559" class="LineNr"> 559 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L560" class="LineNr"> 560 </span><span class="Normal">case</span> <span class="Constant">0x3b</span>: <span class="Delimiter">{</span> <span class="Comment">// set SF if r32 < r/m32</span> -<span id="L561" class="LineNr"> 561 </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="L561" class="LineNr"> 561 </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="L562" class="LineNr"> 562 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> reg1 = <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="L563" class="LineNr"> 563 </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 "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>reg1<span class="Delimiter">)</span> << <span class="Constant">" with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L564" class="LineNr"> 564 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* signed_arg2 = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> @@ -646,7 +646,7 @@ if ('onhashchange' in window) { <span id="L587" class="LineNr"> 587 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L588" class="LineNr"> 588 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L589" class="LineNr"> 589 </span> <span class="Delimiter">);</span> -<span id="L590" class="LineNr"> 590 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L590" class="LineNr"> 590 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L591" class="LineNr"> 591 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L592" class="LineNr"> 592 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L593" class="LineNr"> 593 </span> <span class="Constant">"run: effective address contains a0b0c0d\n"</span> @@ -665,7 +665,7 @@ if ('onhashchange' in window) { <span id="L606" class="LineNr"> 606 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L607" class="LineNr"> 607 </span> <span class="Constant">"00 00 00 80\n"</span> <span class="Comment">// smallest negative signed integer</span> <span id="L608" class="LineNr"> 608 </span> <span class="Delimiter">);</span> -<span id="L609" class="LineNr"> 609 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L609" class="LineNr"> 609 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L610" class="LineNr"> 610 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L611" class="LineNr"> 611 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L612" class="LineNr"> 612 </span> <span class="Constant">"run: effective address contains 80000000\n"</span> @@ -684,7 +684,7 @@ if ('onhashchange' in window) { <span id="L625" class="LineNr"> 625 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L626" class="LineNr"> 626 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 1</span> <span id="L627" class="LineNr"> 627 </span> <span class="Delimiter">);</span> -<span id="L628" class="LineNr"> 628 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L628" class="LineNr"> 628 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L629" class="LineNr"> 629 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L630" class="LineNr"> 630 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L631" class="LineNr"> 631 </span> <span class="Constant">"run: effective address contains 1\n"</span> @@ -703,7 +703,7 @@ if ('onhashchange' in window) { <span id="L644" class="LineNr"> 644 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L645" class="LineNr"> 645 </span> <span class="Constant">"ff ff ff ff\n"</span> <span class="Comment">// -1</span> <span id="L646" class="LineNr"> 646 </span> <span class="Delimiter">);</span> -<span id="L647" class="LineNr"> 647 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L647" class="LineNr"> 647 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L648" class="LineNr"> 648 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L649" class="LineNr"> 649 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L650" class="LineNr"> 650 </span> <span class="Constant">"run: effective address contains ffffffff\n"</span> @@ -722,7 +722,7 @@ if ('onhashchange' in window) { <span id="L663" class="LineNr"> 663 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L664" class="LineNr"> 664 </span> <span class="Constant">"0d 0c 0b 0a\n"</span> <span class="Comment">// 0x0a0b0c0d</span> <span id="L665" class="LineNr"> 665 </span> <span class="Delimiter">);</span> -<span id="L666" class="LineNr"> 666 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L666" class="LineNr"> 666 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L667" class="LineNr"> 667 </span> <span class="Constant">"run: compare <a href='010---vm.cc.html#L16'>EBX</a> with r/m32\n"</span> <span id="L668" class="LineNr"> 668 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L669" class="LineNr"> 669 </span> <span class="Constant">"run: SF=0; ZF=1; CF=0; OF=0\n"</span> @@ -740,7 +740,7 @@ if ('onhashchange' in window) { <span id="L681" class="LineNr"> 681 </span> <span class="Constant">" 89 18 \n"</span> <span class="Comment">// copy EBX to *EAX</span> <span id="L682" class="LineNr"> 682 </span> <span class="Comment">// ModR/M in binary: 00 (indirect mode) 011 (src EAX) 000 (dest EAX)</span> <span id="L683" class="LineNr"> 683 </span> <span class="Delimiter">);</span> -<span id="L684" class="LineNr"> 684 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L684" class="LineNr"> 684 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L685" class="LineNr"> 685 </span> <span class="Constant">"run: copy <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L686" class="LineNr"> 686 </span> <span class="Constant">"run: effective address is 0x00000060 (EAX)\n"</span> <span id="L687" class="LineNr"> 687 </span> <span class="Constant">"run: storing 0x000000af\n"</span> @@ -750,7 +750,7 @@ if ('onhashchange' in window) { <span id="L691" class="LineNr"> 691 </span><span class="Comment">//:</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">"8b"</span><span class="Delimiter">,</span> <span class="Constant">"copy rm32 to r32 (mov)"</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">"8b"</span><span class="Delimiter">,</span> <span class="Constant">"copy rm32 to r32 (mov)"</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='014indirect_addressing.cc.html#L697'>test_copy_mem_at_r32_to_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -762,7 +762,7 @@ if ('onhashchange' in window) { <span id="L703" class="LineNr"> 703 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L704" class="LineNr"> 704 </span> <span class="Constant">"af 00 00 00\n"</span> <span class="Comment">// 0x000000af</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: copy r/m32 to EBX\n"</span> <span id="L708" class="LineNr"> 708 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L709" class="LineNr"> 709 </span> <span class="Constant">"run: storing 0x000000af\n"</span> @@ -771,12 +771,12 @@ 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">0x8b</span>: <span class="Delimiter">{</span> <span class="Comment">// copy r32 to 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> rdest = <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">"copy r/m32 to "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rdest<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L718" class="LineNr"> 718 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span>* src = <a href='013direct_addressing.cc.html#L101'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> <span id="L719" class="LineNr"> 719 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rdest]<span class="Delimiter">.</span>i = *src<span class="Delimiter">;</span> -<span id="L720" class="LineNr"> 720 </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> << *src << end<span class="Delimiter">();</span> +<span id="L720" class="LineNr"> 720 </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> << *src << end<span class="Delimiter">();</span> <span id="L721" class="LineNr"> 721 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L722" class="LineNr"> 722 </span><span class="Delimiter">}</span> <span id="L723" class="LineNr"> 723 </span> @@ -795,14 +795,14 @@ if ('onhashchange' in window) { <span id="L736" class="LineNr"> 736 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L737" class="LineNr"> 737 </span> <span class="Constant">"08 00 00 00\n"</span> <span class="Comment">// 0x00000008</span> <span id="L738" class="LineNr"> 738 </span> <span class="Delimiter">);</span> -<span id="L739" class="LineNr"> 739 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L739" class="LineNr"> 739 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L740" class="LineNr"> 740 </span> <span class="Constant">"run: 0x00000001 opcode: ff\n"</span> <span id="L741" class="LineNr"> 741 </span> <span class="Constant">"run: jump to r/m32\n"</span> <span id="L742" class="LineNr"> 742 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L743" class="LineNr"> 743 </span> <span class="Constant">"run: jumping to 0x00000008\n"</span> <span id="L744" class="LineNr"> 744 </span> <span class="Constant">"run: 0x00000008 opcode: b8\n"</span> <span id="L745" class="LineNr"> 745 </span> <span class="Delimiter">);</span> -<span id="L746" class="LineNr"> 746 </span> <a href='003trace.cc.html#L283'>CHECK_TRACE_DOESNT_CONTAIN</a><span class="Delimiter">(</span><span class="Constant">"run: 0x00000003 opcode: b8"</span><span class="Delimiter">);</span> +<span id="L746" class="LineNr"> 746 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_DOESNT_CONTAIN</a><span class="Delimiter">(</span><span class="Constant">"run: 0x00000003 opcode: b8"</span><span class="Delimiter">);</span> <span id="L747" class="LineNr"> 747 </span><span class="Delimiter">}</span> <span id="L748" class="LineNr"> 748 </span> <span id="L749" class="LineNr"> 749 </span><span class="Delimiter">:(before "End Op ff Subops")</span> @@ -810,7 +810,7 @@ if ('onhashchange' in window) { <span id="L751" class="LineNr"> 751 </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">"jump to r/m32"</span> << end<span class="Delimiter">();</span> <span id="L752" class="LineNr"> 752 </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> <span id="L753" class="LineNr"> 753 </span> EIP = *arg2<span class="Delimiter">;</span> -<span id="L754" class="LineNr"> 754 </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">"jumping to 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << EIP << end<span class="Delimiter">();</span> +<span id="L754" class="LineNr"> 754 </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">"jumping to 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << EIP << end<span class="Delimiter">();</span> <span id="L755" class="LineNr"> 755 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L756" class="LineNr"> 756 </span><span class="Delimiter">}</span> <span id="L757" class="LineNr"> 757 </span> @@ -828,7 +828,7 @@ if ('onhashchange' in window) { <span id="L769" class="LineNr"> 769 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L770" class="LineNr"> 770 </span> <span class="Constant">"af 00 00 00\n"</span> <span class="Comment">// 0x000000af</span> <span id="L771" class="LineNr"> 771 </span> <span class="Delimiter">);</span> -<span id="L772" class="LineNr"> 772 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L772" class="LineNr"> 772 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L773" class="LineNr"> 773 </span> <span class="Constant">"run: <a href='012elf.cc.html#L91'>push</a> r/m32\n"</span> <span id="L774" class="LineNr"> 774 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L775" class="LineNr"> 775 </span> <span class="Constant">"run: decrementing <a href='010---vm.cc.html#L17'>ESP</a> to 0xbd000010\n"</span> @@ -847,21 +847,21 @@ if ('onhashchange' in window) { <span id="L788" class="LineNr"> 788 </span><span class="SalientComment">//:: pop</span> <span id="L789" class="LineNr"> 789 </span> <span id="L790" class="LineNr"> 790 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L791" class="LineNr"> 791 </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">"8f"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to rm32 (pop)"</span><span class="Delimiter">);</span> +<span id="L791" class="LineNr"> 791 </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">"8f"</span><span class="Delimiter">,</span> <span class="Constant">"pop top of stack to rm32 (pop)"</span><span class="Delimiter">);</span> <span id="L792" class="LineNr"> 792 </span> <span id="L793" class="LineNr"> 793 </span><span class="Delimiter">:(code)</span> <span id="L794" class="LineNr"> 794 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L794'>test_pop_mem_at_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L795" class="LineNr"> 795 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x60</span><span class="Delimiter">;</span> <span id="L796" class="LineNr"> 796 </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="L797" class="LineNr"> 797 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[ESP]<span class="Delimiter">.</span>u = <span class="Constant">0xbd000000</span><span class="Delimiter">;</span> -<span id="L798" class="LineNr"> 798 </span> <a href='010---vm.cc.html#L256'>write_mem_i32</a><span class="Delimiter">(</span><span class="Constant">0xbd000000</span><span class="Delimiter">,</span> <span class="Constant">0x00000030</span><span class="Delimiter">);</span> +<span id="L798" class="LineNr"> 798 </span> <a href='010---vm.cc.html#L257'>write_mem_i32</a><span class="Delimiter">(</span><span class="Constant">0xbd000000</span><span class="Delimiter">,</span> <span class="Constant">0x00000030</span><span class="Delimiter">);</span> <span id="L799" class="LineNr"> 799 </span> <a href='011run.cc.html#L85'>run</a><span class="Delimiter">(</span> <span id="L800" class="LineNr"> 800 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L801" class="LineNr"> 801 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L802" class="LineNr"> 802 </span> <span class="Constant">" 8f 00 \n"</span> <span class="Comment">// pop stack into *EAX</span> <span id="L803" class="LineNr"> 803 </span> <span class="Comment">// ModR/M in binary: 00 (indirect mode) 000 (pop r/m32) 000 (dest EAX)</span> <span id="L804" class="LineNr"> 804 </span> <span class="Delimiter">);</span> -<span id="L805" class="LineNr"> 805 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L805" class="LineNr"> 805 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L806" class="LineNr"> 806 </span> <span class="Constant">"run: <a href='013direct_addressing.cc.html#L1272'>pop</a> into r/m32\n"</span> <span id="L807" class="LineNr"> 807 </span> <span class="Constant">"run: effective address is 0x00000060 (EAX)\n"</span> <span id="L808" class="LineNr"> 808 </span> <span class="Constant">"run: popping value 0x00000030\n"</span> @@ -871,7 +871,7 @@ if ('onhashchange' in window) { <span id="L812" class="LineNr"> 812 </span> <span id="L813" class="LineNr"> 813 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L814" class="LineNr"> 814 </span><span class="Normal">case</span> <span class="Constant">0x8f</span>: <span class="Delimiter">{</span> <span class="Comment">// pop stack into r/m32</span> -<span id="L815" class="LineNr"> 815 </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="L815" class="LineNr"> 815 </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="L816" class="LineNr"> 816 </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 id="L817" class="LineNr"> 817 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>subop<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L818" class="LineNr"> 818 </span> <span class="Normal">case</span> <span class="Constant">0</span>: <span class="Delimiter">{</span> @@ -897,7 +897,7 @@ if ('onhashchange' in window) { <span id="L838" class="LineNr"> 838 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L839" class="LineNr"> 839 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L840" class="LineNr"> 840 </span> <span class="Delimiter">);</span> -<span id="L841" class="LineNr"> 841 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L841" class="LineNr"> 841 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L842" class="LineNr"> 842 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L843" class="LineNr"> 843 </span> <span class="Constant">"run: effective address is 0x00002000 (disp32)\n"</span> <span id="L844" class="LineNr"> 844 </span> <span class="Constant">"run: storing 0x00000011\n"</span> @@ -907,7 +907,7 @@ if ('onhashchange' in window) { <span id="L848" class="LineNr"> 848 </span><span class="Delimiter">:(before "End Mod 0 Special-cases(addr)")</span> <span id="L849" class="LineNr"> 849 </span><span class="Normal">case</span> <span class="Constant">5</span>: <span class="Comment">// exception: mod 0b00 rm 0b101 => incoming disp32</span> <span id="L850" class="LineNr"> 850 </span> addr = <a href='011run.cc.html#L432'>next32</a><span class="Delimiter">();</span> -<span id="L851" class="LineNr"> 851 </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 is 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << addr << <span class="Constant">" (disp32)"</span> << end<span class="Delimiter">();</span> +<span id="L851" class="LineNr"> 851 </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 is 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << addr << <span class="Constant">" (disp32)"</span> << end<span class="Delimiter">();</span> <span id="L852" class="LineNr"> 852 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L853" class="LineNr"> 853 </span> <span id="L854" class="LineNr"> 854 </span><span class="Comment">//:</span> @@ -924,7 +924,7 @@ if ('onhashchange' in window) { <span id="L865" class="LineNr"> 865 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L866" class="LineNr"> 866 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L867" class="LineNr"> 867 </span> <span class="Delimiter">);</span> -<span id="L868" class="LineNr"> 868 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L868" class="LineNr"> 868 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L869" class="LineNr"> 869 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L870" class="LineNr"> 870 </span> <span class="Constant">"run: effective address is initially 0x00001ffe (EAX)\n"</span> <span id="L871" class="LineNr"> 871 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding disp8)\n"</span> @@ -937,14 +937,14 @@ if ('onhashchange' in window) { <span id="L878" class="LineNr"> 878 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>rm<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L879" class="LineNr"> 879 </span> <span class="Normal">default</span>: <span id="L880" class="LineNr"> 880 </span> addr = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rm]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> -<span id="L881" class="LineNr"> 881 </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 is initially 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> +<span id="L881" class="LineNr"> 881 </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 is initially 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> <span id="L882" class="LineNr"> 882 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L883" class="LineNr"> 883 </span> <span class="Comment">// End Mod 1 Special-cases(addr)</span> <span id="L884" class="LineNr"> 884 </span> <span class="Delimiter">}</span> -<span id="L885" class="LineNr"> 885 </span> <span class="Normal">int8_t</span> displacement = <span class="Normal">static_cast</span><<span class="Normal">int8_t</span>><span class="Delimiter">(</span><a href='010---vm.cc.html#L338'>next</a><span class="Delimiter">());</span> +<span id="L885" class="LineNr"> 885 </span> <span class="Normal">int8_t</span> displacement = <span class="Normal">static_cast</span><<span class="Normal">int8_t</span>><span class="Delimiter">(</span><a href='010---vm.cc.html#L339'>next</a><span class="Delimiter">());</span> <span id="L886" class="LineNr"> 886 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>addr > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L887" class="LineNr"> 887 </span> addr += displacement<span class="Delimiter">;</span> -<span id="L888" class="LineNr"> 888 </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 is 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << addr << <span class="Constant">" (after adding disp8)"</span> << end<span class="Delimiter">();</span> +<span id="L888" class="LineNr"> 888 </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 is 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << addr << <span class="Constant">" (after adding disp8)"</span> << end<span class="Delimiter">();</span> <span id="L889" class="LineNr"> 889 </span> <span class="Delimiter">}</span> <span id="L890" class="LineNr"> 890 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L891" class="LineNr"> 891 </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">"null address; skipping displacement"</span> << end<span class="Delimiter">();</span> @@ -964,7 +964,7 @@ if ('onhashchange' in window) { <span id="L905" class="LineNr"> 905 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L906" class="LineNr"> 906 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L907" class="LineNr"> 907 </span> <span class="Delimiter">);</span> -<span id="L908" class="LineNr"> 908 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L908" class="LineNr"> 908 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L909" class="LineNr"> 909 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L910" class="LineNr"> 910 </span> <span class="Constant">"run: effective address is initially 0x00002001 (EAX)\n"</span> <span id="L911" class="LineNr"> 911 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding disp8)\n"</span> @@ -986,7 +986,7 @@ if ('onhashchange' in window) { <span id="L927" class="LineNr"> 927 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L928" class="LineNr"> 928 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L929" class="LineNr"> 929 </span> <span class="Delimiter">);</span> -<span id="L930" class="LineNr"> 930 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L930" class="LineNr"> 930 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L931" class="LineNr"> 931 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L932" class="LineNr"> 932 </span> <span class="Constant">"run: effective address is initially 0x00001ffe (EAX)\n"</span> <span id="L933" class="LineNr"> 933 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding disp32)\n"</span> @@ -999,13 +999,13 @@ if ('onhashchange' in window) { <span id="L940" class="LineNr"> 940 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>rm<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L941" class="LineNr"> 941 </span> <span class="Normal">default</span>: <span id="L942" class="LineNr"> 942 </span> addr = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[rm]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> -<span id="L943" class="LineNr"> 943 </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 is initially 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> +<span id="L943" class="LineNr"> 943 </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 is initially 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> <span id="L944" class="LineNr"> 944 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L945" class="LineNr"> 945 </span> <span class="Comment">// End Mod 2 Special-cases(addr)</span> <span id="L946" class="LineNr"> 946 </span> <span class="Delimiter">}</span> <span id="L947" class="LineNr"> 947 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>addr > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L948" class="LineNr"> 948 </span> addr += <a href='011run.cc.html#L432'>next32</a><span class="Delimiter">();</span> -<span id="L949" class="LineNr"> 949 </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 is 0x"</span> << <a href='010---vm.cc.html#L408'>HEXWORD</a> << addr << <span class="Constant">" (after adding disp32)"</span> << end<span class="Delimiter">();</span> +<span id="L949" class="LineNr"> 949 </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 is 0x"</span> << <a href='010---vm.cc.html#L409'>HEXWORD</a> << addr << <span class="Constant">" (after adding disp32)"</span> << end<span class="Delimiter">();</span> <span id="L950" class="LineNr"> 950 </span> <span class="Delimiter">}</span> <span id="L951" class="LineNr"> 951 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L952" class="LineNr"> 952 </span> @@ -1021,7 +1021,7 @@ if ('onhashchange' in window) { <span id="L962" class="LineNr"> 962 </span> <span class="Constant">"== data 0x2000\n"</span> <span id="L963" class="LineNr"> 963 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L964" class="LineNr"> 964 </span> <span class="Delimiter">);</span> -<span id="L965" class="LineNr"> 965 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L965" class="LineNr"> 965 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L966" class="LineNr"> 966 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L16'>EBX</a> to r/m32\n"</span> <span id="L967" class="LineNr"> 967 </span> <span class="Constant">"run: effective address is initially 0x00002001 (EAX)\n"</span> <span id="L968" class="LineNr"> 968 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding disp32)\n"</span> @@ -1032,7 +1032,7 @@ if ('onhashchange' in window) { <span id="L973" class="LineNr"> 973 </span><span class="SalientComment">//:: copy address (lea)</span> <span id="L974" class="LineNr"> 974 </span> <span id="L975" class="LineNr"> 975 </span><span class="Delimiter">:(before "End Initialize Op Names")</span> -<span id="L976" class="LineNr"> 976 </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">"8d"</span><span class="Delimiter">,</span> <span class="Constant">"copy address in rm32 into r32 (lea)"</span><span class="Delimiter">);</span> +<span id="L976" class="LineNr"> 976 </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">"8d"</span><span class="Delimiter">,</span> <span class="Constant">"copy address in rm32 into r32 (lea)"</span><span class="Delimiter">);</span> <span id="L977" class="LineNr"> 977 </span> <span id="L978" class="LineNr"> 978 </span><span class="Delimiter">:(code)</span> <span id="L979" class="LineNr"> 979 </span><span class="Normal">void</span> <a href='014indirect_addressing.cc.html#L979'>test_copy_address</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> @@ -1043,7 +1043,7 @@ if ('onhashchange' in window) { <span id="L984" class="LineNr"> 984 </span> <span class="Constant">" 8d 18 \n"</span> <span class="Comment">// copy address in EAX into EBX</span> <span id="L985" class="LineNr"> 985 </span> <span class="Comment">// ModR/M in binary: 00 (indirect mode) 011 (dest EBX) 000 (src EAX)</span> <span id="L986" class="LineNr"> 986 </span> <span class="Delimiter">);</span> -<span id="L987" class="LineNr"> 987 </span> <a href='003trace.cc.html#L281'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> +<span id="L987" class="LineNr"> 987 </span> <a href='003trace.cc.html#L290'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> <span id="L988" class="LineNr"> 988 </span> <span class="Constant">"run: copy address into EBX\n"</span> <span id="L989" class="LineNr"> 989 </span> <span class="Constant">"run: effective address is 0x00002000 (EAX)\n"</span> <span id="L990" class="LineNr"> 990 </span> <span class="Delimiter">);</span> @@ -1051,7 +1051,7 @@ if ('onhashchange' in window) { <span id="L992" class="LineNr"> 992 </span> <span id="L993" class="LineNr"> 993 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L994" class="LineNr"> 994 </span><span class="Normal">case</span> <span class="Constant">0x8d</span>: <span class="Delimiter">{</span> <span class="Comment">// copy address of m32 to r32</span> -<span id="L995" class="LineNr"> 995 </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="L995" class="LineNr"> 995 </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="L996" class="LineNr"> 996 </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="L997" class="LineNr"> 997 </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 address into "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L998" class="LineNr"> 998 </span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[arg1]<span class="Delimiter">.</span>u = <a href='013direct_addressing.cc.html#L116'>effective_address_number</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> |