about summary refs log tree commit diff stats
path: root/html/011run.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/011run.cc.html')
-rw-r--r--html/011run.cc.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/html/011run.cc.html b/html/011run.cc.html
index 003e8139..84c3d680 100644
--- a/html/011run.cc.html
+++ b/html/011run.cc.html
@@ -151,11 +151,11 @@ if ('onhashchange' in window) {
 <span id="L91" class="LineNr"> 91 </span>  <span class="Comment">// convenience to keep tests concise: 'Entry' label need not be provided</span>
 <span id="L92" class="LineNr"> 92 </span>  <span class="Comment">// not allowed in real programs</span>
 <span id="L93" class="LineNr"> 93 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">.</span><a href='011run.cc.html#L105'>entry</a><span class="Delimiter">)</span>
-<span id="L94" class="LineNr"> 94 </span>    <a href='010---vm.cc.html#L26'>EIP</a> = p<span class="Delimiter">.</span><a href='011run.cc.html#L105'>entry</a><span class="Delimiter">;</span>
+<span id="L94" class="LineNr"> 94 </span>    <a href='010vm.cc.html#L26'>EIP</a> = p<span class="Delimiter">.</span><a href='011run.cc.html#L105'>entry</a><span class="Delimiter">;</span>
 <span id="L95" class="LineNr"> 95 </span>  <span class="Normal">else</span>
-<span id="L96" class="LineNr"> 96 </span>    <a href='010---vm.cc.html#L26'>EIP</a> = find<span class="Delimiter">(</span>p<span class="Delimiter">,</span> <span class="Constant">&quot;code&quot;</span><span class="Delimiter">)-&gt;</span>start<span class="Delimiter">;</span>
-<span id="L97" class="LineNr"> 97 </span>  <span class="Normal">while</span> <span class="Delimiter">(</span><a href='010---vm.cc.html#L26'>EIP</a> &lt; <span class="Special"><a href='010---vm.cc.html#L157'>End_of_program</a></span><span class="Delimiter">)</span>
-<span id="L98" class="LineNr"> 98 </span>    <a href='010---vm.cc.html#L264'>run_one_instruction</a><span class="Delimiter">();</span>
+<span id="L96" class="LineNr"> 96 </span>    <a href='010vm.cc.html#L26'>EIP</a> = find<span class="Delimiter">(</span>p<span class="Delimiter">,</span> <span class="Constant">&quot;code&quot;</span><span class="Delimiter">)-&gt;</span>start<span class="Delimiter">;</span>
+<span id="L97" class="LineNr"> 97 </span>  <span class="Normal">while</span> <span class="Delimiter">(</span><a href='010vm.cc.html#L26'>EIP</a> &lt; <span class="Special"><a href='010vm.cc.html#L157'>End_of_program</a></span><span class="Delimiter">)</span>
+<span id="L98" class="LineNr"> 98 </span>    <a href='010vm.cc.html#L264'>run_one_instruction</a><span class="Delimiter">();</span>
 <span id="L99" class="LineNr"> 99 </span><span class="Delimiter">}</span>
 <span id="L100" class="LineNr">100 </span>
 <span id="L101" class="LineNr">101 </span><span class="SalientComment">//:: core data structures</span>
@@ -228,7 +228,7 @@ if ('onhashchange' in window) {
 <span id="L168" class="LineNr">168 </span>          curr_segment<span class="Delimiter">-&gt;</span><a href='011run.cc.html#L111'>name</a> = segment_name<span class="Delimiter">;</span>
 <span id="L169" class="LineNr">169 </span>          curr_segment<span class="Delimiter">-&gt;</span>start = seg_start<span class="Delimiter">;</span>
 <span id="L170" class="LineNr">170 </span>          <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L264'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
-<span id="L171" class="LineNr">171 </span>          <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">3</span><span class="Delimiter">,</span> <span class="Constant">&quot;parse&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;starts at address 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L395'>HEXWORD</a> &lt;&lt; curr_segment<span class="Delimiter">-&gt;</span>start &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L171" class="LineNr">171 </span>          <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">3</span><span class="Delimiter">,</span> <span class="Constant">&quot;parse&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;starts at address 0x&quot;</span> &lt;&lt; <a href='010vm.cc.html#L395'>HEXWORD</a> &lt;&lt; curr_segment<span class="Delimiter">-&gt;</span>start &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L172" class="LineNr">172 </span>        <span class="Delimiter">}</span>
 <span id="L173" class="LineNr">173 </span>        <span class="Identifier">break</span><span class="Delimiter">;</span>  <span class="Comment">// skip rest of line</span>
 <span id="L174" class="LineNr">174 </span>      <span class="Delimiter">}</span>
@@ -316,8 +316,8 @@ if ('onhashchange' in window) {
 <span id="L256" class="LineNr">256 </span>    <span class="Normal">const</span> segment&amp; seg = p<span class="Delimiter">.</span><a href='011run.cc.html#L106'>segments</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span>
 <span id="L257" class="LineNr">257 </span>    <span class="Normal">uint32_t</span> addr = seg<span class="Delimiter">.</span>start<span class="Delimiter">;</span>
 <span id="L258" class="LineNr">258 </span>    <span class="Normal">if</span> <span class="Delimiter">(</span>!already_allocated<span class="Delimiter">(</span>addr<span class="Delimiter">))</span>
-<span id="L259" class="LineNr">259 </span>      <span class="Special"><a href='010---vm.cc.html#L154'>Mem</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>vma<span class="Delimiter">(</span>seg<span class="Delimiter">.</span>start<span class="Delimiter">));</span>
-<span id="L260" class="LineNr">260 </span>    <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">&quot;load&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;loading segment &quot;</span> &lt;&lt; i &lt;&lt; <span class="Constant">&quot; from &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L395'>HEXWORD</a> &lt;&lt; addr &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L259" class="LineNr">259 </span>      <span class="Special"><a href='010vm.cc.html#L154'>Mem</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>vma<span class="Delimiter">(</span>seg<span class="Delimiter">.</span>start<span class="Delimiter">));</span>
+<span id="L260" class="LineNr">260 </span>    <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">&quot;load&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;loading segment &quot;</span> &lt;&lt; i &lt;&lt; <span class="Constant">&quot; from &quot;</span> &lt;&lt; <a href='010vm.cc.html#L395'>HEXWORD</a> &lt;&lt; addr &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L261" class="LineNr">261 </span>    <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Constant">0</span><span class="Delimiter">;</span>  j &lt; <a href='001help.cc.html#L170'>SIZE</a><span class="Delimiter">(</span>seg<span class="Delimiter">.</span><a href='011run.cc.html#L113'>lines</a><span class="Delimiter">);</span>  ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L262" class="LineNr">262 </span>      <span class="Normal">const</span> line&amp; l = seg<span class="Delimiter">.</span><a href='011run.cc.html#L113'>lines</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">);</span>
 <span id="L263" class="LineNr">263 </span>      <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> k = <span class="Constant">0</span><span class="Delimiter">;</span>  k &lt; <a href='001help.cc.html#L170'>SIZE</a><span class="Delimiter">(</span>l<span class="Delimiter">.</span><a href='011run.cc.html#L122'>words</a><span class="Delimiter">);</span>  ++k<span class="Delimiter">)</span> <span class="Delimiter">{</span>
@@ -325,14 +325,14 @@ if ('onhashchange' in window) {
 <span id="L265" class="LineNr">265 </span>        <span class="Normal">uint8_t</span> val = <a href='011run.cc.html#L288'>hex_byte</a><span class="Delimiter">(</span>w<span class="Delimiter">.</span>data<span class="Delimiter">);</span>
 <span id="L266" class="LineNr">266 </span>        <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L264'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
 <span id="L267" class="LineNr">267 </span>        assert<span class="Delimiter">(</span>overlap<span class="Delimiter">.</span>find<span class="Delimiter">(</span>addr<span class="Delimiter">)</span> == overlap<span class="Delimiter">.</span>end<span class="Delimiter">());</span>
-<span id="L268" class="LineNr">268 </span>        <a href='010---vm.cc.html#L231'>write_mem_u8</a><span class="Delimiter">(</span>addr<span class="Delimiter">,</span> val<span class="Delimiter">);</span>
+<span id="L268" class="LineNr">268 </span>        <a href='010vm.cc.html#L231'>write_mem_u8</a><span class="Delimiter">(</span>addr<span class="Delimiter">,</span> val<span class="Delimiter">);</span>
 <span id="L269" class="LineNr">269 </span>        overlap<span class="Delimiter">.</span>insert<span class="Delimiter">(</span>addr<span class="Delimiter">);</span>
-<span id="L270" class="LineNr">270 </span>        <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">&quot;load&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L395'>HEXWORD</a> &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; -&gt; &quot;</span> &lt;&lt; <a href='010---vm.cc.html#L394'>HEXBYTE</a> &lt;&lt; <a href='010---vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>addr<span class="Delimiter">))</span> &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L270" class="LineNr">270 </span>        <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">&quot;load&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;0x&quot;</span> &lt;&lt; <a href='010vm.cc.html#L395'>HEXWORD</a> &lt;&lt; addr &lt;&lt; <span class="Constant">&quot; -&gt; &quot;</span> &lt;&lt; <a href='010vm.cc.html#L394'>HEXBYTE</a> &lt;&lt; <a href='010vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span><a href='010vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>addr<span class="Delimiter">))</span> &lt;&lt; end<span class="Delimiter">();</span>
 <span id="L271" class="LineNr">271 </span>        ++addr<span class="Delimiter">;</span>
 <span id="L272" class="LineNr">272 </span>      <span class="Delimiter">}</span>
 <span id="L273" class="LineNr">273 </span>    <span class="Delimiter">}</span>
 <span id="L274" class="LineNr">274 </span>    <span class="Normal">if</span> <span class="Delimiter">(</span>seg<span class="Delimiter">.</span><a href='011run.cc.html#L111'>name</a> == <span class="Constant">&quot;code&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span id="L275" class="LineNr">275 </span>      <span class="Special"><a href='010---vm.cc.html#L157'>End_of_program</a></span> = addr<span class="Delimiter">;</span>
+<span id="L275" class="LineNr">275 </span>      <span class="Special"><a href='010vm.cc.html#L157'>End_of_program</a></span> = addr<span class="Delimiter">;</span>
 <span id="L276" class="LineNr">276 </span>    <span class="Delimiter">}</span>
 <span id="L277" class="LineNr">277 </span>  <span class="Delimiter">}</span>
 <span id="L278" class="LineNr">278 </span><span class="Delimiter">}</span>
@@ -465,15 +465,15 @@ if ('onhashchange' in window) {
 <span id="L405" class="LineNr">405 </span><span class="SalientComment">//:: run</span>
 <span id="L406" class="LineNr">406 </span>
 <span id="L407" class="LineNr">407 </span><span class="Delimiter">:(before &quot;End Initialize Op Names&quot;)</span>
-<span id="L408" class="LineNr">408 </span><a href='001help.cc.html#L239'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L342'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">&quot;b8&quot;</span><span class="Delimiter">,</span> <span class="Constant">&quot;copy imm32 to <a href='010---vm.cc.html#L10'>EAX</a> (mov)&quot;</span><span class="Delimiter">);</span>
+<span id="L408" class="LineNr">408 </span><a href='001help.cc.html#L239'>put_new</a><span class="Delimiter">(</span><span class="Special"><a href='010vm.cc.html#L342'>Name</a></span><span class="Delimiter">,</span> <span class="Constant">&quot;b8&quot;</span><span class="Delimiter">,</span> <span class="Constant">&quot;copy imm32 to <a href='010vm.cc.html#L10'>EAX</a> (mov)&quot;</span><span class="Delimiter">);</span>
 <span id="L409" class="LineNr">409 </span>
 <span id="L410" class="LineNr">410 </span><span class="Comment">//: our first opcode</span>
 <span id="L411" class="LineNr">411 </span>
 <span id="L412" class="LineNr">412 </span><span class="Delimiter">:(before &quot;End Single-Byte Opcodes&quot;)</span>
 <span id="L413" class="LineNr">413 </span><span class="Normal">case</span> <span class="Constant">0xb8</span>: <span class="Delimiter">{</span>  <span class="Comment">// copy imm32 to EAX</span>
 <span id="L414" class="LineNr">414 </span>  <span class="Normal">const</span> <span class="Normal">int32_t</span> src = <a href='011run.cc.html#L433'>next32</a><span class="Delimiter">();</span>
-<span id="L415" class="LineNr">415 </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">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;copy imm32 0x&quot;</span> &lt;&lt; <a href='010---vm.cc.html#L395'>HEXWORD</a> &lt;&lt; src &lt;&lt; <span class="Constant">&quot; to EAX&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-<span id="L416" class="LineNr">416 </span>  <span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = src<span class="Delimiter">;</span>
+<span id="L415" class="LineNr">415 </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">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;copy imm32 0x&quot;</span> &lt;&lt; <a href='010vm.cc.html#L395'>HEXWORD</a> &lt;&lt; src &lt;&lt; <span class="Constant">&quot; to EAX&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+<span id="L416" class="LineNr">416 </span>  <span class="Special"><a href='010vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>i = src<span class="Delimiter">;</span>
 <span id="L417" class="LineNr">417 </span>  <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L418" class="LineNr">418 </span><span class="Delimiter">}</span>
 <span id="L419" class="LineNr">419 </span>
@@ -491,7 +491,7 @@ if ('onhashchange' in window) {
 <span id="L431" class="LineNr">431 </span>
 <span id="L432" class="LineNr">432 </span><span class="Comment">// read a 32-bit int in little-endian order from the instruction stream</span>
 <span id="L433" class="LineNr">433 </span><span class="Normal">int32_t</span> <a href='011run.cc.html#L433'>next32</a><span class="Delimiter">()</span> <span class="Delimiter">{</span>
-<span id="L434" class="LineNr">434 </span>  <span class="Normal">int32_t</span> result = <a href='010---vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">);</span>
+<span id="L434" class="LineNr">434 </span>  <span class="Normal">int32_t</span> result = <a href='010vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span><a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">);</span>
 <span id="L435" class="LineNr">435 </span>  EIP+=<span class="Constant">4</span><span class="Delimiter">;</span>
 <span id="L436" class="LineNr">436 </span>  <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span id="L437" class="LineNr">437 </span><span class="Delimiter">}</span>