diff options
Diffstat (limited to 'html/subx/015immediate_addressing.cc.html')
-rw-r--r-- | html/subx/015immediate_addressing.cc.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/html/subx/015immediate_addressing.cc.html b/html/subx/015immediate_addressing.cc.html index b0c76d04..b2e8a0b1 100644 --- a/html/subx/015immediate_addressing.cc.html +++ b/html/subx/015immediate_addressing.cc.html @@ -83,7 +83,7 @@ if ('onhashchange' in window) { <span id="L20" class="LineNr"> 20 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"combine <a href='037heap.cc.html#L23'>imm32</a> with r/m32"</span> << end<span class="Delimiter">();</span> <span id="L21" class="LineNr"> 21 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> modrm = <a href='010---vm.cc.html#L364'>next</a><span class="Delimiter">();</span> <span id="L22" class="LineNr"> 22 </span> <span class="Normal">int32_t</span>* arg1 = <a href='013direct_addressing.cc.html#L31'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> -<span id="L23" class="LineNr"> 23 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L23" class="LineNr"> 23 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L24" class="LineNr"> 24 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"imm32 is 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << end<span class="Delimiter">();</span> <span id="L25" class="LineNr"> 25 </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 class="Comment">// middle 3 'reg opcode' bits</span> <span id="L26" class="LineNr"> 26 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span>subop<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -130,7 +130,7 @@ if ('onhashchange' in window) { <span id="L67" class="LineNr"> 67 </span> <span id="L68" class="LineNr"> 68 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L69" class="LineNr"> 69 </span><span class="Normal">case</span> <span class="Constant">0x2d</span>: <span class="Delimiter">{</span> <span class="Comment">// subtract imm32 from EAX</span> -<span id="L70" class="LineNr"> 70 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L71" class="LineNr"> 71 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"subtract <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << <span class="Constant">" from EAX"</span> << end<span class="Delimiter">();</span> <span id="L72" class="LineNr"> 72 </span> <a href='010---vm.cc.html#L91'>BINARY_ARITHMETIC_OP</a><span class="Delimiter">(</span>-<span class="Delimiter">,</span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> arg2<span class="Delimiter">);</span> <span id="L73" class="LineNr"> 73 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -339,7 +339,7 @@ if ('onhashchange' in window) { <span id="L276" class="LineNr">276 </span> <span id="L277" class="LineNr">277 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L278" class="LineNr">278 </span><span class="Normal">case</span> <span class="Constant">0x25</span>: <span class="Delimiter">{</span> <span class="Comment">// and imm32 with EAX</span> -<span id="L279" class="LineNr">279 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L279" class="LineNr">279 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L280" class="LineNr">280 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"and <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << <span class="Constant">" with EAX"</span> << end<span class="Delimiter">();</span> <span id="L281" class="LineNr">281 </span> <a href='010---vm.cc.html#L103'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>&<span class="Delimiter">,</span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> arg2<span class="Delimiter">);</span> <span id="L282" class="LineNr">282 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -397,7 +397,7 @@ if ('onhashchange' in window) { <span id="L334" class="LineNr">334 </span> <span id="L335" class="LineNr">335 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L336" class="LineNr">336 </span><span class="Normal">case</span> <span class="Constant">0x0d</span>: <span class="Delimiter">{</span> <span class="Comment">// or imm32 with EAX</span> -<span id="L337" class="LineNr">337 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L337" class="LineNr">337 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L338" class="LineNr">338 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"or <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << <span class="Constant">" with EAX"</span> << end<span class="Delimiter">();</span> <span id="L339" class="LineNr">339 </span> <a href='010---vm.cc.html#L103'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>|<span class="Delimiter">,</span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> arg2<span class="Delimiter">);</span> <span id="L340" class="LineNr">340 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -453,7 +453,7 @@ if ('onhashchange' in window) { <span id="L390" class="LineNr">390 </span> <span id="L391" class="LineNr">391 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L392" class="LineNr">392 </span><span class="Normal">case</span> <span class="Constant">0x35</span>: <span class="Delimiter">{</span> <span class="Comment">// xor imm32 with EAX</span> -<span id="L393" class="LineNr">393 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L393" class="LineNr">393 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L394" class="LineNr">394 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"xor <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << <span class="Constant">" with EAX"</span> << end<span class="Delimiter">();</span> <span id="L395" class="LineNr">395 </span> <a href='010---vm.cc.html#L103'>BINARY_BITWISE_OP</a><span class="Delimiter">(</span>^<span class="Delimiter">,</span> <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i<span class="Delimiter">,</span> arg2<span class="Delimiter">);</span> <span id="L396" class="LineNr">396 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -510,7 +510,7 @@ if ('onhashchange' in window) { <span id="L447" class="LineNr">447 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L448" class="LineNr">448 </span><span class="Normal">case</span> <span class="Constant">0x3d</span>: <span class="Delimiter">{</span> <span class="Comment">// compare EAX with imm32</span> <span id="L449" class="LineNr">449 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg1 = <span class="Special"><a href='010---vm.cc.html#L28'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i<span class="Delimiter">;</span> -<span id="L450" class="LineNr">450 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L450" class="LineNr">450 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> arg2 = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L451" class="LineNr">451 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"compare <a href='010---vm.cc.html#L13'>EAX</a> and <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << arg2 << end<span class="Delimiter">();</span> <span id="L452" class="LineNr">452 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> tmp1 = arg1 - arg2<span class="Delimiter">;</span> <span id="L453" class="LineNr">453 </span> SF = <span class="Delimiter">(</span>tmp1 < <span class="Constant">0</span><span class="Delimiter">);</span> @@ -652,7 +652,7 @@ if ('onhashchange' in window) { <span id="L589" class="LineNr">589 </span><span class="Normal">case</span> <span class="Constant">0xbe</span>: <span id="L590" class="LineNr">590 </span><span class="Normal">case</span> <span class="Constant">0xbf</span>: <span class="Delimiter">{</span> <span class="Comment">// copy imm32 to r32</span> <span id="L591" class="LineNr">591 </span> <span class="Normal">const</span> <span class="Normal">uint8_t</span> rdest = op & <span class="Constant">0x7</span><span class="Delimiter">;</span> -<span id="L592" class="LineNr">592 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> src = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L592" class="LineNr">592 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> src = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L593" class="LineNr">593 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"copy <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << src << <span class="Constant">" to "</span> << <a href='013direct_addressing.cc.html#L63'>rname</a><span class="Delimiter">(</span>rdest<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L594" class="LineNr">594 </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="L595" class="LineNr">595 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -683,7 +683,7 @@ if ('onhashchange' in window) { <span id="L620" class="LineNr">620 </span> exit<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L621" class="LineNr">621 </span> <span class="Delimiter">}</span> <span id="L622" class="LineNr">622 </span> <span class="Normal">int32_t</span>* dest = <a href='013direct_addressing.cc.html#L31'>effective_address</a><span class="Delimiter">(</span>modrm<span class="Delimiter">);</span> -<span id="L623" class="LineNr">623 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> src = <a href='011run.cc.html#L343'>next32</a><span class="Delimiter">();</span> +<span id="L623" class="LineNr">623 </span> <span class="Normal">const</span> <span class="Normal">int32_t</span> src = <a href='011run.cc.html#L341'>next32</a><span class="Delimiter">();</span> <span id="L624" class="LineNr">624 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"imm32 is 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << src << end<span class="Delimiter">();</span> <span id="L625" class="LineNr">625 </span> *dest = src<span class="Delimiter">;</span> <span id="L626" class="LineNr">626 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -705,7 +705,7 @@ if ('onhashchange' in window) { <span id="L642" class="LineNr">642 </span> <span id="L643" class="LineNr">643 </span><span class="Delimiter">:(before "End Single-Byte Opcodes")</span> <span id="L644" class="LineNr">644 </span><span class="Normal">case</span> <span class="Constant">0x68</span>: <span class="Delimiter">{</span> -<span id="L645" class="LineNr">645 </span> <span class="Normal">const</span> <span class="Normal">uint32_t</span> val = <span class="Normal">static_cast</span><<span class="Normal">uint32_t</span>><span class="Delimiter">(</span><a href='011run.cc.html#L343'>next32</a><span class="Delimiter">());</span> +<span id="L645" class="LineNr">645 </span> <span class="Normal">const</span> <span class="Normal">uint32_t</span> val = <span class="Normal">static_cast</span><<span class="Normal">uint32_t</span>><span class="Delimiter">(</span><a href='011run.cc.html#L341'>next32</a><span class="Delimiter">());</span> <span id="L646" class="LineNr">646 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">90</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"push <a href='037heap.cc.html#L23'>imm32</a> 0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << val << end<span class="Delimiter">();</span> <span id="L647" class="LineNr">647 </span><span class="CommentedCode">//? cerr << "push: " << val << " => " << Reg[ESP].u << '\n';</span> <span id="L648" class="LineNr">648 </span> <a href='012elf.cc.html#L89'>push</a><span class="Delimiter">(</span>val<span class="Delimiter">);</span> |