diff options
Diffstat (limited to 'html/subx/035labels.cc.html')
-rw-r--r-- | html/subx/035labels.cc.html | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/html/subx/035labels.cc.html b/html/subx/035labels.cc.html index 5056247f..62856945 100644 --- a/html/subx/035labels.cc.html +++ b/html/subx/035labels.cc.html @@ -88,8 +88,8 @@ if ('onhashchange' in window) { <span id="L26" class="LineNr"> 26 </span><span class="PreProc">0</span><span class="Constant">5</span> <span class="Constant">0x0d0c0b0a</span>/imm32 <span id="L27" class="LineNr"> 27 </span><span class="Special">Entry</span>: <span id="L28" class="LineNr"> 28 </span><span class="PreProc">0</span><span class="Constant">5</span> <span class="Constant">0x0d0c0b0a</span>/imm32 -<span id="L29" class="LineNr"> 29 </span><span class="traceContains">+run: inst: 0x00000006</span> -<span id="L30" class="LineNr"> 30 </span><span class="traceAbsent">-run: inst: 0x00000001</span> +<span id="L29" class="LineNr"> 29 </span><span class="traceContains">+run: 0x00000006 opcode: 05</span> +<span id="L30" class="LineNr"> 30 </span><span class="traceAbsent">-run: 0x00000001 opcode: 05</span> <span id="L31" class="LineNr"> 31 </span> <span id="L32" class="LineNr"> 32 </span><span class="Delimiter">:(before "End Globals")</span> <span id="L33" class="LineNr"> 33 </span><span class="Normal">uint32_t</span> <span class="Special">Entry_address</span> = <span class="Constant">0</span><span class="Delimiter">;</span> @@ -132,19 +132,19 @@ if ('onhashchange' in window) { <span id="L70" class="LineNr"> 70 </span><span class="Delimiter">:(code)</span> <span id="L71" class="LineNr"> 71 </span><span class="Normal">void</span> <a href='035labels.cc.html#L71'>check_valid_name</a><span class="Delimiter">(</span><span class="Normal">const</span> string& s<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L72" class="LineNr"> 72 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span id="L73" class="LineNr"> 73 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"empty name!\n"</span> << end<span class="Delimiter">();</span> +<span id="L73" class="LineNr"> 73 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"empty name!\n"</span> << end<span class="Delimiter">();</span> <span id="L74" class="LineNr"> 74 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L75" class="LineNr"> 75 </span> <span class="Delimiter">}</span> <span id="L76" class="LineNr"> 76 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> == <span class="Constant">'-'</span><span class="Delimiter">)</span> -<span id="L77" class="LineNr"> 77 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' starts with '-', which can be confused with a negative number; use a different name\n"</span> << end<span class="Delimiter">();</span> +<span id="L77" class="LineNr"> 77 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' starts with '-', which can be confused with a negative number; use a different name\n"</span> << end<span class="Delimiter">();</span> <span id="L78" class="LineNr"> 78 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">2</span><span class="Delimiter">)</span> == <span class="Constant">"0x"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L79" class="LineNr"> 79 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' looks like a hex number; use a different name\n"</span> << end<span class="Delimiter">();</span> +<span id="L79" class="LineNr"> 79 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' looks like a hex number; use a different name\n"</span> << end<span class="Delimiter">();</span> <span id="L80" class="LineNr"> 80 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L81" class="LineNr"> 81 </span> <span class="Delimiter">}</span> <span id="L82" class="LineNr"> 82 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>isdigit<span class="Delimiter">(</span>s<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> -<span id="L83" class="LineNr"> 83 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' starts with a digit, and so can be confused with a negative number; use a different name.\n"</span> << end<span class="Delimiter">();</span> +<span id="L83" class="LineNr"> 83 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' starts with a digit, and so can be confused with a negative number; use a different name.\n"</span> << end<span class="Delimiter">();</span> <span id="L84" class="LineNr"> 84 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L166'>SIZE</a><span class="Delimiter">(</span>s<span class="Delimiter">)</span> == <span class="Constant">2</span><span class="Delimiter">)</span> -<span id="L85" class="LineNr"> 85 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' is two characters long which can look like raw hex bytes at a glance; use a different name\n"</span> << end<span class="Delimiter">();</span> +<span id="L85" class="LineNr"> 85 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << s << <span class="Constant">"' is two characters long which can look like raw hex bytes at a glance; use a different name\n"</span> << end<span class="Delimiter">();</span> <span id="L86" class="LineNr"> 86 </span><span class="Delimiter">}</span> <span id="L87" class="LineNr"> 87 </span> <span id="L88" class="LineNr"> 88 </span><span class="Comment">//: Now that that's done, let's start using names as labels.</span> @@ -156,17 +156,17 @@ if ('onhashchange' in window) { <span id="L94" class="LineNr"> 94 </span><span class="traceContains">+transform: label 'loop' is at address 1</span> <span id="L95" class="LineNr"> 95 </span> <span id="L96" class="LineNr"> 96 </span><span class="Delimiter">:(before "End Level-2 Transforms")</span> -<span id="L97" class="LineNr"> 97 </span><span class="Special"><a href='011run.cc.html#L225'>Transform</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='035labels.cc.html#L99'>rewrite_labels</a><span class="Delimiter">);</span> +<span id="L97" class="LineNr"> 97 </span><span class="Special"><a href='011run.cc.html#L224'>Transform</a></span><span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='035labels.cc.html#L99'>rewrite_labels</a><span class="Delimiter">);</span> <span id="L98" class="LineNr"> 98 </span><span class="Delimiter">:(code)</span> <span id="L99" class="LineNr"> 99 </span><span class="Normal">void</span> <a href='035labels.cc.html#L99'>rewrite_labels</a><span class="Delimiter">(</span>program& p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L100" class="LineNr">100 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"-- rewrite labels"</span> << end<span class="Delimiter">();</span> +<span id="L100" class="LineNr">100 </span> <a href='003trace.cc.html#L98'>trace</a><span class="Delimiter">(</span><span class="Constant">3</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"-- rewrite labels"</span> << end<span class="Delimiter">();</span> <span id="L101" class="LineNr">101 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">.</span><a href='011run.cc.html#L96'>segments</a><span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L102" class="LineNr">102 </span> segment& <a href='031check_operands.cc.html#L11'>code</a> = p<span class="Delimiter">.</span><a href='011run.cc.html#L96'>segments</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L103" class="LineNr">103 </span> map<string<span class="Delimiter">,</span> <span class="Normal">int32_t</span>> byte_index<span class="Delimiter">;</span> <span class="Comment">// values are unsigned, but we're going to do subtractions on them so they need to fit in 31 bits</span> <span id="L104" class="LineNr">104 </span> <a href='035labels.cc.html#L113'>compute_byte_indices_for_labels</a><span class="Delimiter">(</span><a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">,</span> byte_index<span class="Delimiter">);</span> -<span id="L105" class="LineNr">105 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L204'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> +<span id="L105" class="LineNr">105 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L230'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L106" class="LineNr">106 </span> <a href='035labels.cc.html#L178'>drop_labels</a><span class="Delimiter">(</span><a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">);</span> -<span id="L107" class="LineNr">107 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L204'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> +<span id="L107" class="LineNr">107 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L230'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L108" class="LineNr">108 </span> <a href='035labels.cc.html#L190'>replace_labels_with_displacements</a><span class="Delimiter">(</span><a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">,</span> byte_index<span class="Delimiter">);</span> <span id="L109" class="LineNr">109 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L256'>contains_key</a><span class="Delimiter">(</span>byte_index<span class="Delimiter">,</span> <span class="Constant">"Entry"</span><span class="Delimiter">))</span> <span id="L110" class="LineNr">110 </span> <span class="Special">Entry_address</span> = <a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">.</span>start + get<span class="Delimiter">(</span>byte_index<span class="Delimiter">,</span> <span class="Constant">"Entry"</span><span class="Delimiter">);</span> @@ -185,12 +185,12 @@ if ('onhashchange' in window) { <span id="L123" class="LineNr">123 </span> <span class="Comment">// have to deal with bitfields.</span> <span id="L124" class="LineNr">124 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_operand_metadata<span class="Delimiter">(</span>curr<span class="Delimiter">,</span> <span class="Constant">"disp32"</span><span class="Delimiter">)</span> || has_operand_metadata<span class="Delimiter">(</span>curr<span class="Delimiter">,</span> <span class="Constant">"imm32"</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L125" class="LineNr">125 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>*curr<span class="Delimiter">.</span>data<span class="Delimiter">.</span>rbegin<span class="Delimiter">()</span> == <span class="Constant">':'</span><span class="Delimiter">)</span> -<span id="L126" class="LineNr">126 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': don't use ':' when jumping to labels\n"</span> << end<span class="Delimiter">();</span> +<span id="L126" class="LineNr">126 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': don't use ':' when jumping to labels\n"</span> << end<span class="Delimiter">();</span> <span id="L127" class="LineNr">127 </span> current_byte += <span class="Constant">4</span><span class="Delimiter">;</span> <span id="L128" class="LineNr">128 </span> <span class="Delimiter">}</span> <span id="L129" class="LineNr">129 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_operand_metadata<span class="Delimiter">(</span>curr<span class="Delimiter">,</span> <span class="Constant">"disp16"</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L130" class="LineNr">130 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>*curr<span class="Delimiter">.</span>data<span class="Delimiter">.</span>rbegin<span class="Delimiter">()</span> == <span class="Constant">':'</span><span class="Delimiter">)</span> -<span id="L131" class="LineNr">131 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': don't use ':' when jumping to labels\n"</span> << end<span class="Delimiter">();</span> +<span id="L131" class="LineNr">131 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': don't use ':' when jumping to labels\n"</span> << end<span class="Delimiter">();</span> <span id="L132" class="LineNr">132 </span> current_byte += <span class="Constant">2</span><span class="Delimiter">;</span> <span id="L133" class="LineNr">133 </span> <span class="Delimiter">}</span> <span id="L134" class="LineNr">134 </span> <span class="Comment">// automatically handle /disp8 and /imm8 here</span> @@ -201,19 +201,19 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr">139 </span> string label = <a href='035labels.cc.html#L234'>drop_last</a><span class="Delimiter">(</span>curr<span class="Delimiter">.</span>data<span class="Delimiter">);</span> <span id="L140" class="LineNr">140 </span> <span class="Comment">// ensure labels look sufficiently different from raw hex</span> <span id="L141" class="LineNr">141 </span> <a href='035labels.cc.html#L71'>check_valid_name</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> -<span id="L142" class="LineNr">142 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L204'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> +<span id="L142" class="LineNr">142 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L230'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L143" class="LineNr">143 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='030---operands.cc.html#L396'>contains_any_operand_metadata</a><span class="Delimiter">(</span>curr<span class="Delimiter">))</span> -<span id="L144" class="LineNr">144 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label definition (':') not allowed in operand\n"</span> << end<span class="Delimiter">();</span> +<span id="L144" class="LineNr">144 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label definition (':') not allowed in operand\n"</span> << end<span class="Delimiter">();</span> <span id="L145" class="LineNr">145 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>j > <span class="Constant">0</span><span class="Delimiter">)</span> -<span id="L146" class="LineNr">146 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': labels can only be the first <a href='011run.cc.html#L119'>word</a> in a line.\n"</span> << end<span class="Delimiter">();</span> +<span id="L146" class="LineNr">146 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': labels can only be the first <a href='011run.cc.html#L119'>word</a> in a line.\n"</span> << end<span class="Delimiter">();</span> <span id="L147" class="LineNr">147 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><span class="Special"><a href='035labels.cc.html#L163'>Map_file</a></span><span class="Delimiter">.</span>is_open<span class="Delimiter">())</span> -<span id="L148" class="LineNr">148 </span> <span class="Special"><a href='035labels.cc.html#L163'>Map_file</a></span> << <span class="Constant">"0x"</span> << <a href='010---vm.cc.html#L413'>HEXWORD</a> << <span class="Delimiter">(</span><a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">.</span>start + current_byte<span class="Delimiter">)</span> << <span class="Constant">' '</span> << label << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L148" class="LineNr">148 </span> <span class="Special"><a href='035labels.cc.html#L163'>Map_file</a></span> << <span class="Constant">"0x"</span> << <a href='010---vm.cc.html#L433'>HEXWORD</a> << <span class="Delimiter">(</span><a href='031check_operands.cc.html#L11'>code</a><span class="Delimiter">.</span>start + current_byte<span class="Delimiter">)</span> << <span class="Constant">' '</span> << label << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L149" class="LineNr">149 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L256'>contains_key</a><span class="Delimiter">(</span>byte_index<span class="Delimiter">,</span> label<span class="Delimiter">)</span> && label != <span class="Constant">"Entry"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L150" class="LineNr">150 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"duplicate label '"</span> << label << <span class="Constant">"'\n"</span> << end<span class="Delimiter">();</span> +<span id="L150" class="LineNr">150 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"duplicate label '"</span> << label << <span class="Constant">"'\n"</span> << end<span class="Delimiter">();</span> <span id="L151" class="LineNr">151 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L152" class="LineNr">152 </span> <span class="Delimiter">}</span> <span id="L153" class="LineNr">153 </span> <a href='001help.cc.html#L252'>put</a><span class="Delimiter">(</span>byte_index<span class="Delimiter">,</span> label<span class="Delimiter">,</span> current_byte<span class="Delimiter">);</span> -<span id="L154" class="LineNr">154 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"label '"</span> << label << <span class="Constant">"' is at address "</span> << <span class="Delimiter">(</span>current_byte+code<span class="Delimiter">.</span>start<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L154" class="LineNr">154 </span> <a href='003trace.cc.html#L98'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"label '"</span> << label << <span class="Constant">"' is at address "</span> << <span class="Delimiter">(</span>current_byte+code<span class="Delimiter">.</span>start<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L155" class="LineNr">155 </span> <span class="Comment">// no modifying current_byte; label definitions won't be in the final binary</span> <span id="L156" class="LineNr">156 </span> <span class="Delimiter">}</span> <span id="L157" class="LineNr">157 </span> <span class="Delimiter">}</span> @@ -261,13 +261,13 @@ if ('onhashchange' in window) { <span id="L199" class="LineNr">199 </span> <span class="Normal">int32_t</span> displacement = <span class="Normal">static_cast</span><<span class="Normal">int32_t</span>><span class="Delimiter">(</span>get<span class="Delimiter">(</span>byte_index<span class="Delimiter">,</span> curr<span class="Delimiter">.</span>data<span class="Delimiter">))</span> - byte_index_next_instruction_starts_at<span class="Delimiter">;</span> <span id="L200" class="LineNr">200 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_operand_metadata<span class="Delimiter">(</span>curr<span class="Delimiter">,</span> <span class="Constant">"disp8"</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L201" class="LineNr">201 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>displacement > <span class="Constant">0xff</span> || displacement < -<span class="Constant">0x7f</span><span class="Delimiter">)</span> -<span id="L202" class="LineNr">202 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label too far away for displacement "</span> << std::hex << displacement << <span class="Constant">" to fit in 8 bits\n"</span> << end<span class="Delimiter">();</span> +<span id="L202" class="LineNr">202 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label too far away for displacement "</span> << std::hex << displacement << <span class="Constant">" to fit in 8 bits\n"</span> << end<span class="Delimiter">();</span> <span id="L203" class="LineNr">203 </span> <span class="Normal">else</span> <span id="L204" class="LineNr">204 </span> emit_hex_bytes<span class="Delimiter">(</span>new_inst<span class="Delimiter">,</span> displacement<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span> <span id="L205" class="LineNr">205 </span> <span class="Delimiter">}</span> <span id="L206" class="LineNr">206 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_operand_metadata<span class="Delimiter">(</span>curr<span class="Delimiter">,</span> <span class="Constant">"disp16"</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L207" class="LineNr">207 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>displacement > <span class="Constant">0xffff</span> || displacement < -<span class="Constant">0x7fff</span><span class="Delimiter">)</span> -<span id="L208" class="LineNr">208 </span> <a href='003trace.cc.html#L190'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label too far away for displacement "</span> << std::hex << displacement << <span class="Constant">" to fit in 16 bits\n"</span> << end<span class="Delimiter">();</span> +<span id="L208" class="LineNr">208 </span> <a href='003trace.cc.html#L217'>raise</a> << <span class="Constant">"'"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"': label too far away for displacement "</span> << std::hex << displacement << <span class="Constant">" to fit in 16 bits\n"</span> << end<span class="Delimiter">();</span> <span id="L209" class="LineNr">209 </span> <span class="Normal">else</span> <span id="L210" class="LineNr">210 </span> emit_hex_bytes<span class="Delimiter">(</span>new_inst<span class="Delimiter">,</span> displacement<span class="Delimiter">,</span> <span class="Constant">2</span><span class="Delimiter">);</span> <span id="L211" class="LineNr">211 </span> <span class="Delimiter">}</span> @@ -280,7 +280,7 @@ if ('onhashchange' in window) { <span id="L218" class="LineNr">218 </span> <span class="Delimiter">}</span> <span id="L219" class="LineNr">219 </span> <span class="Delimiter">}</span> <span id="L220" class="LineNr">220 </span> inst<span class="Delimiter">.</span><a href='011run.cc.html#L114'>words</a><span class="Delimiter">.</span>swap<span class="Delimiter">(</span>new_inst<span class="Delimiter">.</span><a href='011run.cc.html#L114'>words</a><span class="Delimiter">);</span> -<span id="L221" class="LineNr">221 </span> <a href='003trace.cc.html#L183'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"instruction after <a href='011run.cc.html#L228'>transform</a>: '"</span> << data_to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'"</span> << end<span class="Delimiter">();</span> +<span id="L221" class="LineNr">221 </span> <a href='003trace.cc.html#L98'>trace</a><span class="Delimiter">(</span><span class="Constant">99</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"instruction after <a href='011run.cc.html#L227'>transform</a>: '"</span> << data_to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'"</span> << end<span class="Delimiter">();</span> <span id="L222" class="LineNr">222 </span> <span class="Delimiter">}</span> <span id="L223" class="LineNr">223 </span><span class="Delimiter">}</span> <span id="L224" class="LineNr">224 </span> @@ -320,9 +320,9 @@ if ('onhashchange' in window) { <span id="L258" class="LineNr">258 </span><span class="traceContains">+transform: label '$loop2' is at address 1</span> <span id="L259" class="LineNr">259 </span><span class="traceContains">+transform: label '$loop3' is at address a</span> <span id="L260" class="LineNr">260 </span><span class="Comment"># first jump is to -7</span> -<span id="L261" class="LineNr">261 </span><span class="traceContains">+transform: instruction after <a href='011run.cc.html#L228'>transform</a>: 'eb f9'</span> +<span id="L261" class="LineNr">261 </span><span class="traceContains">+transform: instruction after <a href='011run.cc.html#L227'>transform</a>: 'eb f9'</span> <span id="L262" class="LineNr">262 </span><span class="Comment"># second jump is to 0 (fall through)</span> -<span id="L263" class="LineNr">263 </span><span class="traceContains">+transform: instruction after <a href='011run.cc.html#L228'>transform</a>: 'eb 00'</span> +<span id="L263" class="LineNr">263 </span><span class="traceContains">+transform: instruction after <a href='011run.cc.html#L227'>transform</a>: 'eb 00'</span> <span id="L264" class="LineNr">264 </span> <span id="L265" class="LineNr">265 </span><span class="Delimiter">:(scenario duplicate_label)</span> <span id="L266" class="LineNr">266 </span><span class="Special">% Hide_errors = true;</span> |