diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-09-07 15:08:54 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-09-07 15:08:54 -0700 |
commit | 608a7fa8d0faf9a3e3d182d9eabe969804443aab (patch) | |
tree | 7e1934d9ef0e8372381c306312591235c4f27110 /html/subx/032check_operand_bounds.cc.html | |
parent | a6517ed821ff39fa56eb3b975799d22497d78a48 (diff) | |
download | mu-608a7fa8d0faf9a3e3d182d9eabe969804443aab.tar.gz |
4536
Diffstat (limited to 'html/subx/032check_operand_bounds.cc.html')
-rw-r--r-- | html/subx/032check_operand_bounds.cc.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/html/subx/032check_operand_bounds.cc.html b/html/subx/032check_operand_bounds.cc.html index cc7ea319..52765a46 100644 --- a/html/subx/032check_operand_bounds.cc.html +++ b/html/subx/032check_operand_bounds.cc.html @@ -3,7 +3,7 @@ <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Mu - subx/032check_operand_bounds.cc</title> -<meta name="Generator" content="Vim/7.4"> +<meta name="Generator" content="Vim/8.0"> <meta name="plugin-version" content="vim7.4_v2"> <meta name="syntax" content="cpp"> <meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy="> @@ -15,18 +15,18 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } +.Comment { color: #9090ff; } +.Comment a { color:#0000ee; text-decoration:underline; } +.traceContains { color: #008000; } +.LineNr { color: #444444; } .Constant { color: #00a0a0; } -.Special { color: #c00000; } .cSpecial { color: #008000; } -.SalientComment { color: #00ffff; } .Delimiter { color: #800080; } -.LineNr { color: #444444; } +.Special { color: #c00000; } .Identifier { color: #c0a020; } -.Comment { color: #9090ff; } -.Comment a { color:#0000ee; text-decoration:underline; } -.PreProc { color: #800080; } -.traceContains { color: #008000; } .Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } +.PreProc { color: #800080; } +.SalientComment { color: #00ffff; } --> </style> @@ -86,15 +86,15 @@ if ('onhashchange' in window) { <span id="L23" class="LineNr">23 </span><span class="Comment">// no bound needed for imm32</span> <span id="L24" class="LineNr">24 </span> <span id="L25" class="LineNr">25 </span><span class="Delimiter">:(before "Pack Operands(segment code)")</span> -<span id="L26" class="LineNr">26 </span>check_operand_bounds<span class="Delimiter">(</span>code<span class="Delimiter">);</span> +<span id="L26" class="LineNr">26 </span>check_operand_bounds<span class="Delimiter">(</span><a href='031check_operands.cc.html#L14'>code</a><span class="Delimiter">);</span> <span id="L27" class="LineNr">27 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L217'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L28" class="LineNr">28 </span><span class="Delimiter">:(code)</span> -<span id="L29" class="LineNr">29 </span><span class="Normal">void</span> check_operand_bounds<span class="Delimiter">(</span><span class="Normal">const</span> segment& code<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L29" class="LineNr">29 </span><span class="Normal">void</span> check_operand_bounds<span class="Delimiter">(</span><span class="Normal">const</span> segment& <a href='031check_operands.cc.html#L14'>code</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L30" class="LineNr">30 </span> <a href='003trace.cc.html#L196'>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">"-- check operand bounds"</span> << <a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span> -<span id="L31" class="LineNr">31 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span>code<span class="Delimiter">.</span><a href='011run.cc.html#L106'>lines</a><span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L32" class="LineNr">32 </span> <span class="Normal">const</span> line& inst = code<span class="Delimiter">.</span><a href='011run.cc.html#L106'>lines</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> -<span id="L33" class="LineNr">33 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <a href='031check_operands.cc.html#L276'>first_operand</a><span class="Delimiter">(</span>inst<span class="Delimiter">);</span> j < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L111'>words</a><span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> -<span id="L34" class="LineNr">34 </span> check_operand_bounds<span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L111'>words</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">));</span> +<span id="L31" class="LineNr">31 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span><a href='031check_operands.cc.html#L14'>code</a><span class="Delimiter">.</span><a href='011run.cc.html#L106'>lines</a><span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L32" class="LineNr">32 </span> <span class="Normal">const</span> line& inst = <a href='031check_operands.cc.html#L14'>code</a><span class="Delimiter">.</span><a href='011run.cc.html#L106'>lines</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> +<span id="L33" class="LineNr">33 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <a href='031check_operands.cc.html#L278'>first_operand</a><span class="Delimiter">(</span>inst<span class="Delimiter">);</span> j < <a href='001help.cc.html#L157'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L115'>words</a><span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> +<span id="L34" class="LineNr">34 </span> check_operand_bounds<span class="Delimiter">(</span>inst<span class="Delimiter">.</span><a href='011run.cc.html#L115'>words</a><span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">));</span> <span id="L35" class="LineNr">35 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L217'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// stop at the first mal-formed instruction</span> <span id="L36" class="LineNr">36 </span> <span class="Delimiter">}</span> <span id="L37" class="LineNr">37 </span><span class="Delimiter">}</span> @@ -102,8 +102,8 @@ if ('onhashchange' in window) { <span id="L39" class="LineNr">39 </span><span class="Normal">void</span> check_operand_bounds<span class="Delimiter">(</span><span class="Normal">const</span> word& w<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L40" class="LineNr">40 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<string<span class="Delimiter">,</span> <span class="Normal">uint32_t</span>>::iterator p = <a href='032check_operand_bounds.cc.html#L10'>Operand_bound</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != <a href='032check_operand_bounds.cc.html#L10'>Operand_bound</a><span class="Delimiter">.</span><a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L41" class="LineNr">41 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!has_metadata<span class="Delimiter">(</span>w<span class="Delimiter">,</span> p<span class="Delimiter">-></span>first<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L42" class="LineNr">42 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_hex_int<span class="Delimiter">(</span>w<span class="Delimiter">.</span><a href='011run.cc.html#L118'>data</a><span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// later transforms are on their own to do their own bounds checking</span> -<span id="L43" class="LineNr">43 </span> <span class="Normal">int32_t</span> x = <a href='030---operands.cc.html#L432'>parse_int</a><span class="Delimiter">(</span>w<span class="Delimiter">.</span><a href='011run.cc.html#L118'>data</a><span class="Delimiter">);</span> +<span id="L42" class="LineNr">42 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_hex_int<span class="Delimiter">(</span>w<span class="Delimiter">.</span><a href='011run.cc.html#L122'>data</a><span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// later transforms are on their own to do their own bounds checking</span> +<span id="L43" class="LineNr">43 </span> <span class="Normal">int32_t</span> x = <a href='011run.cc.html#L308'>parse_int</a><span class="Delimiter">(</span>w<span class="Delimiter">.</span><a href='011run.cc.html#L122'>data</a><span class="Delimiter">);</span> <span id="L44" class="LineNr">44 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>x >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L45" class="LineNr">45 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><span class="Normal">static_cast</span><<span class="Normal">uint32_t</span>><span class="Delimiter">(</span>x<span class="Delimiter">)</span> >= p<span class="Delimiter">-></span>second<span class="Delimiter">)</span> <span id="L46" class="LineNr">46 </span> <a href='003trace.cc.html#L203'>raise</a> << <span class="Constant">"'"</span> << w<span class="Delimiter">.</span>original << <span class="Constant">"' too large to fit in bitfield "</span> << p<span class="Delimiter">-></span>first << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L222'>end</a><span class="Delimiter">();</span> |