mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 00:06:35 +00:00
dbf8647d59
Added top & right borders to RawDr. Improved spacing in some debug and compiler reporting. Fixed RawPutChar and EdLite tab width. Fixed Ui missing '0x' prefix syntax highlighter bug. Added 32BitPaint demo.
242 lines
26 KiB
HTML
Executable file
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 V0.08">
|
|
<style type="text/css">
|
|
body {background-color:#000000;}
|
|
.cF0{color:#ffffff;background-color:#000000;}
|
|
.cF1{color:#3465a4;background-color:#000000;}
|
|
.cF2{color:#4e9a06;background-color:#000000;}
|
|
.cF3{color:#06989a;background-color:#000000;}
|
|
.cF4{color:#a24444;background-color:#000000;}
|
|
.cF5{color:#75507b;background-color:#000000;}
|
|
.cF6{color:#ce982f;background-color:#000000;}
|
|
.cF7{color:#bcc0b9;background-color:#000000;}
|
|
.cF8{color:#555753;background-color:#000000;}
|
|
.cF9{color:#729fcf;background-color:#000000;}
|
|
.cFA{color:#82bc49;background-color:#000000;}
|
|
.cFB{color:#34e2e2;background-color:#000000;}
|
|
.cFC{color:#ac3535;background-color:#000000;}
|
|
.cFD{color:#ad7fa8;background-color:#000000;}
|
|
.cFE{color:#fce94f;background-color:#000000;}
|
|
.cFF{color:#000000;background-color:#000000;}
|
|
</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->ic_code < </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->ic_code == </span><span class=cF3>IC_ADD_CONST</span><span class=cF0> && tmpi->ic_code == </span><span class=cF3>IC_DEREF</span><span class=cF0> && tmpi->ic_flags & </span><span class=cF3>ICF_ARG1_WAS_STACK</span><span class=cF0> &&
|
|
<a name="l8"></a> tmpi->arg1.type & </span><span class=cF3>MDF_REG</span><span class=cF0> && tmpil1->res.type & </span><span class=cF3>MDF_REG</span><span class=cF0> && </span><span class=cF3>I32_MIN</span><span class=cF0> <= tmpil1->ic_data <= </span><span class=cF3>I32_MAX</span><span class=cF0> &&
|
|
<a name="l9"></a> !</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&</span><span class=cFB>cmp</span><span class=cF0>.non_ptr_vars_mask, tmpil1->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->arg1.type & </span><span class=cF3>MDF_REG</span><span class=cF0>)
|
|
<a name="l12"></a> {
|
|
<a name="l13"></a> tmpi->ic_flags = tmpi->ic_flags & ~</span><span class=cF3>ICF_ARG1_WAS_STACK</span><span class=cF0> | tmpil1->ic_flags;
|
|
<a name="l14"></a> tmpi->ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
|
|
<a name="l15"></a> tmpi->arg1.type = </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi->arg1_type_pointed_to;
|
|
<a name="l16"></a> tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0> = tmpil1->arg1.</span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l17"></a> tmpi->arg1.disp = tmpil1->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->ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
|
|
<a name="l23"></a> tmpi->ic_code = </span><span class=cF3>IC_MOV</span><span class=cF0>;
|
|
<a name="l24"></a> tmpi->arg1.type = </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi->arg1_type_pointed_to;
|
|
<a name="l25"></a> tmpi->arg1.disp = tmpil1->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->ic_code;
|
|
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_PASS_TRACE</span><span class=cF0> && </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->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>"%2d:"</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> && stack_ptr > </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->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>&tmpf->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 &= tmpf->clobbered_reg_mask;
|
|
<a name="l58"></a> clobbered_reg_mask |= tmpf->clobbered_reg_mask;
|
|
<a name="l59"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l60"></a> }
|
|
<a name="l61"></a> tmpi->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->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->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->ic_data >> </span><span class=cFE>3</span><span class=cF0>;
|
|
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg2.type & </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 < reg_stack_size)
|
|
<a name="l81"></a> {
|
|
<a name="l82"></a> tmpi->arg2.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi->arg2.type.raw_type;
|
|
<a name="l83"></a> tmpi->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->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->arg1.type & </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 < reg_stack_size)
|
|
<a name="l91"></a> {
|
|
<a name="l92"></a> tmpi->arg1.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi->arg1.type.raw_type;
|
|
<a name="l93"></a> tmpi->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->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->res.type & </span><span class=cF3>MDF_STACK</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>tmpi->ic_flags & </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 <= reg_stack_size)
|
|
<a name="l101"></a> {
|
|
<a name="l102"></a> tmpi->res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi->res.type.raw_type;
|
|
<a name="l103"></a> tmpi->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->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->res.type.raw_type != </span><span class=cF3>RT_F64</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>tmpi->ic_flags & </span><span class=cF3>ICF_USE_F64</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l110"></a> tmpi->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->ps;
|
|
<a name="l120"></a>
|
|
<a name="l121"></a> ps->ptr = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l122"></a> ps->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>&cc->opts, </span><span class=cF3>OPTf_NO_REG_VAR</span><span class=cF7>)</span><span class=cF0> || cc->flags & </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> << </span><span class=cFE>9</span><span class=cF0>
|
|
<a name="l128"></a> tmpi = cc->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 = &</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->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->ic_code > </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->ic_code > </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->arg2.type & </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->res.type & </span><span class=cF3>MDF_STACK</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>tmpil2->ic_flags & </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->ic_code == </span><span class=cF3>IC_ASSIGN</span><span class=cF0> && tmpi->ic_flags & </span><span class=cF3>ICF_BY_VAL</span><span class=cF0> && tmpi->ic_flags & </span><span class=cF3>ICF_RES_NOT_USED</span><span class=cF0> &&
|
|
<a name="l143"></a> tmpil2->ic_code != </span><span class=cF3>IC_CALL_END</span><span class=cF0> && tmpil2->ic_code != </span><span class=cF3>IC_CALL_END2</span><span class=cF0> && tmpil2->ic_code != </span><span class=cF3>IC_RAX_SET</span><span class=cF0> &&
|
|
<a name="l144"></a> !</span><span class=cF7>(</span><span class=cF0>tmpi->ic_flags & (</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> &&
|
|
<a name="l145"></a> !</span><span class=cF7>(</span><span class=cF0>tmpil2->ic_flags & (</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->res.type = tmpi->arg1.type & </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi->arg1_type_pointed_to;
|
|
<a name="l148"></a> tmpil2->res.</span><span class=cF1>reg</span><span class=cF0> = tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l149"></a> tmpil2->res.disp = tmpi->arg1.disp;
|
|
<a name="l150"></a> tmpil2->ic_flags = tmpil2->ic_flags & ~(</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->ic_flags & ~(</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->arg2.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi->arg2.type.raw_type;
|
|
<a name="l158"></a> tmpi->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->arg2.disp = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l160"></a> tmpil2->res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpil2->res.type.raw_type;
|
|
<a name="l161"></a> tmpil2->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->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->arg1.type & </span><span class=cF3>MDF_STACK</span><span class=cF0> && tmpil2->res.type & </span><span class=cF3>MDF_STACK</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>tmpil2->ic_flags & </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->arg1.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpi->arg1.type.raw_type;
|
|
<a name="l169"></a> tmpi->arg1.disp = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l170"></a> tmpil2->res.type = </span><span class=cF3>MDF_REG</span><span class=cF0> + tmpil2->res.type.raw_type;
|
|
<a name="l171"></a> tmpil2->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->ic_code].arg_count == </span><span class=cF3>IS_2_ARG</span><span class=cF0>)
|
|
<a name="l173"></a> {
|
|
<a name="l174"></a> tmpi->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->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->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->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->ic_flags & </span><span class=cF3>ICF_PUSH_RES</span><span class=cF0>)
|
|
<a name="l184"></a> tmpi->res.type == </span><span class=cF3>MDF_STACK</span><span class=cF0> + tmpi->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->ic_code > </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, &stack_ptr, reg_stack_size, &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->next;
|
|
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_code <= </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->ptr > </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>"Pass:%d Stack:%08X\n"</span><span class=cF0>, cc->pass,ps->ptr;
|
|
<a name="l200"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Compiler Optimization Error at "</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->htc.fun)
|
|
<a name="l203"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l204"></a> cc->htc.fun->used_reg_mask &= ~</span><span class=cF3>REGG_STACK_TMP</span><span class=cF0>;
|
|
<a name="l205"></a> cc->htc.fun->used_reg_mask |= clobbered_reg_mask;
|
|
<a name="l206"></a> cc->htc.fun->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>&cc->flags, </span><span class=cF3>CCf_PASS_TRACE_PRESENT</span><span class=cF7>)</span><span class=cF0> && </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->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>"Used Reg Mask:%04X\n"</span><span class=cF0>, cc->htc.fun->used_reg_mask;
|
|
<a name="l210"></a> </span><span class=cF6>"Clobbered Reg Mask:%04X\n"</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>
|