diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-14 01:48:06 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-14 01:52:54 -0800 |
commit | c504ca566124d1f097e7fe8a2f9f67c1c59e9ccf (patch) | |
tree | 9d8cb8eb057c9d4f2f4628b5446d5ff183c8f89f /html/016index_addressing.cc.html | |
parent | 5c368edcb22a4b7c4df7aada998b42ea4833e795 (diff) | |
download | mu-c504ca566124d1f097e7fe8a2f9f67c1c59e9ccf.tar.gz |
5893
Diffstat (limited to 'html/016index_addressing.cc.html')
-rw-r--r-- | html/016index_addressing.cc.html | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/html/016index_addressing.cc.html b/html/016index_addressing.cc.html index a50dfd81..e64badfc 100644 --- a/html/016index_addressing.cc.html +++ b/html/016index_addressing.cc.html @@ -60,9 +60,9 @@ if ('onhashchange' in window) { <span id="L2" class="LineNr"> 2 </span> <span id="L3" class="LineNr"> 3 </span><span class="Delimiter">:(code)</span> <span id="L4" class="LineNr"> 4 </span><span class="Normal">void</span> <a href='016index_addressing.cc.html#L4'>test_add_r32_to_mem_at_r32_with_sib</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L5" class="LineNr"> 5 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> -<span id="L6" class="LineNr"> 6 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x2000</span><span class="Delimiter">;</span> -<span id="L7" class="LineNr"> 7 </span> <a href='011run.cc.html#L83'>run</a><span class="Delimiter">(</span> +<span id="L5" class="LineNr"> 5 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> +<span id="L6" class="LineNr"> 6 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x2000</span><span class="Delimiter">;</span> +<span id="L7" class="LineNr"> 7 </span> <a href='011run.cc.html#L82'>run</a><span class="Delimiter">(</span> <span id="L8" class="LineNr"> 8 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L9" class="LineNr"> 9 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L10" class="LineNr"> 10 </span> <span class="Constant">" 01 1c 20 \n"</span> <span class="Comment">// add EBX to *EAX</span> @@ -72,8 +72,8 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr"> 14 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L15" class="LineNr"> 15 </span> <span class="Delimiter">);</span> <span id="L16" class="LineNr"> 16 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> -<span id="L17" class="LineNr"> 17 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L19'>EBX</a> to r/m32\n"</span> -<span id="L18" class="LineNr"> 18 </span> <span class="Constant">"run: effective address is initially 0x00002000 (<a href='010---vm.cc.html#L16'>EAX</a>)\n"</span> +<span id="L17" class="LineNr"> 17 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L13'>EBX</a> to r/m32\n"</span> +<span id="L18" class="LineNr"> 18 </span> <span class="Constant">"run: effective address is initially 0x00002000 (<a href='010---vm.cc.html#L10'>EAX</a>)\n"</span> <span id="L19" class="LineNr"> 19 </span> <span class="Constant">"run: effective address is 0x00002000\n"</span> <span id="L20" class="LineNr"> 20 </span> <span class="Constant">"run: storing 0x00000011\n"</span> <span id="L21" class="LineNr"> 21 </span> <span class="Delimiter">);</span> @@ -85,37 +85,37 @@ if ('onhashchange' in window) { <span id="L27" class="LineNr"> 27 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L28" class="LineNr"> 28 </span><span class="Delimiter">:(code)</span> <span id="L29" class="LineNr"> 29 </span><span class="Normal">uint32_t</span> <a href='016index_addressing.cc.html#L29'>effective_address_from_sib</a><span class="Delimiter">(</span><span class="Normal">uint8_t</span> mod<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L30" class="LineNr"> 30 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> sib = <a href='010---vm.cc.html#L331'>next</a><span class="Delimiter">();</span> +<span id="L30" class="LineNr"> 30 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> sib = <a href='010---vm.cc.html#L325'>next</a><span class="Delimiter">();</span> <span id="L31" class="LineNr"> 31 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> base = sib&<span class="Constant">0x7</span><span class="Delimiter">;</span> <span id="L32" class="LineNr"> 32 </span> <span class="Normal">uint32_t</span> addr = <span class="Constant">0</span><span class="Delimiter">;</span> -<span id="L33" class="LineNr"> 33 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>base != <a href='010---vm.cc.html#L21'>EBP</a> || mod != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L34" class="LineNr"> 34 </span> addr = <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[base]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> -<span id="L35" class="LineNr"> 35 </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#L401'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>base<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> +<span id="L33" class="LineNr"> 33 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>base != <a href='010---vm.cc.html#L15'>EBP</a> || mod != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L34" class="LineNr"> 34 </span> addr = <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[base]<span class="Delimiter">.</span>u<span class="Delimiter">;</span> +<span id="L35" class="LineNr"> 35 </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#L395'>HEXWORD</a> << addr << <span class="Constant">" ("</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>base<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> <span id="L36" class="LineNr"> 36 </span> <span class="Delimiter">}</span> <span id="L37" class="LineNr"> 37 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L38" class="LineNr"> 38 </span> <span class="Comment">// base == EBP && mod == 0</span> -<span id="L39" class="LineNr"> 39 </span> addr = <a href='011run.cc.html#L447'>next32</a><span class="Delimiter">();</span> <span class="Comment">// ignore base</span> -<span id="L40" class="LineNr"> 40 </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#L401'>HEXWORD</a> << addr << <span class="Constant">" (<a href='040---tests.cc.html#L84'>disp32</a>)"</span> << end<span class="Delimiter">();</span> +<span id="L39" class="LineNr"> 39 </span> addr = <a href='011run.cc.html#L433'>next32</a><span class="Delimiter">();</span> <span class="Comment">// ignore base</span> +<span id="L40" class="LineNr"> 40 </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#L395'>HEXWORD</a> << addr << <span class="Constant">" (<a href='040---tests.cc.html#L82'>disp32</a>)"</span> << end<span class="Delimiter">();</span> <span id="L41" class="LineNr"> 41 </span> <span class="Delimiter">}</span> <span id="L42" class="LineNr"> 42 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> index = <span class="Delimiter">(</span>sib>><span class="Constant">3</span><span class="Delimiter">)</span>&<span class="Constant">0x7</span><span class="Delimiter">;</span> -<span id="L43" class="LineNr"> 43 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>index == <a href='010---vm.cc.html#L20'>ESP</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L43" class="LineNr"> 43 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>index == <a href='010---vm.cc.html#L14'>ESP</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L44" class="LineNr"> 44 </span> <span class="Comment">// ignore index and scale</span> -<span id="L45" class="LineNr"> 45 </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#L401'>HEXWORD</a> << addr << end<span class="Delimiter">();</span> +<span id="L45" class="LineNr"> 45 </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#L395'>HEXWORD</a> << addr << end<span class="Delimiter">();</span> <span id="L46" class="LineNr"> 46 </span> <span class="Delimiter">}</span> <span id="L47" class="LineNr"> 47 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L48" class="LineNr"> 48 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> scale = <span class="Delimiter">(</span><span class="Constant">1</span> << <span class="Delimiter">(</span>sib>><span class="Constant">6</span><span class="Delimiter">));</span> -<span id="L49" class="LineNr"> 49 </span> addr += <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[index]<span class="Delimiter">.</span>i*scale<span class="Delimiter">;</span> <span class="Comment">// treat index register as signed. Maybe base as well? But we'll always ensure it's non-negative.</span> -<span id="L50" class="LineNr"> 50 </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#L401'>HEXWORD</a> << addr << <span class="Constant">" (after adding "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>index<span class="Delimiter">)</span> << <span class="Constant">"*"</span> << <a href='010---vm.cc.html#L403'>NUM</a><span class="Delimiter">(</span>scale<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> +<span id="L49" class="LineNr"> 49 </span> addr += <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[index]<span class="Delimiter">.</span>i*scale<span class="Delimiter">;</span> <span class="Comment">// treat index register as signed. Maybe base as well? But we'll always ensure it's non-negative.</span> +<span id="L50" class="LineNr"> 50 </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#L395'>HEXWORD</a> << addr << <span class="Constant">" (after adding "</span> << <a href='013direct_addressing.cc.html#L136'>rname</a><span class="Delimiter">(</span>index<span class="Delimiter">)</span> << <span class="Constant">"*"</span> << <a href='010---vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span>scale<span class="Delimiter">)</span> << <span class="Constant">")"</span> << end<span class="Delimiter">();</span> <span id="L51" class="LineNr"> 51 </span> <span class="Delimiter">}</span> <span id="L52" class="LineNr"> 52 </span> <span class="Identifier">return</span> addr<span class="Delimiter">;</span> <span id="L53" class="LineNr"> 53 </span><span class="Delimiter">}</span> <span id="L54" class="LineNr"> 54 </span> <span id="L55" class="LineNr"> 55 </span><span class="Delimiter">:(code)</span> <span id="L56" class="LineNr"> 56 </span><span class="Normal">void</span> <a href='016index_addressing.cc.html#L56'>test_add_r32_to_mem_at_base_r32_index_r32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L57" class="LineNr"> 57 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> -<span id="L58" class="LineNr"> 58 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ffe</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> -<span id="L59" class="LineNr"> 59 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x2</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> -<span id="L60" class="LineNr"> 60 </span> <a href='011run.cc.html#L83'>run</a><span class="Delimiter">(</span> +<span id="L57" class="LineNr"> 57 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> +<span id="L58" class="LineNr"> 58 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ffe</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> +<span id="L59" class="LineNr"> 59 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x2</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> +<span id="L60" class="LineNr"> 60 </span> <a href='011run.cc.html#L82'>run</a><span class="Delimiter">(</span> <span id="L61" class="LineNr"> 61 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L62" class="LineNr"> 62 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L63" class="LineNr"> 63 </span> <span class="Constant">" 01 1c 08 \n"</span> <span class="Comment">// add EBX to *(EAX+ECX)</span> @@ -125,8 +125,8 @@ if ('onhashchange' in window) { <span id="L67" class="LineNr"> 67 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L68" class="LineNr"> 68 </span> <span class="Delimiter">);</span> <span id="L69" class="LineNr"> 69 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> -<span id="L70" class="LineNr"> 70 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L19'>EBX</a> to r/m32\n"</span> -<span id="L71" class="LineNr"> 71 </span> <span class="Constant">"run: effective address is initially 0x00001ffe (<a href='010---vm.cc.html#L16'>EAX</a>)\n"</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L13'>EBX</a> to r/m32\n"</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Constant">"run: effective address is initially 0x00001ffe (<a href='010---vm.cc.html#L10'>EAX</a>)\n"</span> <span id="L72" class="LineNr"> 72 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding ECX*1)\n"</span> <span id="L73" class="LineNr"> 73 </span> <span class="Constant">"run: storing 0x00000011\n"</span> <span id="L74" class="LineNr"> 74 </span> <span class="Delimiter">);</span> @@ -134,8 +134,8 @@ if ('onhashchange' in window) { <span id="L76" class="LineNr"> 76 </span> <span id="L77" class="LineNr"> 77 </span><span class="Delimiter">:(code)</span> <span id="L78" class="LineNr"> 78 </span><span class="Normal">void</span> <a href='016index_addressing.cc.html#L78'>test_add_r32_to_mem_at_displacement_using_sib</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L79" class="LineNr"> 79 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> -<span id="L80" class="LineNr"> 80 </span> <a href='011run.cc.html#L83'>run</a><span class="Delimiter">(</span> +<span id="L79" class="LineNr"> 79 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> +<span id="L80" class="LineNr"> 80 </span> <a href='011run.cc.html#L82'>run</a><span class="Delimiter">(</span> <span id="L81" class="LineNr"> 81 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L82" class="LineNr"> 82 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L83" class="LineNr"> 83 </span> <span class="Constant">" 01 1c 25 00 20 00 00 \n"</span> <span class="Comment">// add EBX to *0x2000</span> @@ -145,8 +145,8 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L88" class="LineNr"> 88 </span> <span class="Delimiter">);</span> <span id="L89" class="LineNr"> 89 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> -<span id="L90" class="LineNr"> 90 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L19'>EBX</a> to r/m32\n"</span> -<span id="L91" class="LineNr"> 91 </span> <span class="Constant">"run: effective address is initially 0x00002000 (<a href='040---tests.cc.html#L84'>disp32</a>)\n"</span> +<span id="L90" class="LineNr"> 90 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L13'>EBX</a> to r/m32\n"</span> +<span id="L91" class="LineNr"> 91 </span> <span class="Constant">"run: effective address is initially 0x00002000 (<a href='040---tests.cc.html#L82'>disp32</a>)\n"</span> <span id="L92" class="LineNr"> 92 </span> <span class="Constant">"run: effective address is 0x00002000\n"</span> <span id="L93" class="LineNr"> 93 </span> <span class="Constant">"run: storing 0x00000011\n"</span> <span id="L94" class="LineNr"> 94 </span> <span class="Delimiter">);</span> @@ -156,10 +156,10 @@ if ('onhashchange' in window) { <span id="L98" class="LineNr"> 98 </span> <span id="L99" class="LineNr"> 99 </span><span class="Delimiter">:(code)</span> <span id="L100" class="LineNr">100 </span><span class="Normal">void</span> <a href='016index_addressing.cc.html#L100'>test_add_r32_to_mem_at_base_r32_index_r32_plus_disp8</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L101" class="LineNr">101 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> -<span id="L102" class="LineNr">102 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ff9</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> -<span id="L103" class="LineNr">103 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x5</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> -<span id="L104" class="LineNr">104 </span> <a href='011run.cc.html#L83'>run</a><span class="Delimiter">(</span> +<span id="L101" class="LineNr">101 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> +<span id="L102" class="LineNr">102 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ff9</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> +<span id="L103" class="LineNr">103 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x5</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> +<span id="L104" class="LineNr">104 </span> <a href='011run.cc.html#L82'>run</a><span class="Delimiter">(</span> <span id="L105" class="LineNr">105 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L106" class="LineNr">106 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L107" class="LineNr">107 </span> <span class="Constant">" 01 5c 08 02 \n"</span> <span class="Comment">// add EBX to *(EAX+ECX+2)</span> @@ -169,8 +169,8 @@ if ('onhashchange' in window) { <span id="L111" class="LineNr">111 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L112" class="LineNr">112 </span> <span class="Delimiter">);</span> <span id="L113" class="LineNr">113 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> -<span id="L114" class="LineNr">114 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L19'>EBX</a> to r/m32\n"</span> -<span id="L115" class="LineNr">115 </span> <span class="Constant">"run: effective address is initially 0x00001ff9 (<a href='010---vm.cc.html#L16'>EAX</a>)\n"</span> +<span id="L114" class="LineNr">114 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L13'>EBX</a> to r/m32\n"</span> +<span id="L115" class="LineNr">115 </span> <span class="Constant">"run: effective address is initially 0x00001ff9 (<a href='010---vm.cc.html#L10'>EAX</a>)\n"</span> <span id="L116" class="LineNr">116 </span> <span class="Constant">"run: effective address is 0x00001ffe (after adding ECX*1)\n"</span> <span id="L117" class="LineNr">117 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding disp8)\n"</span> <span id="L118" class="LineNr">118 </span> <span class="Constant">"run: storing 0x00000011\n"</span> @@ -186,10 +186,10 @@ if ('onhashchange' in window) { <span id="L128" class="LineNr">128 </span> <span id="L129" class="LineNr">129 </span><span class="Delimiter">:(code)</span> <span id="L130" class="LineNr">130 </span><span class="Normal">void</span> <a href='016index_addressing.cc.html#L130'>test_add_r32_to_mem_at_base_r32_index_r32_plus_disp32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L131" class="LineNr">131 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> -<span id="L132" class="LineNr">132 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ff9</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> -<span id="L133" class="LineNr">133 </span> <span class="Special"><a href='010---vm.cc.html#L31'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x5</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> -<span id="L134" class="LineNr">134 </span> <a href='011run.cc.html#L83'>run</a><span class="Delimiter">(</span> +<span id="L131" class="LineNr">131 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EBX]<span class="Delimiter">.</span>i = <span class="Constant">0x10</span><span class="Delimiter">;</span> <span class="Comment">// source</span> +<span id="L132" class="LineNr">132 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = <span class="Constant">0x1ff9</span><span class="Delimiter">;</span> <span class="Comment">// dest base</span> +<span id="L133" class="LineNr">133 </span> <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[ECX]<span class="Delimiter">.</span>i = <span class="Constant">0x5</span><span class="Delimiter">;</span> <span class="Comment">// dest index</span> +<span id="L134" class="LineNr">134 </span> <a href='011run.cc.html#L82'>run</a><span class="Delimiter">(</span> <span id="L135" class="LineNr">135 </span> <span class="Constant">"== code 0x1\n"</span> <span id="L136" class="LineNr">136 </span> <span class="Comment">// op ModR/M SIB displacement immediate</span> <span id="L137" class="LineNr">137 </span> <span class="Constant">" 01 9c 08 02 00 00 00 \n"</span> <span class="Comment">// add EBX to *(EAX+ECX+2)</span> @@ -199,10 +199,10 @@ if ('onhashchange' in window) { <span id="L141" class="LineNr">141 </span> <span class="Constant">"01 00 00 00\n"</span> <span class="Comment">// 0x00000001</span> <span id="L142" class="LineNr">142 </span> <span class="Delimiter">);</span> <span id="L143" class="LineNr">143 </span> <a href='003trace.cc.html#L292'>CHECK_TRACE_CONTENTS</a><span class="Delimiter">(</span> -<span id="L144" class="LineNr">144 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L19'>EBX</a> to r/m32\n"</span> -<span id="L145" class="LineNr">145 </span> <span class="Constant">"run: effective address is initially 0x00001ff9 (<a href='010---vm.cc.html#L16'>EAX</a>)\n"</span> +<span id="L144" class="LineNr">144 </span> <span class="Constant">"run: add <a href='010---vm.cc.html#L13'>EBX</a> to r/m32\n"</span> +<span id="L145" class="LineNr">145 </span> <span class="Constant">"run: effective address is initially 0x00001ff9 (<a href='010---vm.cc.html#L10'>EAX</a>)\n"</span> <span id="L146" class="LineNr">146 </span> <span class="Constant">"run: effective address is 0x00001ffe (after adding ECX*1)\n"</span> -<span id="L147" class="LineNr">147 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding <a href='040---tests.cc.html#L84'>disp32</a>)\n"</span> +<span id="L147" class="LineNr">147 </span> <span class="Constant">"run: effective address is 0x00002000 (after adding <a href='040---tests.cc.html#L82'>disp32</a>)\n"</span> <span id="L148" class="LineNr">148 </span> <span class="Constant">"run: storing 0x00000011\n"</span> <span id="L149" class="LineNr">149 </span> <span class="Delimiter">);</span> <span id="L150" class="LineNr">150 </span><span class="Delimiter">}</span> |