about summary refs log tree commit diff stats
path: root/html/subx/016index_addressing.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/016index_addressing.cc.html')
-rw-r--r--html/subx/016index_addressing.cc.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/html/subx/016index_addressing.cc.html b/html/subx/016index_addressing.cc.html
index f5801589..14729e00 100644
--- a/html/subx/016index_addressing.cc.html
+++ b/html/subx/016index_addressing.cc.html
@@ -83,27 +83,27 @@ if ('onhashchange' in window) {
 <span id="L21" class="LineNr"> 21 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L22" class="LineNr"> 22 </span><span class="Delimiter">:(code)</span>
 <span id="L23" class="LineNr"> 23 </span><span class="Normal">uint32_t</span> <a href='016index_addressing.cc.html#L23'>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="L24" class="LineNr"> 24 </span>  <span class="Normal">uint8_t</span> sib = <a href='010---vm.cc.html#L322'>next</a><span class="Delimiter">();</span>
-<span id="L25" class="LineNr"> 25 </span>  <span class="Normal">uint8_t</span> base = sib&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
+<span id="L24" class="LineNr"> 24 </span>  <span class="Normal">const</span> <span class="Normal">uint8_t</span> sib = <a href='010---vm.cc.html#L354'>next</a><span class="Delimiter">();</span>
+<span id="L25" class="LineNr"> 25 </span>  <span class="Normal">const</span> <span class="Normal">uint8_t</span> base = sib&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
 <span id="L26" class="LineNr"> 26 </span>  <span class="Normal">uint32_t</span> addr = <span class="Constant">0</span><span class="Delimiter">;</span>
 <span id="L27" class="LineNr"> 27 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>base != <a href='010---vm.cc.html#L18'>EBP</a> || mod != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L28" class="LineNr"> 28 </span>    addr = Reg[base]<span class="Delimiter">.</span>u<span class="Delimiter">;</span>
-<span id="L29" class="LineNr"> 29 </span>    <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is initially 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (&quot;</span> &lt;&lt; <a href='013direct_addressing.cc.html#L62'>rname</a><span class="Delimiter">(</span>base<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L29" class="LineNr"> 29 </span>    <a href='003trace.cc.html#L203'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is initially 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (&quot;</span> &lt;&lt; <a href='013direct_addressing.cc.html#L62'>rname</a><span class="Delimiter">(</span>base<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L30" class="LineNr"> 30 </span>  <span class="Delimiter">}</span>
 <span id="L31" class="LineNr"> 31 </span>  <span class="Normal">else</span> <span class="Delimiter">{</span>
 <span id="L32" class="LineNr"> 32 </span>    <span class="Comment">// base == EBP &amp;&amp; mod == 0</span>
 <span id="L33" class="LineNr"> 33 </span>    addr = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span>  <span class="Comment">// ignore base</span>
-<span id="L34" class="LineNr"> 34 </span>    <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is initially 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (disp32)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L34" class="LineNr"> 34 </span>    <a href='003trace.cc.html#L203'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is initially 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (disp32)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L35" class="LineNr"> 35 </span>  <span class="Delimiter">}</span>
-<span id="L36" class="LineNr"> 36 </span>  <span class="Normal">uint8_t</span> index = <span class="Delimiter">(</span>sib&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
+<span id="L36" class="LineNr"> 36 </span>  <span class="Normal">const</span> <span class="Normal">uint8_t</span> index = <span class="Delimiter">(</span>sib&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
 <span id="L37" class="LineNr"> 37 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>index == <a href='010---vm.cc.html#L17'>ESP</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L38" class="LineNr"> 38 </span>    <span class="Comment">// ignore index and scale</span>
-<span id="L39" class="LineNr"> 39 </span>    <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L39" class="LineNr"> 39 </span>    <a href='003trace.cc.html#L203'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L40" class="LineNr"> 40 </span>  <span class="Delimiter">}</span>
 <span id="L41" class="LineNr"> 41 </span>  <span class="Normal">else</span> <span class="Delimiter">{</span>
-<span id="L42" class="LineNr"> 42 </span>    <span class="Normal">uint8_t</span> scale = <span class="Delimiter">(</span><span class="Constant">1</span> &lt;&lt; <span class="Delimiter">(</span>sib&gt;&gt;<span class="Constant">6</span><span class="Delimiter">));</span>
+<span id="L42" class="LineNr"> 42 </span>    <span class="Normal">const</span> <span class="Normal">uint8_t</span> scale = <span class="Delimiter">(</span><span class="Constant">1</span> &lt;&lt; <span class="Delimiter">(</span>sib&gt;&gt;<span class="Constant">6</span><span class="Delimiter">));</span>
 <span id="L43" class="LineNr"> 43 </span>    addr += Reg[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="L44" class="LineNr"> 44 </span>    <a href='003trace.cc.html#L204'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (after adding &quot;</span> &lt;&lt; <a href='013direct_addressing.cc.html#L62'>rname</a><span class="Delimiter">(</span>index<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;*&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L370'>NUM</a><span class="Delimiter">(</span>scale<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L44" class="LineNr"> 44 </span>    <a href='003trace.cc.html#L203'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;effective address is 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; (after adding &quot;</span> &lt;&lt; <a href='013direct_addressing.cc.html#L62'>rname</a><span class="Delimiter">(</span>index<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;*&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L405'>NUM</a><span class="Delimiter">(</span>scale<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L45" class="LineNr"> 45 </span>  <span class="Delimiter">}</span>
 <span id="L46" class="LineNr"> 46 </span>  <span class="Identifier">return</span> addr<span class="Delimiter">;</span>
 <span id="L47" class="LineNr"> 47 </span><span class="Delimiter">}</span>