ZealOS/docs/Compiler/OptPass6.ZC.html
2021-12-11 06:10:58 -05:00

242 lines
26 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.07">
<style type="text/css">
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF1>Bool</span><span class=cF0> </span><span class=cFD>OptIC6</span><span class=cF0>(</span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi)
<a name="l2"></a>{
<a name="l3"></a> </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpil1;
<a name="l4"></a>
<a name="l5"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_code &lt; </span><span class=cF3>IC_IMM_I64</span><span class=cF0> || !</span><span class=cF7>(</span><span class=cF0>tmpil1 = </span><span class=cFD>OptLag1</span><span class=cF0>(tmpi)</span><span class=cF7>)</span><span class=cF0>)
<a name="l6"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l7"></a> </span><span class=cF1>if</span><span class=cF0> (tmpil1-&gt;ic_code == </span><span class=cF3>IC_ADD_CONST</span><span class=cF0> &amp;&amp; tmpi-&gt;ic_code == </span><span class=cF3>IC_DEREF</span><span class=cF0> &amp;&amp; tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_ARG1_WAS_STACK</span><span class=cF0> &amp;&amp;
<a name="l8"></a> tmpi-&gt;arg1.type &amp; </span><span class=cF3>MDF_REG</span><span class=cF0> &amp;&amp; tmpil1-&gt;res.type &amp; </span><span class=cF3>MDF_REG</span><span class=cF0> &amp;&amp; </span><span class=cF3>I32_MIN</span><span class=cF0> &lt;= tmpil1-&gt;ic_data &lt;= </span><span class=cF3>I32_MAX</span><span class=cF0> &amp;&amp;
<a name="l9"></a> !</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;</span><span class=cFB>cmp</span><span class=cF0>.non_ptr_vars_mask, tmpil1-&gt;arg1.</span><span class=cF1>reg</span><span class=cF7>)</span><span class=cF0>)
<a name="l10"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l11"></a> </span><span class=cF1>if</span><span class=cF0> (tmpil1-&gt;arg1.type &amp; </span><span class=cF3>MDF_REG</span><span class=cF0>)
<a name="l12"></a> {
<a name="l13"></a> tmpi-&gt;ic_flags = tmpi-&gt;ic_flags &amp; ~</span><span class=cF3>ICF_ARG1_WAS_STACK</span><span class=cF0> | tmpil1-&gt;ic_flags;
<a name="l14"></a> tmpi-&gt;ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
<a name="l15"></a> tmpi-&gt;arg1.type = </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi-&gt;arg1_type_pointed_to;
<a name="l16"></a> tmpi-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0> = tmpil1-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0>;
<a name="l17"></a> tmpi-&gt;arg1.disp = tmpil1-&gt;ic_data;
<a name="l18"></a> </span><span class=cFD>OptSetNOP2</span><span class=cF0>(tmpil1, -</span><span class=cFE>1</span><span class=cF0>);
<a name="l19"></a> }
<a name="l20"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l21"></a> {
<a name="l22"></a> tmpil1-&gt;ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
<a name="l23"></a> tmpi-&gt;ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
<a name="l24"></a> tmpi-&gt;arg1.type = </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi-&gt;arg1_type_pointed_to;
<a name="l25"></a> tmpi-&gt;arg1.disp = tmpil1-&gt;ic_data;
<a name="l26"></a> }
<a name="l27"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l28"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l29"></a>
<a name="l30"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l31"></a>}
<a name="l32"></a>
<a name="l33"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>OptPass6Lag</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CParseStack</span><span class=cF0> *ps, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> *_stack_ptr, </span><span class=cF9>I64</span><span class=cF0> reg_stack_size,
<a name="l34"></a> </span><span class=cF9>I64</span><span class=cF0> *_clobbered_reg_mask)
<a name="l35"></a>{
<a name="l36"></a> </span><span class=cF9>I64</span><span class=cF0> stack_ptr = *_stack_ptr, code, clobbered_stack_tmp_mask, clobbered_reg_mask = *_clobbered_reg_mask;
<a name="l37"></a> </span><span class=cF9>CHashFun</span><span class=cF0> *tmpf;
<a name="l38"></a>
<a name="l39"></a> code = tmpi-&gt;ic_code;
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_PASS_TRACE</span><span class=cF0> &amp;&amp; </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;cc-&gt;saved_pass_trace, </span><span class=cFE>6</span><span class=cF7>)</span><span class=cF0>)
<a name="l41"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l42"></a> </span><span class=cF6>&quot;%2d:&quot;</span><span class=cF0>, stack_ptr;
<a name="l43"></a> </span><span class=cFD>ICPut</span><span class=cF0>(cc, tmpi);
<a name="l44"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l45"></a> </span><span class=cF1>if</span><span class=cF0> (code == </span><span class=cF3>IC_CALL_START</span><span class=cF0>)
<a name="l46"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l47"></a> </span><span class=cF1>if</span><span class=cF0> (reg_stack_size == </span><span class=cFE>1</span><span class=cF0> &amp;&amp; stack_ptr &gt; </span><span class=cFE>0</span><span class=cF0>)
<a name="l48"></a> clobbered_stack_tmp_mask = </span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>;
<a name="l49"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l50"></a> clobbered_stack_tmp_mask = </span><span class=cFE>0</span><span class=cF0>;
<a name="l51"></a> </span><span class=cF1>if</span><span class=cF0> (tmpf = tmpi-&gt;ic_data)
<a name="l52"></a> {
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;tmpf-&gt;flags, </span><span class=cF3>Ff_INTERNAL</span><span class=cF7>)</span><span class=cF0>)
<a name="l54"></a> clobbered_stack_tmp_mask = </span><span class=cFE>0</span><span class=cF0>;
<a name="l55"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l56"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l57"></a> clobbered_stack_tmp_mask &amp;= tmpf-&gt;clobbered_reg_mask;
<a name="l58"></a> clobbered_reg_mask |= tmpf-&gt;clobbered_reg_mask;
<a name="l59"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l60"></a> }
<a name="l61"></a> tmpi-&gt;ic_data = clobbered_stack_tmp_mask;
<a name="l62"></a> </span><span class=cFD>ParsePush</span><span class=cF0>(ps, stack_ptr);
<a name="l63"></a> </span><span class=cFD>ParsePush</span><span class=cF0>(ps, clobbered_stack_tmp_mask);
<a name="l64"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l65"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (code == </span><span class=cF3>IC_CALL_END</span><span class=cF0>)
<a name="l66"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l67"></a> tmpi-&gt;ic_data = </span><span class=cFD>ParsePop</span><span class=cF0>(ps);
<a name="l68"></a> stack_ptr = </span><span class=cFD>ParsePop</span><span class=cF0>(ps);
<a name="l69"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l70"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (code == </span><span class=cF3>IC_CALL_END2</span><span class=cF0>)
<a name="l71"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l72"></a> ps-&gt;ptr--;
<a name="l73"></a> stack_ptr = </span><span class=cFD>ParsePop</span><span class=cF0>(ps);
<a name="l74"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l75"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFD>intermediate_code_table</span><span class=cF0>[code].arg_count == </span><span class=cF3>IS_V_ARG</span><span class=cF0>)
<a name="l76"></a> stack_ptr -= tmpi-&gt;ic_data &gt;&gt; </span><span class=cFE>3</span><span class=cF0>;
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;arg2.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0>)
<a name="l78"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l79"></a> stack_ptr--;
<a name="l80"></a> </span><span class=cF1>if</span><span class=cF0> (stack_ptr &lt; reg_stack_size)
<a name="l81"></a> {
<a name="l82"></a> tmpi-&gt;arg2.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi-&gt;arg2.type.raw_type;
<a name="l83"></a> tmpi-&gt;arg2.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF5>Bsf</span><span class=cF0>(</span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>);
<a name="l84"></a> tmpi-&gt;arg2.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l85"></a> }
<a name="l86"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l87"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;arg1.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0>)
<a name="l88"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l89"></a> stack_ptr--;
<a name="l90"></a> </span><span class=cF1>if</span><span class=cF0> (stack_ptr &lt; reg_stack_size)
<a name="l91"></a> {
<a name="l92"></a> tmpi-&gt;arg1.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi-&gt;arg1.type.raw_type;
<a name="l93"></a> tmpi-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF5>Bsf</span><span class=cF0>(</span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>);
<a name="l94"></a> tmpi-&gt;arg1.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l95"></a> }
<a name="l96"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l97"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;res.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_PUSH_RES</span><span class=cF7>)</span><span class=cF0>)
<a name="l98"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l99"></a> stack_ptr++;
<a name="l100"></a> </span><span class=cF1>if</span><span class=cF0> (stack_ptr &lt;= reg_stack_size)
<a name="l101"></a> {
<a name="l102"></a> tmpi-&gt;res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi-&gt;res.type.raw_type;
<a name="l103"></a> tmpi-&gt;res.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF5>Bsf</span><span class=cF0>(</span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>);
<a name="l104"></a> clobbered_reg_mask |= </span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>;
<a name="l105"></a> tmpi-&gt;res.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l106"></a> }
<a name="l107"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l108"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cFD>OptIC6</span><span class=cF7>(</span><span class=cF0>tmpi</span><span class=cF7>)</span><span class=cF0>);
<a name="l109"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;res.type.raw_type != </span><span class=cF3>RT_F64</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_USE_F64</span><span class=cF7>)</span><span class=cF0>)
<a name="l110"></a> tmpi-&gt;ic_flags |= </span><span class=cF3>ICF_USE_INT</span><span class=cF0>;
<a name="l111"></a> *_stack_ptr = stack_ptr;
<a name="l112"></a> *_clobbered_reg_mask = clobbered_reg_mask;
<a name="l113"></a>}
<a name="l114"></a>
<a name="l115"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>OptPass6</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc)
<a name="l116"></a>{
<a name="l117"></a> </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, *tmpi_next, *tmpil1, *tmpil2, *old_tmpil2;
<a name="l118"></a> </span><span class=cF9>I64</span><span class=cF0> stack_ptr = </span><span class=cFE>0</span><span class=cF0>, reg_stack_size, clobbered_reg_mask = </span><span class=cF3>REGG_CLOBBERED</span><span class=cF0>;
<a name="l119"></a> </span><span class=cF9>CParseStack</span><span class=cF0> *ps = cc-&gt;ps;
<a name="l120"></a>
<a name="l121"></a> ps-&gt;ptr = </span><span class=cFE>0</span><span class=cF0>;
<a name="l122"></a> ps-&gt;ptr2 = </span><span class=cFE>0</span><span class=cF0>;
<a name="l123"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;cc-&gt;opts, </span><span class=cF3>OPTf_NO_REG_VAR</span><span class=cF7>)</span><span class=cF0> || cc-&gt;flags &amp; </span><span class=cF3>CCF_NO_REG_OPT</span><span class=cF0>)
<a name="l124"></a> reg_stack_size = </span><span class=cFE>0</span><span class=cF0>;
<a name="l125"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l126"></a> reg_stack_size = </span><span class=cFE>1</span><span class=cF0>;
<a name="l127"></a>#</span><span class=cF1>assert</span><span class=cF0> </span><span class=cF3>REGG_STACK_TMP</span><span class=cF0> == </span><span class=cFE>1</span><span class=cF0> &lt;&lt; </span><span class=cFE>9</span><span class=cF0>
<a name="l128"></a> tmpi = cc-&gt;coc.coc_head.next;
<a name="l129"></a> old_tmpil2 = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l130"></a> tmpil1 = tmpil2 = &amp;</span><span class=cFB>cmp</span><span class=cF0>.ic_nop;
<a name="l131"></a> </span><span class=cF1>while</span><span class=cF0> (tmpi-&gt;ic_code)
<a name="l132"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l133"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_code &gt; </span><span class=cF3>IC_NOP2</span><span class=cF0>)
<a name="l134"></a> {
<a name="l135"></a> </span><span class=cF1>if</span><span class=cF0> (tmpil1-&gt;ic_code &gt; </span><span class=cF3>IC_NOP2</span><span class=cF0>)
<a name="l136"></a> tmpil2 = tmpil1;
<a name="l137"></a> tmpil1 = tmpi;
<a name="l138"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;arg2.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0>)
<a name="l139"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l140"></a> </span><span class=cF1>if</span><span class=cF0> (tmpil2-&gt;res.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>tmpil2-&gt;ic_flags &amp; </span><span class=cF3>ICF_PUSH_RES</span><span class=cF7>)</span><span class=cF0>)
<a name="l141"></a> {
<a name="l142"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_code == </span><span class=cF3>IC_ASSIGN</span><span class=cF0> &amp;&amp; tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_BY_VAL</span><span class=cF0> &amp;&amp; tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_RES_NOT_USED</span><span class=cF0> &amp;&amp;
<a name="l143"></a> tmpil2-&gt;ic_code != </span><span class=cF3>IC_CALL_END</span><span class=cF0> &amp;&amp; tmpil2-&gt;ic_code != </span><span class=cF3>IC_CALL_END2</span><span class=cF0> &amp;&amp; tmpil2-&gt;ic_code != </span><span class=cF3>IC_RAX_SET</span><span class=cF0> &amp;&amp;
<a name="l144"></a> !</span><span class=cF7>(</span><span class=cF0>tmpi-&gt;ic_flags &amp; (</span><span class=cF3>ICF_ARG2_TO_F64</span><span class=cF0> | </span><span class=cF3>ICF_ARG2_TO_INT</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l145"></a> !</span><span class=cF7>(</span><span class=cF0>tmpil2-&gt;ic_flags &amp; (</span><span class=cF3>ICF_RES_TO_F64</span><span class=cF0> | </span><span class=cF3>ICF_RES_TO_INT</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l146"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l147"></a> tmpil2-&gt;res.type = tmpi-&gt;arg1.type &amp; </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi-&gt;arg1_type_pointed_to;
<a name="l148"></a> tmpil2-&gt;res.</span><span class=cF1>reg</span><span class=cF0> = tmpi-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0>;
<a name="l149"></a> tmpil2-&gt;res.disp = tmpi-&gt;arg1.disp;
<a name="l150"></a> tmpil2-&gt;ic_flags = tmpil2-&gt;ic_flags &amp; ~(</span><span class=cF3>ICF_RES_NOT_USED</span><span class=cF0> | </span><span class=cF3>ICF_RES_WAS_STACK</span><span class=cF0>) |
<a name="l151"></a> tmpi-&gt;ic_flags &amp; ~(</span><span class=cF3>ICF_BY_VAL</span><span class=cF0> | </span><span class=cF3>ICF_ARG1_WAS_STACK</span><span class=cF0> | </span><span class=cF3>ICF_ARG2_WAS_STACK</span><span class=cF0>);
<a name="l152"></a> old_tmpil2 = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l153"></a> </span><span class=cFD>OptSetNOP1</span><span class=cF0>(tmpi);
<a name="l154"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l155"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l156"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l157"></a> tmpi-&gt;arg2.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi-&gt;arg2.type.raw_type;
<a name="l158"></a> tmpi-&gt;arg2.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_RAX</span><span class=cF0>;
<a name="l159"></a> tmpi-&gt;arg2.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l160"></a> tmpil2-&gt;res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpil2-&gt;res.type.raw_type;
<a name="l161"></a> tmpil2-&gt;res.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_RAX</span><span class=cF0>;
<a name="l162"></a> tmpil2-&gt;res.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l163"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l164"></a> }
<a name="l165"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l166"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;arg1.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0> &amp;&amp; tmpil2-&gt;res.type &amp; </span><span class=cF3>MDF_STACK</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>tmpil2-&gt;ic_flags &amp; </span><span class=cF3>ICF_PUSH_RES</span><span class=cF7>)</span><span class=cF0>)
<a name="l167"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l168"></a> tmpi-&gt;arg1.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi-&gt;arg1.type.raw_type;
<a name="l169"></a> tmpi-&gt;arg1.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l170"></a> tmpil2-&gt;res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpil2-&gt;res.type.raw_type;
<a name="l171"></a> tmpil2-&gt;res.disp = </span><span class=cFE>0</span><span class=cF0>;
<a name="l172"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFD>intermediate_code_table</span><span class=cF0>[tmpi-&gt;ic_code].arg_count == </span><span class=cF3>IS_2_ARG</span><span class=cF0>)
<a name="l173"></a> {
<a name="l174"></a> tmpi-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_R8</span><span class=cF0>;
<a name="l175"></a> tmpil2-&gt;res.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_R8</span><span class=cF0>;
<a name="l176"></a> }
<a name="l177"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l178"></a> {
<a name="l179"></a> tmpi-&gt;arg1.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_RAX</span><span class=cF0>;
<a name="l180"></a> tmpil2-&gt;res.</span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_RAX</span><span class=cF0>;
<a name="l181"></a> }
<a name="l182"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l183"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_flags &amp; </span><span class=cF3>ICF_PUSH_RES</span><span class=cF0>)
<a name="l184"></a> tmpi-&gt;res.type == </span><span class=cF3>MDF_STACK</span><span class=cF0> + tmpi-&gt;res.type.raw_type;
<a name="l185"></a> </span><span class=cF1>if</span><span class=cF0> (old_tmpil2 != tmpil2)
<a name="l186"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (tmpil2-&gt;ic_code &gt; </span><span class=cF3>IC_NOP2</span><span class=cF0>)
<a name="l188"></a> </span><span class=cFD>OptPass6Lag</span><span class=cF0>(cc, ps, tmpil2, &amp;stack_ptr, reg_stack_size, &amp;clobbered_reg_mask);
<a name="l189"></a> old_tmpil2 = tmpil2;
<a name="l190"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l191"></a> }
<a name="l192"></a> tmpi_next = tmpi-&gt;next;
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi-&gt;ic_code &lt;= </span><span class=cF3>IC_NOP2</span><span class=cF0>)
<a name="l194"></a> </span><span class=cFD>OptFree</span><span class=cF0>(tmpi);
<a name="l195"></a> tmpi = tmpi_next;
<a name="l196"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l197"></a> </span><span class=cF1>if</span><span class=cF0> (ps-&gt;ptr &gt; </span><span class=cFE>2</span><span class=cF0>)
<a name="l198"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l199"></a> </span><span class=cF6>&quot;Pass:%d Stack:%08X\n&quot;</span><span class=cF0>, cc-&gt;pass,ps-&gt;ptr;
<a name="l200"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>&quot;Compiler Optimization Error at &quot;</span><span class=cF0>);
<a name="l201"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l202"></a> </span><span class=cF1>if</span><span class=cF0> (cc-&gt;htc.fun)
<a name="l203"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l204"></a> cc-&gt;htc.fun-&gt;used_reg_mask &amp;= ~</span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>;
<a name="l205"></a> cc-&gt;htc.fun-&gt;used_reg_mask |= clobbered_reg_mask;
<a name="l206"></a> cc-&gt;htc.fun-&gt;clobbered_reg_mask = clobbered_reg_mask;
<a name="l207"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;cc-&gt;flags, </span><span class=cF3>CCf_PASS_TRACE_PRESENT</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;cc-&gt;saved_pass_trace, </span><span class=cFE>6</span><span class=cF7>)</span><span class=cF0>)
<a name="l208"></a> {
<a name="l209"></a> </span><span class=cF6>&quot;Used Reg Mask:%04X\n&quot;</span><span class=cF0>, cc-&gt;htc.fun-&gt;used_reg_mask;
<a name="l210"></a> </span><span class=cF6>&quot;Clobbered Reg Mask:%04X\n&quot;</span><span class=cF0>, clobbered_reg_mask;
<a name="l211"></a> }
<a name="l212"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l213"></a>}
</span></pre></body>
</html>