about summary refs log tree commit diff stats
path: root/html/subx/013immediate_addressing.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/013immediate_addressing.cc.html')
-rw-r--r--html/subx/013immediate_addressing.cc.html37
1 files changed, 36 insertions, 1 deletions
diff --git a/html/subx/013immediate_addressing.cc.html b/html/subx/013immediate_addressing.cc.html
index 50164e5e..f7bb47f4 100644
--- a/html/subx/013immediate_addressing.cc.html
+++ b/html/subx/013immediate_addressing.cc.html
@@ -293,7 +293,7 @@ if ('onhashchange' in window) {
 <span id="L229" class="LineNr">229 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L230" class="LineNr">230 </span><span class="Delimiter">}</span>
 <span id="L231" class="LineNr">231 </span>
-<span id="L232" class="LineNr">232 </span><span class="SalientComment">//:: compare</span>
+<span id="L232" class="LineNr">232 </span><span class="SalientComment">//:: compare (cmp)</span>
 <span id="L233" class="LineNr">233 </span>
 <span id="L234" class="LineNr">234 </span><span class="Delimiter">:(scenario compare_imm32_with_eax_greater)</span>
 <span id="L235" class="LineNr">235 </span><span class="Special">% Reg[0].i = 0x0d0c0b0a;</span>
@@ -395,6 +395,41 @@ if ('onhashchange' in window) {
 <span id="L331" class="LineNr">331 </span><span class="traceContains">+run: combine <a href='010core.cc.html#L215'>imm32</a> 0x0d0c0b0a with effective address</span>
 <span id="L332" class="LineNr">332 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 3)</span>
 <span id="L333" class="LineNr">333 </span><span class="traceContains">+run: SF=0; ZF=1; OF=0</span>
+<span id="L334" class="LineNr">334 </span>
+<span id="L335" class="LineNr">335 </span><span class="SalientComment">//:: copy (mov)</span>
+<span id="L336" class="LineNr">336 </span>
+<span id="L337" class="LineNr">337 </span><span class="Delimiter">:(scenario copy_imm32_to_r32)</span>
+<span id="L338" class="LineNr">338 </span><span class="Comment"># op  ModRM   SIB   displacement  immediate</span>
+<span id="L339" class="LineNr">339 </span>  b8  <span class="PreProc">0</span><span class="Constant">3</span>                          0a 0b 0c 0d  <span class="Comment"># copy 0x0d0c0b0a to EBX (reg 3)</span>
+<span id="L340" class="LineNr">340 </span><span class="traceContains">+run: copy <a href='010core.cc.html#L215'>imm32</a> 0x0d0c0b0a to <a href='010core.cc.html#L15'>reg</a> 3</span>
+<span id="L341" class="LineNr">341 </span>
+<span id="L342" class="LineNr">342 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
+<span id="L343" class="LineNr">343 </span><span class="Normal">case</span> <span class="Constant">0xb8</span>: <span class="Delimiter">{</span>  <span class="Comment">// copy imm32 to r32</span>
+<span id="L344" class="LineNr">344 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span>
+<span id="L345" class="LineNr">345 </span>  <span class="Normal">int32_t</span> arg2 = <a href='010core.cc.html#L215'>imm32</a><span class="Delimiter">();</span>
+<span id="L346" class="LineNr">346 </span>  <span class="Normal">uint8_t</span> reg1 = modrm&amp;<span class="Constant">0x7</span><span class="Delimiter">;</span>  <span class="Comment">// ignore mod bits</span>
+<span id="L347" class="LineNr">347 </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;copy <a href='010core.cc.html#L215'>imm32</a> 0x&quot;</span> &lt;&lt; <a href='010core.cc.html#L226'>HEXWORD</a> &lt;&lt; arg2 &lt;&lt; <span class="Constant">&quot; to <a href='010core.cc.html#L15'>reg</a> &quot;</span> &lt;&lt; <a href='010core.cc.html#L228'>NUM</a><span class="Delimiter">(</span>reg1<span class="Delimiter">)</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L348" class="LineNr">348 </span>  Reg[reg1]<span class="Delimiter">.</span><a href='010core.cc.html#L16'>i</a> = arg2<span class="Delimiter">;</span>
+<span id="L349" class="LineNr">349 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span id="L350" class="LineNr">350 </span><span class="Delimiter">}</span>
+<span id="L351" class="LineNr">351 </span>
+<span id="L352" class="LineNr">352 </span><span class="Comment">//:</span>
+<span id="L353" class="LineNr">353 </span><span class="Delimiter">:(scenario copy_imm32_to_mem_at_r32)</span>
+<span id="L354" class="LineNr">354 </span><span class="Special">% Reg[3].i = 0x60;</span>
+<span id="L355" class="LineNr">355 </span><span class="Comment"># op  ModRM   SIB   displacement  immediate</span>
+<span id="L356" class="LineNr">356 </span>  c7  <span class="PreProc">0</span><span class="Constant">3</span>                          0a 0b 0c 0d  <span class="Comment"># copy 0x0d0c0b0a to *EBX (reg 3)</span>
+<span id="L357" class="LineNr">357 </span><span class="traceContains">+run: copy <a href='010core.cc.html#L215'>imm32</a> 0x0d0c0b0a to effective address</span>
+<span id="L358" class="LineNr">358 </span><span class="traceContains">+run: effective address is mem at address 0x60 (reg 3)</span>
+<span id="L359" class="LineNr">359 </span>
+<span id="L360" class="LineNr">360 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
+<span id="L361" class="LineNr">361 </span><span class="Normal">case</span> <span class="Constant">0xc7</span>: <span class="Delimiter">{</span>  <span class="Comment">// copy imm32 to r32</span>
+<span id="L362" class="LineNr">362 </span>  <span class="Normal">uint8_t</span> modrm = <a href='010core.cc.html#L210'>next</a><span class="Delimiter">();</span>
+<span id="L363" class="LineNr">363 </span>  <span class="Normal">int32_t</span> arg2 = <a href='010core.cc.html#L215'>imm32</a><span class="Delimiter">();</span>
+<span id="L364" class="LineNr">364 </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;copy <a href='010core.cc.html#L215'>imm32</a> 0x&quot;</span> &lt;&lt; <a href='010core.cc.html#L226'>HEXWORD</a> &lt;&lt; arg2 &lt;&lt; <span class="Constant">&quot; to effective address&quot;</span> &lt;&lt; <a href='003trace.cc.html#L184'>end</a><span class="Delimiter">();</span>
+<span id="L365" class="LineNr">365 </span>  <span class="Normal">int32_t</span>* arg1 = <a href='011direct_addressing.cc.html#L26'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span>
+<span id="L366" class="LineNr">366 </span>  *arg1 = arg2<span class="Delimiter">;</span>
+<span id="L367" class="LineNr">367 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span id="L368" class="LineNr">368 </span><span class="Delimiter">}</span>
 </pre>
 </body>
 </html>