285 lines
31 KiB
Plaintext
285 lines
31 KiB
Plaintext
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="generator" content="TempleOS V5.03">
|
||
|
<meta name="viewport" content="width=device-width">
|
||
|
<link rel="stylesheet" href="/style/templeos.css">
|
||
|
<script src="/script/templeos.js"></script>
|
||
|
<style type="text/css">
|
||
|
.cF0{color:#000000;background-color:#ffffff;}
|
||
|
.cF1{color:#0000aa;background-color:#ffffff;}
|
||
|
.cF2{color:#00aa00;background-color:#ffffff;}
|
||
|
.cF3{color:#00aaaa;background-color:#ffffff;}
|
||
|
.cF4{color:#aa0000;background-color:#ffffff;}
|
||
|
.cF5{color:#aa00aa;background-color:#ffffff;}
|
||
|
.cF6{color:#aa5500;background-color:#ffffff;}
|
||
|
.cF7{color:#aaaaaa;background-color:#ffffff;}
|
||
|
.cF8{color:#555555;background-color:#ffffff;}
|
||
|
.cF9{color:#5555ff;background-color:#ffffff;}
|
||
|
.cFA{color:#55ff55;background-color:#ffffff;}
|
||
|
.cFB{color:#55ffff;background-color:#ffffff;}
|
||
|
.cFC{color:#ff5555;background-color:#ffffff;}
|
||
|
.cFD{color:#ff55ff;background-color:#ffffff;}
|
||
|
.cFE{color:#ffff55;background-color:#ffffff;}
|
||
|
.cFF{color:#ffffff;background-color:#ffffff;}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<pre id="content">
|
||
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexPutToken</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
|
||
|
<a name="l2"></a>{</span><span class=cF2>//Print cur token to StdOut. (Crude)</span><span class=cF0>
|
||
|
<a name="l3"></a> </span><span class=cF6>'"'</span><span class=cF0>;
|
||
|
<a name="l4"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token==</span><span class=cF3>TK_IDENT</span><span class=cF0> || cc->token==</span><span class=cF3>TK_STR</span><span class=cF0>)
|
||
|
<a name="l5"></a> </span><span class=cF6>"%s"</span><span class=cF0>,cc->cur_str;
|
||
|
<a name="l6"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (cc->token==</span><span class=cF3>TK_I64</span><span class=cF0>)
|
||
|
<a name="l7"></a> </span><span class=cF6>"INT:%X"</span><span class=cF0>,cc->cur_i64;
|
||
|
<a name="l8"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (cc->token==</span><span class=cF3>TK_CHAR_CONST</span><span class=cF0>)
|
||
|
<a name="l9"></a> </span><span class=cF6>"U8:%X"</span><span class=cF0>,cc->cur_i64;
|
||
|
<a name="l10"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (cc->token==</span><span class=cF3>TK_F64</span><span class=cF0>)
|
||
|
<a name="l11"></a> </span><span class=cF6>"FLOAT:%e"</span><span class=cF0>,cc->cur_f64;
|
||
|
<a name="l12"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (cc->token==</span><span class=cF6>'\n'</span><span class=cF0>)
|
||
|
<a name="l13"></a> </span><span class=cF6>"<NEW_LINE>"</span><span class=cF0>;
|
||
|
<a name="l14"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>char_bmp_displayable</span><span class=cF0>,cc->token</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l15"></a> </span><span class=cF6>''</span><span class=cF0> cc->token;
|
||
|
<a name="l16"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l17"></a> </span><span class=cF6>"T:%X"</span><span class=cF0>,cc->token;
|
||
|
<a name="l18"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l19"></a> </span><span class=cF6>"\" "</span><span class=cF0>;
|
||
|
<a name="l20"></a>}
|
||
|
<a name="l21"></a>
|
||
|
<a name="l22"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>LexPutLine</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF1>start</span><span class=cF0>)
|
||
|
<a name="l23"></a>{</span><span class=cF2>//Print cur pos to end of line to StdOut.</span><span class=cF0>
|
||
|
<a name="l24"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
|
||
|
<a name="l25"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr;
|
||
|
<a name="l26"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF1>start</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
||
|
<a name="l27"></a> </span><span class=cF1>if</span><span class=cF0> (cc->lex_include_stk->flags&</span><span class=cF3>LFSF_DOC</span><span class=cF0>)
|
||
|
<a name="l28"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>DocPutLine</span><span class=cF0>(cc->lex_include_stk->doc,</span><span class=cF1>start</span><span class=cF0>);
|
||
|
<a name="l29"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l30"></a> ptr=</span><span class=cF1>start</span><span class=cF0>;
|
||
|
<a name="l31"></a> </span><span class=cF1>while</span><span class=cF0> (ch=*ptr++) {
|
||
|
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>'\n'</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l33"></a> </span><span class=cF1>if</span><span class=cF0> (*ptr==</span><span class=cF6>'\r'</span><span class=cF0>)
|
||
|
<a name="l34"></a> ptr++;
|
||
|
<a name="l35"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l36"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>'\r'</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l37"></a> </span><span class=cF1>if</span><span class=cF0> (*ptr==</span><span class=cF6>'\n'</span><span class=cF0>)
|
||
|
<a name="l38"></a> ptr++;
|
||
|
<a name="l39"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l40"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l41"></a> </span><span class=cF6>''</span><span class=cF0> ch;
|
||
|
<a name="l42"></a> }
|
||
|
<a name="l43"></a> </span><span class=cF1>if</span><span class=cF0> (!ch) ptr--;
|
||
|
<a name="l44"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
||
|
<a name="l45"></a> </span><span class=cF1>return</span><span class=cF0> ptr;
|
||
|
<a name="l46"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l47"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
||
|
<a name="l48"></a>}
|
||
|
<a name="l49"></a>
|
||
|
<a name="l50"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexPutPos</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
|
||
|
<a name="l51"></a>{</span><span class=cF2>//Print token, line link and, then, </span><a href="/Wb/Compiler/CExcept.HC.HTML#l22"><span class=cF4>LexPutLine</span></a><span class=cF2>().</span><span class=cF0>
|
||
|
<a name="l52"></a> </span><span class=cF5>LexPutToken</span><span class=cF0>(cc);
|
||
|
<a name="l53"></a> </span><span class=cF5>FixSet</span><span class=cF0>(cc->lex_include_stk->full_name,cc->lex_include_stk->line_num);
|
||
|
<a name="l54"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>IsRaw</span><span class=cF0>)
|
||
|
<a name="l55"></a> </span><span class=cF6>"%s,%d "</span><span class=cF0>,cc->lex_include_stk->full_name,cc->lex_include_stk->line_num;
|
||
|
<a name="l56"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l57"></a> </span><span class=cF5>PutFileLink</span><span class=cF0>(cc->lex_include_stk->full_name,,cc->lex_include_stk->line_num);
|
||
|
<a name="l58"></a> </span><span class=cF5>AdamErr</span><span class=cF0>(</span><span class=cF6>"%s,%d\n"</span><span class=cF0>,
|
||
|
<a name="l59"></a> cc->lex_include_stk->full_name,cc->lex_include_stk->line_num);
|
||
|
<a name="l60"></a> </span><span class=cF6>''</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
||
|
<a name="l61"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l62"></a> </span><span class=cF5>LexPutLine</span><span class=cF0>(cc,cc->lex_include_stk->line_start);
|
||
|
<a name="l63"></a>}
|
||
|
<a name="l64"></a>
|
||
|
<a name="l65"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexWarn</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF1>U8</span><span class=cF0> *str=</span><span class=cF3>NULL</span><span class=cF0>)
|
||
|
<a name="l66"></a>{</span><span class=cF2>//Print warn msg, then, </span><a href="/Wb/Compiler/CExcept.HC.HTML#l50"><span class=cF4>LexPutPos</span></a><span class=cF2>().</span><span class=cF0>
|
||
|
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (str) </span><span class=cF5>PrintWarn</span><span class=cF0>(str);
|
||
|
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (cc->htc.fun) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l69"></a> </span><span class=cF6>"in fun '%s'.\n"</span><span class=cF0>,cc->htc.fun->str;
|
||
|
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>IsRaw</span><span class=cF0>)
|
||
|
<a name="l71"></a> </span><span class=cF6>"%s\n"</span><span class=cF0>,cc->htc.fun->src_link;
|
||
|
<a name="l72"></a> </span><span class=cF1>else</span><span class=cF0> {
|
||
|
<a name="l73"></a> </span><span class=cF6>"$LK,\"%s\"$\n"</span><span class=cF0>,cc->htc.fun->src_link;
|
||
|
<a name="l74"></a> </span><span class=cF5>AdamErr</span><span class=cF0>(</span><span class=cF6>"%s\n"</span><span class=cF0>,cc->htc.fun->src_link);
|
||
|
<a name="l75"></a> }
|
||
|
<a name="l76"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l77"></a> </span><span class=cF5>LexPutPos</span><span class=cF0>(cc);
|
||
|
<a name="l78"></a> cc->warning_cnt++;
|
||
|
<a name="l79"></a>}
|
||
|
<a name="l80"></a>
|
||
|
<a name="l81"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexExcept</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF1>U8</span><span class=cF0> *str=</span><span class=cF3>NULL</span><span class=cF0>)
|
||
|
<a name="l82"></a>{</span><span class=cF2>//Print err msg, </span><a href="/Wb/Compiler/CExcept.HC.HTML#l50"><span class=cF4>LexPutPos</span></a><span class=cF2>() and throw exception.</span><span class=cF0>
|
||
|
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&</span><span class=cFB>sys_run_level</span><span class=cF0>,</span><span class=cF3>RLf_ADAM_SERVER</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l84"></a> </span><span class=cF5>Raw</span><span class=cF0>(</span><span class=cF3>ON</span><span class=cF0>);
|
||
|
<a name="l85"></a> </span><span class=cF6>"Note: Still in boot phase.\n"</span><span class=cF0>;
|
||
|
<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> (str) </span><span class=cF5>PrintErr</span><span class=cF0>(str);
|
||
|
<a name="l88"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>IsRaw</span><span class=cF0>)
|
||
|
<a name="l89"></a> </span><span class=cF5>AdamErr</span><span class=cF0>(</span><span class=cF6>"Task:%08X %s\n"</span><span class=cF0>,</span><span class=cF5>Fs</span><span class=cF0>,str);
|
||
|
<a name="l90"></a> </span><span class=cF5>LexPutPos</span><span class=cF0>(cc);
|
||
|
<a name="l91"></a> cc->error_cnt++;
|
||
|
<a name="l92"></a> </span><span class=cF5>FlushMsgs</span><span class=cF0>;
|
||
|
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&</span><span class=cFB>sys_run_level</span><span class=cF0>,</span><span class=cF3>RLf_ADAM_SERVER</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l94"></a> </span><span class=cF5>Dbg</span><span class=cF0>(</span><span class=cF6>"Type \"Fix;\""</span><span class=cF0>);
|
||
|
<a name="l95"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
||
|
<a name="l96"></a>}
|
||
|
<a name="l97"></a>
|
||
|
<a name="l98"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>UndefinedExtern</span><span class=cF0>()
|
||
|
<a name="l99"></a>{
|
||
|
<a name="l100"></a> </span><span class=cF5>PrintErr</span><span class=cF0>(</span><span class=cF6>"Undefined Extern\nat %P\n"</span><span class=cF0>,</span><span class=cF5>Caller</span><span class=cF0>);
|
||
|
<a name="l101"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'UndefExt'</span><span class=cF0>);
|
||
|
<a name="l102"></a>}
|
||
|
<a name="l103"></a>
|
||
|
<a name="l104"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>UnusedExternWarning</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF9>CHashClass</span><span class=cF0> *tmpc)
|
||
|
<a name="l105"></a>{
|
||
|
<a name="l106"></a> </span><span class=cF5>PrintWarn</span><span class=cF0>(</span><span class=cF6>"Unused extern '%s'\n"</span><span class=cF0>,tmpc->str);
|
||
|
<a name="l107"></a> cc->warning_cnt++;
|
||
|
<a name="l108"></a>}
|
||
|
<a name="l109"></a>
|
||
|
<a name="l110"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParenWarning</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
|
||
|
<a name="l111"></a>{
|
||
|
<a name="l112"></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_WARN_PAREN</span><span class=cF7>)</span><span class=cF0> &&
|
||
|
<a name="l113"></a> !</span><span class=cF7>(</span><span class=cF0>cc->lex_include_stk->flags&</span><span class=cF3>LFSF_DEFINE</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l114"></a> </span><span class=cF5>LexWarn</span><span class=cF0>(cc,</span><span class=cF6>"Unnecessary parenthesis "</span><span class=cF0>);
|
||
|
<a name="l115"></a>}
|
||
|
<a name="l116"></a>
|
||
|
<a name="l117"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICClassPut</span><span class=cF0>(</span><span class=cF9>CHashClass</span><span class=cF0> *c)
|
||
|
<a name="l118"></a>{
|
||
|
<a name="l119"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
||
|
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (!c) </span><span class=cF1>return</span><span class=cF0>;
|
||
|
<a name="l121"></a> </span><span class=cF1>if</span><span class=cF0> (c->ptr_stars_cnt>4) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l122"></a> </span><span class=cF5>PrintErr</span><span class=cF0>(</span><span class=cF6>"put_class ptrcnt=%d\n"</span><span class=cF0>,c->ptr_stars_cnt);
|
||
|
<a name="l123"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
||
|
<a name="l124"></a></span><span class=cF2>//TODO:</span><span class=cF0>
|
||
|
<a name="l125"></a> </span><span class=cF5>Yield</span><span class=cF0>;
|
||
|
<a name="l126"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l127"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i<c->ptr_stars_cnt;i++)
|
||
|
<a name="l128"></a> </span><span class=cF6>'*'</span><span class=cF0>;
|
||
|
<a name="l129"></a> c-=c->ptr_stars_cnt;
|
||
|
<a name="l130"></a> </span><span class=cF1>if</span><span class=cF0> (c->str)
|
||
|
<a name="l131"></a> </span><span class=cF6>"%s"</span><span class=cF0>,c->str;
|
||
|
<a name="l132"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l133"></a> </span><span class=cF5>PrintErr</span><span class=cF0>(</span><span class=cF6>"put_class str=NULL\n"</span><span class=cF0>);
|
||
|
<a name="l134"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
||
|
<a name="l135"></a></span><span class=cF2>//TODO:</span><span class=cF0>
|
||
|
<a name="l136"></a> </span><span class=cF5>Yield</span><span class=cF0>;
|
||
|
<a name="l137"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l138"></a> </span><span class=cF6>''</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
||
|
<a name="l139"></a>}
|
||
|
<a name="l140"></a>
|
||
|
<a name="l141"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICArgPut</span><span class=cF0>(</span><span class=cF9>CICArg</span><span class=cF0> *a,</span><span class=cF9>I64</span><span class=cF0> type_pointed_to)
|
||
|
<a name="l142"></a>{
|
||
|
<a name="l143"></a> </span><span class=cF1>if</span><span class=cF0> (type_pointed_to)
|
||
|
<a name="l144"></a> </span><span class=cF6>"[%Z](%Z) %Z "</span><span class=cF0>,a->type.raw_type,</span><span class=cF6>"ST_RAW_TYPES"</span><span class=cF0>,
|
||
|
<a name="l145"></a> type_pointed_to,</span><span class=cF6>"ST_RAW_TYPES"</span><span class=cF0>,</span><span class=cF5>Bsr</span><span class=cF0>(a->type>>8)+1,</span><span class=cF6>"ST_TY_TYPES"</span><span class=cF0>;
|
||
|
<a name="l146"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l147"></a> </span><span class=cF6>"%Z %Z "</span><span class=cF0>,a->type.raw_type,</span><span class=cF6>"ST_RAW_TYPES"</span><span class=cF0>,
|
||
|
<a name="l148"></a> </span><span class=cF5>Bsr</span><span class=cF0>(a->type>>8)+1,</span><span class=cF6>"ST_TY_TYPES"</span><span class=cF0>;
|
||
|
<a name="l149"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>Bsr</span><span class=cF7>(</span><span class=cF0>a->type</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l150"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_STK</span><span class=cF0>:
|
||
|
<a name="l151"></a> </span><span class=cF6>"STK"</span><span class=cF0>;
|
||
|
<a name="l152"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l153"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_IMM</span><span class=cF0>:
|
||
|
<a name="l154"></a> </span><span class=cF6>"#%X"</span><span class=cF0>,a->disp;
|
||
|
<a name="l155"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l156"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_REG</span><span class=cF0>:
|
||
|
<a name="l157"></a> </span><span class=cF6>"%Z"</span><span class=cF0>,a-></span><span class=cF1>reg</span><span class=cF0>,</span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>;
|
||
|
<a name="l158"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l159"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_DISP</span><span class=cF0>:
|
||
|
<a name="l160"></a> </span><span class=cF6>"%X[%Z]"</span><span class=cF0>,a->disp,a-></span><span class=cF1>reg</span><span class=cF0>,</span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>;
|
||
|
<a name="l161"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l162"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_RIP_DISP32</span><span class=cF0>:
|
||
|
<a name="l163"></a> </span><span class=cF6>"[%X]"</span><span class=cF0>,a->disp;
|
||
|
<a name="l164"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l165"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MDf_SIB</span><span class=cF0>:
|
||
|
<a name="l166"></a> </span><span class=cF1>if</span><span class=cF0> (a->disp)
|
||
|
<a name="l167"></a> </span><span class=cF6>"%X"</span><span class=cF0>,a->disp;
|
||
|
<a name="l168"></a> </span><span class=cF1>if</span><span class=cF0> (a-></span><span class=cF1>reg</span><span class=cF0>==</span><span class=cF3>REG_RIP</span><span class=cF0>)
|
||
|
<a name="l169"></a> </span><span class=cF6>'['</span><span class=cF0>;
|
||
|
<a name="l170"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l171"></a> </span><span class=cF6>"[%Z+"</span><span class=cF0>,a-></span><span class=cF1>reg</span><span class=cF0>&15,</span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>;
|
||
|
<a name="l172"></a> </span><span class=cF6>"%Z"</span><span class=cF0>,a-></span><span class=cF1>reg</span><span class=cF0>>>8&15,</span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>;
|
||
|
<a name="l173"></a> </span><span class=cF1>switch</span><span class=cF0> (a-></span><span class=cF1>reg</span><span class=cF0>>>14) {
|
||
|
<a name="l174"></a> </span><span class=cF1>case</span><span class=cF0> 0: </span><span class=cF6>"]"</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l175"></a> </span><span class=cF1>case</span><span class=cF0> 1: </span><span class=cF6>"*2]"</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l176"></a> </span><span class=cF1>case</span><span class=cF0> 2: </span><span class=cF6>"*4]"</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l177"></a> </span><span class=cF1>case</span><span class=cF0> 3: </span><span class=cF6>"*8]"</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l178"></a> }
|
||
|
<a name="l179"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l180"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l181"></a> </span><span class=cF6>''</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
||
|
<a name="l182"></a>}
|
||
|
<a name="l183"></a>
|
||
|
<a name="l184"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICPut</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi)
|
||
|
<a name="l185"></a>{
|
||
|
<a name="l186"></a> </span><span class=cF9>I64</span><span class=cF0> opcode=tmpi->ic_code,i;
|
||
|
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (opcode>=</span><span class=cF3>IC_END_EXP</span><span class=cF0> && opcode!=</span><span class=cF3>IC_NOP2</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l188"></a> </span><span class=cF6>"%15ts %016X "</span><span class=cF0>,</span><span class=cFD>intermediate_code_table</span><span class=cF0>[opcode].name,tmpi->ic_data;
|
||
|
<a name="l189"></a> </span><span class=cF1>if</span><span class=cF0> (cc->pass) {
|
||
|
<a name="l190"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->res.type.mode) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l191"></a> </span><span class=cF6>"$PURPLE$RES:$FG$"</span><span class=cF0>;
|
||
|
<a name="l192"></a> </span><span class=cFD>ICArgPut</span><span class=cF0>(&tmpi->res,0);
|
||
|
<a name="l193"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l194"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1.type.mode) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l195"></a> </span><span class=cF6>"$PURPLE$ARG1:$FG$"</span><span class=cF0>;
|
||
|
<a name="l196"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFD>intermediate_code_table</span><span class=cF0>[tmpi->ic_code].type==</span><span class=cF3>IST_DEREF</span><span class=cF0> ||
|
||
|
<a name="l197"></a> </span><span class=cFD>intermediate_code_table</span><span class=cF0>[tmpi->ic_code].type==</span><span class=cF3>IST_ASSIGN</span><span class=cF0>)
|
||
|
<a name="l198"></a> </span><span class=cFD>ICArgPut</span><span class=cF0>(&tmpi->arg1,tmpi->arg1_type_pointed_to);
|
||
|
<a name="l199"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l200"></a> </span><span class=cFD>ICArgPut</span><span class=cF0>(&tmpi->arg1,0);
|
||
|
<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> (tmpi->arg2.type.mode) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l203"></a> </span><span class=cF6>"$PURPLE$ARG2:$FG$"</span><span class=cF0>;
|
||
|
<a name="l204"></a> </span><span class=cFD>ICArgPut</span><span class=cF0>(&tmpi->arg2,0);
|
||
|
<a name="l205"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l206"></a> </span><span class=cF6>"$PURPLE$:$FG$"</span><span class=cF0>;
|
||
|
<a name="l207"></a> }
|
||
|
<a name="l208"></a> </span><span class=cFD>ICClassPut</span><span class=cF0>(tmpi->ic_class);
|
||
|
<a name="l209"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_LOCK</span><span class=cF0>)
|
||
|
<a name="l210"></a> </span><span class=cF6>"$BROWN$lock$FG$ "</span><span class=cF0>;
|
||
|
<a name="l211"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_ARG2_TO_F64</span><span class=cF0>)
|
||
|
<a name="l212"></a> </span><span class=cF6>"$LTBLUE$a2d$FG$ "</span><span class=cF0>;
|
||
|
<a name="l213"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_ARG2_TO_INT</span><span class=cF0>)
|
||
|
<a name="l214"></a> </span><span class=cF6>"$GREEN$a2i$FG$ "</span><span class=cF0>;
|
||
|
<a name="l215"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_ARG1_TO_F64</span><span class=cF0>)
|
||
|
<a name="l216"></a> </span><span class=cF6>"$LTBLUE$a1d$FG$ "</span><span class=cF0>;
|
||
|
<a name="l217"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_ARG1_TO_INT</span><span class=cF0>)
|
||
|
<a name="l218"></a> </span><span class=cF6>"$GREEN$a1i$FG$ "</span><span class=cF0>;
|
||
|
<a name="l219"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_RES_TO_F64</span><span class=cF0>)
|
||
|
<a name="l220"></a> </span><span class=cF6>"$LTBLUE$rd$FG$ "</span><span class=cF0>;
|
||
|
<a name="l221"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_RES_TO_INT</span><span class=cF0>)
|
||
|
<a name="l222"></a> </span><span class=cF6>"$GREEN$ri$FG$ "</span><span class=cF0>;
|
||
|
<a name="l223"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_USE_F64</span><span class=cF0>)
|
||
|
<a name="l224"></a> </span><span class=cF6>"[F64] "</span><span class=cF0>;
|
||
|
<a name="l225"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_USE_UNSIGNED</span><span class=cF0>)
|
||
|
<a name="l226"></a> </span><span class=cF6>"[unsigned] "</span><span class=cF0>;
|
||
|
<a name="l227"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_USE_INT</span><span class=cF0>)
|
||
|
<a name="l228"></a> </span><span class=cF6>"[int] "</span><span class=cF0>;
|
||
|
<a name="l229"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_RES_NOT_USED</span><span class=cF0>)
|
||
|
<a name="l230"></a> </span><span class=cF6>"NO_RES "</span><span class=cF0>;
|
||
|
<a name="l231"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_BY_VAL</span><span class=cF0>)
|
||
|
<a name="l232"></a> </span><span class=cF6>"BY_VAL "</span><span class=cF0>;
|
||
|
<a name="l233"></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="l234"></a> </span><span class=cF6>"PUSH "</span><span class=cF0>;
|
||
|
<a name="l235"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_PUSH_CMP</span><span class=cF0>)
|
||
|
<a name="l236"></a> </span><span class=cF6>"PUSH_CMP "</span><span class=cF0>;
|
||
|
<a name="l237"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_POP_CMP</span><span class=cF0>)
|
||
|
<a name="l238"></a> </span><span class=cF6>"POP_CMP "</span><span class=cF0>;
|
||
|
<a name="l239"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_DEL_PREV_INS</span><span class=cF0>)
|
||
|
<a name="l240"></a> </span><span class=cF6>"DEL_PREV "</span><span class=cF0>;
|
||
|
<a name="l241"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_PREV_DELETED</span><span class=cF0>)
|
||
|
<a name="l242"></a> </span><span class=cF6>"PREV_DEL "</span><span class=cF0>;
|
||
|
<a name="l243"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i<3;i++) {
|
||
|
<a name="l244"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&tmpi->ic_flags,</span><span class=cF3>ICf_DONT_PUSH_FLOAT0</span><span class=cF0>+i</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l245"></a> </span><span class=cF6>"DONT_PUSH#%d "</span><span class=cF0>,i;
|
||
|
<a name="l246"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&tmpi->ic_flags,</span><span class=cF3>ICf_DONT_POP_FLOAT0</span><span class=cF0>+i</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l247"></a> </span><span class=cF6>"DONT_POP#%d "</span><span class=cF0>,i;
|
||
|
<a name="l248"></a> }
|
||
|
<a name="l249"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_flags & </span><span class=cF3>ICF_ALT_TEMPLATE</span><span class=cF0>)
|
||
|
<a name="l250"></a> </span><span class=cF6>"ALT_TMP "</span><span class=cF0>;
|
||
|
<a name="l251"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
||
|
<a name="l252"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l253"></a>}
|
||
|
</span></pre></body>
|
||
|
</html>
|