about summary refs log tree commit diff stats
path: root/html/subx/012indirect_addressing.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/012indirect_addressing.cc.html')
-rw-r--r--html/subx/012indirect_addressing.cc.html34
1 files changed, 17 insertions, 17 deletions
diff --git a/html/subx/012indirect_addressing.cc.html b/html/subx/012indirect_addressing.cc.html
index 8f0f7adf..863b554d 100644
--- a/html/subx/012indirect_addressing.cc.html
+++ b/html/subx/012indirect_addressing.cc.html
@@ -80,8 +80,8 @@ if ('onhashchange' in window) {
 <span id="L16" class="LineNr"> 16 </span>  <span class="Comment">// mod 0 is usually indirect addressing</span>
 <span id="L17" class="LineNr"> 17 </span>  <span class="Normal">switch</span> <span class="Delimiter">(</span>rm<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L18" class="LineNr"> 18 </span>  <span class="Normal">default</span>:
-<span id="L19" class="LineNr"> 19 </span>  <span class="Conceal">¦</span> <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</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 mem at address 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> &lt;&lt; <span class="Constant">&quot; (reg &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
-<span id="L20" class="LineNr"> 20 </span>  <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> + <span class="Normal">sizeof</span><span class="Delimiter">(</span><span class="Normal">int32_t</span><span class="Delimiter">)</span> &lt;= <a href='010core.cc.html#L61'>Mem</a><span class="Delimiter">.</span>size<span class="Delimiter">());</span>
+<span id="L19" class="LineNr"> 19 </span>  <span class="Conceal">¦</span> <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</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 mem at address 0x&quot;</span> &lt;&lt; std::hex &lt;&lt; Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> &lt;&lt; <span class="Constant">&quot; (reg &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>rm<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)&quot;</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L20" class="LineNr"> 20 </span>  <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a> + <span class="Normal">sizeof</span><span class="Delimiter">(</span><span class="Normal">int32_t</span><span class="Delimiter">)</span> &lt;= <a href='010core.cc.html#L65'>Mem</a><span class="Delimiter">.</span>size<span class="Delimiter">());</span>
 <span id="L21" class="LineNr"> 21 </span>  <span class="Conceal">¦</span> result = <span class="Normal">reinterpret_cast</span>&lt;<span class="Normal">int32_t</span>*&gt;<span class="Delimiter">(</span>&amp;Mem<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Reg[rm]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">));</span>  <span class="Comment">// rely on the host itself being in little-endian order</span>
 <span id="L22" class="LineNr"> 22 </span>  <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L23" class="LineNr"> 23 </span>  <span class="Comment">// End Mod 0 Special-cases</span>
@@ -102,11 +102,11 @@ if ('onhashchange' in window) {
 <span id="L38" class="LineNr"> 38 </span>
 <span id="L39" class="LineNr"> 39 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L40" class="LineNr"> 40 </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="L41" class="LineNr"> 41 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L202'>next</a><span class="Delimiter">();</span>
+<span id="L41" class="LineNr"> 41 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span>
 <span id="L42" class="LineNr"> 42 </span>  <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
-<span id="L43" class="LineNr"> 43 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;add effective address to <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L43" class="LineNr"> 43 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;add effective address to <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L44" class="LineNr"> 44 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
-<span id="L45" class="LineNr"> 45 </span>  <a href='010core.cc.html#L39'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>+<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
+<span id="L45" class="LineNr"> 45 </span>  <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>+<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
 <span id="L46" class="LineNr"> 46 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L47" class="LineNr"> 47 </span><span class="Delimiter">}</span>
 <span id="L48" class="LineNr"> 48 </span>
@@ -136,11 +136,11 @@ if ('onhashchange' in window) {
 <span id="L72" class="LineNr"> 72 </span>
 <span id="L73" class="LineNr"> 73 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L74" class="LineNr"> 74 </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="L75" class="LineNr"> 75 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L202'>next</a><span class="Delimiter">();</span>
+<span id="L75" class="LineNr"> 75 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span>
 <span id="L76" class="LineNr"> 76 </span>  <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
-<span id="L77" class="LineNr"> 77 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;subtract effective address from <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L77" class="LineNr"> 77 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;subtract effective address from <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L78" class="LineNr"> 78 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
-<span id="L79" class="LineNr"> 79 </span>  <a href='010core.cc.html#L39'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
+<span id="L79" class="LineNr"> 79 </span>  <a href='010core.cc.html#L41'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
 <span id="L80" class="LineNr"> 80 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L81" class="LineNr"> 81 </span><span class="Delimiter">}</span>
 <span id="L82" class="LineNr"> 82 </span>
@@ -173,11 +173,11 @@ if ('onhashchange' in window) {
 <span id="L109" class="LineNr">109 </span>
 <span id="L110" class="LineNr">110 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L111" class="LineNr">111 </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="L112" class="LineNr">112 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L202'>next</a><span class="Delimiter">();</span>
+<span id="L112" class="LineNr">112 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span>
 <span id="L113" class="LineNr">113 </span>  <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
-<span id="L114" class="LineNr">114 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;and effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L114" class="LineNr">114 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;and effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L115" class="LineNr">115 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
-<span id="L116" class="LineNr">116 </span>  <a href='010core.cc.html#L49'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&amp;<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
+<span id="L116" class="LineNr">116 </span>  <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&amp;<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
 <span id="L117" class="LineNr">117 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L118" class="LineNr">118 </span><span class="Delimiter">}</span>
 <span id="L119" class="LineNr">119 </span>
@@ -213,11 +213,11 @@ if ('onhashchange' in window) {
 <span id="L149" class="LineNr">149 </span>
 <span id="L150" class="LineNr">150 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L151" class="LineNr">151 </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="L152" class="LineNr">152 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L202'>next</a><span class="Delimiter">();</span>
+<span id="L152" class="LineNr">152 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span>
 <span id="L153" class="LineNr">153 </span>  <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
-<span id="L154" class="LineNr">154 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;or effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L154" class="LineNr">154 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;or effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L155" class="LineNr">155 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
-<span id="L156" class="LineNr">156 </span>  <a href='010core.cc.html#L49'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
+<span id="L156" class="LineNr">156 </span>  <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
 <span id="L157" class="LineNr">157 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L158" class="LineNr">158 </span><span class="Delimiter">}</span>
 <span id="L159" class="LineNr">159 </span>
@@ -253,11 +253,11 @@ if ('onhashchange' in window) {
 <span id="L189" class="LineNr">189 </span>
 <span id="L190" class="LineNr">190 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L191" class="LineNr">191 </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="L192" class="LineNr">192 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L202'>next</a><span class="Delimiter">();</span>
+<span id="L192" class="LineNr">192 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L206'>next</a><span class="Delimiter">();</span>
 <span id="L193" class="LineNr">193 </span>  <span class="Normal">uint8_t</span> arg1 = <span class="Delimiter">(</span>modrm&gt;&gt;<span class="Constant">3</span><span class="Delimiter">)</span>&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>
-<span id="L194" class="LineNr">194 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;xor effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L220'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L194" class="LineNr">194 </span>  <a href='003trace.cc.html#L160'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;xor effective address with <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L224'>NUM</a><span class="Delimiter">(</span>arg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
 <span id="L195" class="LineNr">195 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span>* arg2 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
-<span id="L196" class="LineNr">196 </span>  <a href='010core.cc.html#L49'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
+<span id="L196" class="LineNr">196 </span>  <a href='010core.cc.html#L53'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> Reg[arg1]<span class="Delimiter">.</span><a href='010core.cc.html#L17'>u</a><span class="Delimiter">,</span> *arg2<span class="Delimiter">);</span>
 <span id="L197" class="LineNr">197 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L198" class="LineNr">198 </span><span class="Delimiter">}</span>
 <span id="L199" class="LineNr">199 </span>