mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
790 lines
92 KiB
HTML
Executable file
790 lines
92 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=cF0>#</span><span class=cF1>define</span><span class=cF0> CN_A2 </span><span class=cFE>0</span><span class=cF0>
|
|
<a name="l2"></a>#</span><span class=cF1>define</span><span class=cF0> CN_A1 </span><span class=cFE>1</span><span class=cF0>
|
|
<a name="l3"></a>#</span><span class=cF1>define</span><span class=cF0> CN_INST </span><span class=cFE>2</span><span class=cF0>
|
|
<a name="l4"></a>#</span><span class=cF1>define</span><span class=cF0> CN_RES </span><span class=cFE>3</span><span class=cF0>
|
|
<a name="l5"></a>
|
|
<a name="l6"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF1>Bool</span><span class=cF0> dont_pushable, </span><span class=cF1>Bool</span><span class=cF0> dont_popable, </span><span class=cF9>I64</span><span class=cF0> pos)
|
|
<a name="l7"></a>{
|
|
<a name="l8"></a> </span><span class=cF1>Bool</span><span class=cF0> link = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l9"></a>
|
|
<a name="l10"></a> </span><span class=cF1>if</span><span class=cF0> (cc->pass == </span><span class=cFE>7</span><span class=cF0> && cc->last_float_op_ic && cc->last_dont_popable && dont_pushable)
|
|
<a name="l11"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l12"></a> </span><span class=cF1>switch</span><span class=cF0> [pos]
|
|
<a name="l13"></a> {
|
|
<a name="l14"></a> </span><span class=cF1>case</span><span class=cF0> CN_A2:
|
|
<a name="l15"></a> </span><span class=cF1>if</span><span class=cF0> (cc->last_float_op_ic != tmpi && cc->dont_push_float)
|
|
<a name="l16"></a> link = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l17"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l18"></a>
|
|
<a name="l19"></a> </span><span class=cF1>case</span><span class=cF0> CN_A1:
|
|
<a name="l20"></a> </span><span class=cF1>if</span><span class=cF0> (cc->last_float_op_ic != tmpi && cc->dont_push_float)
|
|
<a name="l21"></a> link = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l22"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l23"></a>
|
|
<a name="l24"></a> </span><span class=cF1>case</span><span class=cF0> CN_INST:
|
|
<a name="l25"></a> </span><span class=cF1>if</span><span class=cF0> (cc->last_float_op_ic != tmpi)
|
|
<a name="l26"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l27"></a> </span><span class=cF1>if</span><span class=cF0> (cc->dont_push_float)
|
|
<a name="l28"></a> {
|
|
<a name="l29"></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="l30"></a> cc->last_float_op_ic->res.</span><span class=cF1>reg</span><span class=cF0> != </span><span class=cF3>REG_R8</span><span class=cF0>)
|
|
<a name="l31"></a> tmpi->ic_flags |= </span><span class=cF3>ICF_ALT_TEMPLATE</span><span class=cF0>;
|
|
<a name="l32"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l33"></a> tmpi->ic_flags &= ~</span><span class=cF3>ICF_ALT_TEMPLATE</span><span class=cF0>;
|
|
<a name="l34"></a> link = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l35"></a> }
|
|
<a name="l36"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l37"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l38"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l39"></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> && cc->last_float_op_pos != CN_A1)
|
|
<a name="l40"></a> tmpi->ic_flags |= </span><span class=cF3>ICF_ALT_TEMPLATE</span><span class=cF0>;
|
|
<a name="l41"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l42"></a> tmpi->ic_flags &= ~</span><span class=cF3>ICF_ALT_TEMPLATE</span><span class=cF0>;
|
|
<a name="l43"></a> link = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l44"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l45"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l46"></a>
|
|
<a name="l47"></a> </span><span class=cF1>case</span><span class=cF0> CN_RES:
|
|
<a name="l48"></a> </span><span class=cF1>if</span><span class=cF0> (cc->last_float_op_ic == tmpi && cc->last_float_op_pos == CN_INST)
|
|
<a name="l49"></a> link = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l50"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l51"></a> }
|
|
<a name="l52"></a> </span><span class=cF1>if</span><span class=cF0> (link)
|
|
<a name="l53"></a> {
|
|
<a name="l54"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bts</span><span class=cF7>(</span><span class=cF0>&cc->last_float_op_ic->ic_flags, </span><span class=cF3>ICf_DONT_POP_FLOAT0</span><span class=cF0> + cc->last_ic_float_op_num</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l55"></a> cc->last_float_op_ic->ic_flags &= ~</span><span class=cF3>ICF_CODE_FINAL</span><span class=cF0>;
|
|
<a name="l56"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bts</span><span class=cF7>(</span><span class=cF0>&tmpi->ic_flags, </span><span class=cF3>ICf_DONT_PUSH_FLOAT0</span><span class=cF0> + cc->cur_ic_float_op_num</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l57"></a> tmpi->ic_flags &= ~</span><span class=cF3>ICF_CODE_FINAL</span><span class=cF0>;
|
|
<a name="l58"></a> }
|
|
<a name="l59"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l60"></a> cc->last_float_op_ic = tmpi;
|
|
<a name="l61"></a> cc->last_dont_pushable = dont_pushable;
|
|
<a name="l62"></a> cc->last_dont_popable = dont_popable;
|
|
<a name="l63"></a> cc->last_ic_float_op_num = cc->cur_ic_float_op_num++;
|
|
<a name="l64"></a> cc->last_float_op_pos = pos;
|
|
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (cc->cur_ic_float_op_num > </span><span class=cFE>4</span><span class=cF0>)
|
|
<a name="l66"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l67"></a>}
|
|
<a name="l68"></a>
|
|
<a name="l69"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF1>Bool</span><span class=cF0> *dont_push_float, </span><span class=cF1>Bool</span><span class=cF0> *dont_pop_float)
|
|
<a name="l70"></a>{
|
|
<a name="l71"></a> </span><span class=cF1>if</span><span class=cF0> (cc->pass == </span><span class=cFE>7</span><span class=cF0>)
|
|
<a name="l72"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l73"></a> *dont_push_float = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l74"></a> *dont_pop_float = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l75"></a> tmpi->ic_flags &= ~</span><span class=cF3>ICF_CODE_FINAL</span><span class=cF0>;
|
|
<a name="l76"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l77"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l78"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l79"></a> *dont_push_float = </span><span class=cF5>Bt</span><span class=cF0>(&tmpi->ic_flags, </span><span class=cF3>ICf_DONT_PUSH_FLOAT0</span><span class=cF0> + cc->cur_ic_float_op_num);
|
|
<a name="l80"></a> *dont_pop_float = </span><span class=cF5>Bt</span><span class=cF0>(&tmpi->ic_flags, </span><span class=cF3>ICf_DONT_POP_FLOAT0</span><span class=cF0> + cc->cur_ic_float_op_num);
|
|
<a name="l81"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l82"></a>}
|
|
<a name="l83"></a>
|
|
<a name="l84"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICCopyTemplate</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> op,
|
|
<a name="l85"></a> </span><span class=cF1>Bool</span><span class=cF0> off_the_record, </span><span class=cF1>Bool</span><span class=cF0> dont_pushable, </span><span class=cF1>Bool</span><span class=cF0> dont_popable, </span><span class=cF9>I64</span><span class=cF0> pos)
|
|
<a name="l86"></a>{
|
|
<a name="l87"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float, alt;
|
|
<a name="l88"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr;
|
|
<a name="l89"></a> </span><span class=cF9>I64</span><span class=cF0> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l90"></a>
|
|
<a name="l91"></a> </span><span class=cF1>if</span><span class=cF0> (!off_the_record)
|
|
<a name="l92"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l93"></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="l94"></a> alt = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l95"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l96"></a> alt = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l97"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l98"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l99"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l100"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l101"></a> dont_push_float = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l102"></a> dont_pop_float = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l103"></a> alt = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l104"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (alt && dont_push_float && !dont_pop_float)
|
|
<a name="l106"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l107"></a> ptr = </span><span class=cFD>comp_templates_dont_push2</span><span class=cF0>[op];
|
|
<a name="l108"></a> i = </span><span class=cFD>comp_templates_dont_push2</span><span class=cF0>[op + </span><span class=cFE>1</span><span class=cF0>] - ptr;
|
|
<a name="l109"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l110"></a> </span><span class=cF1>if</span><span class=cF0> (!i)
|
|
<a name="l111"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l112"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l113"></a> {
|
|
<a name="l114"></a> </span><span class=cF1>if</span><span class=cF0> (dont_pop_float)
|
|
<a name="l115"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l116"></a> ptr = </span><span class=cFD>comp_templates_dont_push_pop</span><span class=cF0>[op];
|
|
<a name="l117"></a> i = </span><span class=cFD>comp_templates_dont_push_pop</span><span class=cF0>[op + </span><span class=cFE>1</span><span class=cF0>] - ptr;
|
|
<a name="l118"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l119"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l120"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l121"></a> ptr = </span><span class=cFD>comp_templates_dont_push</span><span class=cF0>[op];
|
|
<a name="l122"></a> i = </span><span class=cFD>comp_templates_dont_push</span><span class=cF0>[op + </span><span class=cFE>1</span><span class=cF0>] - ptr;
|
|
<a name="l123"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l124"></a> }
|
|
<a name="l125"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l126"></a> {
|
|
<a name="l127"></a> </span><span class=cF1>if</span><span class=cF0> (dont_pop_float)
|
|
<a name="l128"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l129"></a> ptr = </span><span class=cFD>comp_templates_dont_pop</span><span class=cF0>[op];
|
|
<a name="l130"></a> i = </span><span class=cFD>comp_templates_dont_pop</span><span class=cF0>[op + </span><span class=cFE>1</span><span class=cF0>] - ptr;
|
|
<a name="l131"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l132"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l133"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l134"></a> ptr = </span><span class=cFD>comp_templates</span><span class=cF0>[op];
|
|
<a name="l135"></a> i = </span><span class=cFD>comp_templates</span><span class=cF0>[op + </span><span class=cFE>1</span><span class=cF0>] - ptr;
|
|
<a name="l136"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l137"></a> }
|
|
<a name="l138"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l139"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpi->ic_body[tmpi->ic_count], ptr, i);
|
|
<a name="l140"></a> </span><span class=cF1>if</span><span class=cF0> (!off_the_record)
|
|
<a name="l141"></a> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(cc, tmpi, dont_pushable, dont_popable, pos);
|
|
<a name="l142"></a> tmpi->ic_count += i;
|
|
<a name="l143"></a>}
|
|
<a name="l144"></a>
|
|
<a name="l145"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFConvert</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> r1, </span><span class=cF9>CICType</span><span class=cF0> t2, </span><span class=cF9>I64</span><span class=cF0> r2, </span><span class=cF9>I64</span><span class=cF0> d2, </span><span class=cF1>Bool</span><span class=cF0> to_int, </span><span class=cF9>I64</span><span class=cF0> pos, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l146"></a>{
|
|
<a name="l147"></a> </span><span class=cF9>I64</span><span class=cF0> rsp_size = </span><span class=cFE>0</span><span class=cF0>, op1, op2;
|
|
<a name="l148"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float;
|
|
<a name="l149"></a>
|
|
<a name="l150"></a> </span><span class=cF1>if</span><span class=cF0> (to_int)
|
|
<a name="l151"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l152"></a> op1 = SLASH_OP_FLD;
|
|
<a name="l153"></a> op2 = SLASH_OP_FISTTP;
|
|
<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> op1 = SLASH_OP_FILD;
|
|
<a name="l158"></a> op2 = SLASH_OP_FSTP;
|
|
<a name="l159"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l160"></a>
|
|
<a name="l161"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l162"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_push_float)
|
|
<a name="l163"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l164"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>t2.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && t2 & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l165"></a> {
|
|
<a name="l166"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, t2, r2, d2, rip);
|
|
<a name="l167"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l168"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l169"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l170"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l171"></a> }
|
|
<a name="l172"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l173"></a> {
|
|
<a name="l174"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_pop_float)
|
|
<a name="l175"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l176"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l177"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, -</span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l178"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l179"></a> }
|
|
<a name="l180"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, t2, r2, d2, op1, rip);
|
|
<a name="l181"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l182"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l183"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l184"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_pop_float)
|
|
<a name="l185"></a> {
|
|
<a name="l186"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l187"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, -</span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l188"></a> }
|
|
<a name="l189"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l190"></a> </span><span class=cF1>if</span><span class=cF0> (to_int)
|
|
<a name="l191"></a> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(cc, tmpi, </span><span class=cF3>TRUE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, pos);
|
|
<a name="l192"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l193"></a> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(cc, tmpi, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, pos);
|
|
<a name="l194"></a> </span><span class=cF1>if</span><span class=cF0> (dont_pop_float)
|
|
<a name="l195"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l196"></a> </span><span class=cF1>if</span><span class=cF0> (rsp_size)
|
|
<a name="l197"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, rsp_size);
|
|
<a name="l198"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l199"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l200"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l201"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, op2, rip);
|
|
<a name="l202"></a> </span><span class=cFD>ICPop</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, r1, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l203"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l204"></a>}
|
|
<a name="l205"></a>
|
|
<a name="l206"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFConvert2</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> r1, </span><span class=cF9>CICType</span><span class=cF0> t2, </span><span class=cF9>I64</span><span class=cF0> r2, </span><span class=cF9>I64</span><span class=cF0> d2, </span><span class=cF1>Bool</span><span class=cF0> to_int, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l207"></a>{
|
|
<a name="l208"></a> </span><span class=cF9>I64</span><span class=cF0> rsp_size = </span><span class=cFE>0</span><span class=cF0>, op1, op2;
|
|
<a name="l209"></a>
|
|
<a name="l210"></a> </span><span class=cF1>if</span><span class=cF0> (to_int)
|
|
<a name="l211"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l212"></a> op1 = SLASH_OP_FLD;
|
|
<a name="l213"></a> op2 = SLASH_OP_FISTTP;
|
|
<a name="l214"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l215"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l216"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l217"></a> op1 = SLASH_OP_FILD;
|
|
<a name="l218"></a> op2 = SLASH_OP_FSTP;
|
|
<a name="l219"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l220"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>t2.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && t2 & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l221"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l222"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, t2, r2, d2, rip);
|
|
<a name="l223"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l224"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l225"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l226"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l227"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l228"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l229"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l230"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l231"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, -</span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l232"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l233"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, t2, r2, d2, op1, rip);
|
|
<a name="l234"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, op2, rip);
|
|
<a name="l235"></a> </span><span class=cFD>ICPop</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, r1, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l236"></a> cc->last_dont_pushable = cc->last_dont_popable = </span><span class=cF3>FALSE</span><span class=cF0>; </span><span class=cF2>//TODO: improve this</span><span class=cF0>
|
|
<a name="l237"></a>}
|
|
<a name="l238"></a>
|
|
<a name="l239"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFUnaryMinus</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF1>U8</span><span class=cF0> *buf2, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l240"></a>{
|
|
<a name="l241"></a> </span><span class=cF9>CICArg</span><span class=cF0> *arg1 = &tmpi->arg1;
|
|
<a name="l242"></a> </span><span class=cF9>I64</span><span class=cF0> rsp_size = </span><span class=cFE>0</span><span class=cF0>, builtin1 = </span><span class=cFE>0</span><span class=cF0>, t1, r1, d1;
|
|
<a name="l243"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float;
|
|
<a name="l244"></a>
|
|
<a name="l245"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l246"></a> buf2 = cc->aotc->rip;
|
|
<a name="l247"></a>
|
|
<a name="l248"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l249"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_push_float)
|
|
<a name="l250"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l251"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg1->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l252"></a> {
|
|
<a name="l253"></a> t1 = arg1->type;
|
|
<a name="l254"></a> r1 = arg1-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l255"></a> d1 = arg1->disp;
|
|
<a name="l256"></a> }
|
|
<a name="l257"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l258"></a> {
|
|
<a name="l259"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l260"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l261"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin1 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l262"></a> {
|
|
<a name="l263"></a> t1 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l264"></a> r1 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l265"></a> d1 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l266"></a> }
|
|
<a name="l267"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l268"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l269"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l270"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, arg1->type, arg1-></span><span class=cF1>reg</span><span class=cF0>, arg1->disp, rip);
|
|
<a name="l271"></a> t1 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l272"></a> r1 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l273"></a> d1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l274"></a> rsp_size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l275"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l276"></a> }
|
|
<a name="l277"></a> </span><span class=cF1>if</span><span class=cF0> (builtin1)
|
|
<a name="l278"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, builtin1);
|
|
<a name="l279"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l280"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, t1, r1, d1, SLASH_OP_FLD, rip);
|
|
<a name="l281"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l282"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_pop_float && !rsp_size)
|
|
<a name="l283"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l284"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l285"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, -</span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l286"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l287"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0xE0D9</span><span class=cF0>); </span><span class=cF2>//FCHS</span><span class=cF0>
|
|
<a name="l288"></a> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(cc, tmpi, </span><span class=cF3>TRUE</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, CN_INST);
|
|
<a name="l289"></a> </span><span class=cF1>if</span><span class=cF0> (dont_pop_float)
|
|
<a name="l290"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l291"></a> </span><span class=cF1>if</span><span class=cF0> (rsp_size)
|
|
<a name="l292"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, rsp_size);
|
|
<a name="l293"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l294"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l295"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l296"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, SLASH_OP_FSTP, rip);
|
|
<a name="l297"></a> </span><span class=cFD>ICPop</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, rip);
|
|
<a name="l298"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l299"></a>}
|
|
<a name="l300"></a>
|
|
<a name="l301"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFMod</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l302"></a>{</span><span class=cF2>//for MOD</span><span class=cF0>
|
|
<a name="l303"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float;
|
|
<a name="l304"></a>
|
|
<a name="l305"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l306"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l307"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l308"></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="l309"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l310"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l311"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l312"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l313"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l314"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l315"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l316"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l317"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l318"></a></span><span class=cF2>//TODO: unpushable,unpop? Not sure</span><span class=cF0>
|
|
<a name="l319"></a> </span><span class=cFD>ICCopyTemplate</span><span class=cF0>(cc, tmpi, </span><span class=cF3>CMP_TEMPLATE_MOD</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, CN_INST);
|
|
<a name="l320"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_pop_float)
|
|
<a name="l321"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l322"></a>}
|
|
<a name="l323"></a>
|
|
<a name="l324"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFPow</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF1>U8</span><span class=cF0> *buf, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l325"></a>{</span><span class=cF2>//for POW</span><span class=cF0>
|
|
<a name="l326"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l327"></a> </span><span class=cF9>CAOTImportExport</span><span class=cF0> *tmpie;
|
|
<a name="l328"></a> </span><span class=cF9>CHashExport</span><span class=cF0> *tmpex = </span><span class=cF5>HashFind</span><span class=cF0>(</span><span class=cF6>"SYS_POW"</span><span class=cF0>, cc->htc.hash_table_list, </span><span class=cF3>HTT_EXPORT_SYS_SYM</span><span class=cF0>);
|
|
<a name="l329"></a>
|
|
<a name="l330"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l331"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l332"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l333"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l334"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpex)
|
|
<a name="l335"></a> {
|
|
<a name="l336"></a> tmpex = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CHashExport</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l337"></a> tmpex->str = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>"SYS_POW"</span><span class=cF0>);
|
|
<a name="l338"></a> tmpex->type = </span><span class=cF3>HTT_EXPORT_SYS_SYM</span><span class=cF0> | </span><span class=cF3>HTF_UNRESOLVED</span><span class=cF0> | </span><span class=cF3>HTF_IMPORT</span><span class=cF0>;
|
|
<a name="l339"></a> </span><span class=cF5>HashAdd</span><span class=cF0>(tmpex, cc->htc.global_hash_table);
|
|
<a name="l340"></a> }
|
|
<a name="l341"></a> </span><span class=cF1>if</span><span class=cF0> (tmpex->type & </span><span class=cF3>HTF_IMPORT</span><span class=cF0>)
|
|
<a name="l342"></a> {
|
|
<a name="l343"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>OptionGet</span><span class=cF7>(</span><span class=cF3>OPTf_USE_IMM64</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l344"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l345"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0xBB48</span><span class=cF0>);
|
|
<a name="l346"></a> </span><span class=cFD>ICU64</span><span class=cF0>(tmpi, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l347"></a> </span><span class=cF1>if</span><span class=cF0> (buf)
|
|
<a name="l348"></a> {
|
|
<a name="l349"></a> tmpie = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CAOTImportExport</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l350"></a> tmpie->type = </span><span class=cF3>IET_IMM_I64</span><span class=cF0>;
|
|
<a name="l351"></a> tmpie->rip = rip + tmpi->ic_count - </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l352"></a> tmpie->next = tmpex->ie_list;
|
|
<a name="l353"></a> tmpex->ie_list = tmpie;
|
|
<a name="l354"></a> }
|
|
<a name="l355"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0xD3FF</span><span class=cF0>);
|
|
<a name="l356"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l357"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l358"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l359"></a> </span><span class=cFD>ICU8</span><span class=cF0>(tmpi, </span><span class=cFE>0xE8</span><span class=cF0>);
|
|
<a name="l360"></a> </span><span class=cFD>ICU32</span><span class=cF0>(tmpi, -</span><span class=cF7>(</span><span class=cF0>rip + tmpi->ic_count + </span><span class=cFE>4</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l361"></a> </span><span class=cF1>if</span><span class=cF0> (buf)
|
|
<a name="l362"></a> {
|
|
<a name="l363"></a> tmpie = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CAOTImportExport</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l364"></a> tmpie->type = </span><span class=cF3>IET_REL_I32</span><span class=cF0>;
|
|
<a name="l365"></a> tmpie->rip = rip + tmpi->ic_count - </span><span class=cFE>4</span><span class=cF0>;
|
|
<a name="l366"></a> tmpie->next = tmpex->ie_list;
|
|
<a name="l367"></a> tmpex->ie_list = tmpie;
|
|
<a name="l368"></a> }
|
|
<a name="l369"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l370"></a> }
|
|
<a name="l371"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l372"></a> {</span><span class=cF2>//Kernel</span><span class=cF0>
|
|
<a name="l373"></a> </span><span class=cF1>if</span><span class=cF0> (tmpex->type & </span><span class=cF3>HTF_UNRESOLVED</span><span class=cF0>)
|
|
<a name="l374"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l375"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l376"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l377"></a> i = tmpex->val - (rip + tmpi->ic_count + </span><span class=cFE>5</span><span class=cF0>);
|
|
<a name="l378"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF3>I32_MIN</span><span class=cF0> <= i <= </span><span class=cF3>I32_MAX</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l379"></a> {
|
|
<a name="l380"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l381"></a> </span><span class=cF2>// ICU16(tmpi, 0xBB48);</span><span class=cF0>
|
|
<a name="l382"></a> </span><span class=cF2>// ICU64(tmpi, tmpex->val);</span><span class=cF0>
|
|
<a name="l383"></a> </span><span class=cF2>// ICU16(tmpi, 0xD3FF);</span><span class=cF0>
|
|
<a name="l384"></a> }
|
|
<a name="l385"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l386"></a> {
|
|
<a name="l387"></a> </span><span class=cFD>ICU8</span><span class=cF0>(tmpi, </span><span class=cFE>0xE8</span><span class=cF0>);
|
|
<a name="l388"></a> </span><span class=cFD>ICU32</span><span class=cF0>(tmpi, i);
|
|
<a name="l389"></a> }
|
|
<a name="l390"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l391"></a> }
|
|
<a name="l392"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l393"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l394"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l395"></a> i = tmpex->val - (rip + tmpi->ic_count + </span><span class=cFE>5</span><span class=cF0>);
|
|
<a name="l396"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF3>I32_MIN</span><span class=cF0> <= i <= </span><span class=cF3>I32_MAX</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l397"></a> {
|
|
<a name="l398"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0xBB48</span><span class=cF0>);
|
|
<a name="l399"></a> </span><span class=cFD>ICU64</span><span class=cF0>(tmpi, tmpex->val);
|
|
<a name="l400"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0xD3FF</span><span class=cF0>);
|
|
<a name="l401"></a> }
|
|
<a name="l402"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l403"></a> {
|
|
<a name="l404"></a> </span><span class=cFD>ICU8</span><span class=cF0>(tmpi, </span><span class=cFE>0xE8</span><span class=cF0>);
|
|
<a name="l405"></a> </span><span class=cFD>ICU32</span><span class=cF0>(tmpi, i);
|
|
<a name="l406"></a> }
|
|
<a name="l407"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l408"></a> tmpi->ic_flags &= ~</span><span class=cF3>ICF_CODE_FINAL</span><span class=cF0>;
|
|
<a name="l409"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l410"></a>}
|
|
<a name="l411"></a>
|
|
<a name="l412"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFOp</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> op, </span><span class=cF1>U8</span><span class=cF0> *buf2, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l413"></a>{</span><span class=cF2>//for ADD,SUB,DIV,MUL</span><span class=cF0>
|
|
<a name="l414"></a> </span><span class=cF9>CICArg</span><span class=cF0> *arg1, *arg2;
|
|
<a name="l415"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float, alt;
|
|
<a name="l416"></a> </span><span class=cF9>I64</span><span class=cF0> rsp_size = </span><span class=cFE>0</span><span class=cF0>, builtin1 = </span><span class=cFE>0</span><span class=cF0>, builtin2 = </span><span class=cFE>0</span><span class=cF0>, t1, r1, d1, t2, r2, d2;
|
|
<a name="l417"></a>
|
|
<a name="l418"></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="l419"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l420"></a> arg1 = &tmpi->arg2;
|
|
<a name="l421"></a> arg2 = &tmpi->arg1;
|
|
<a name="l422"></a> alt = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l423"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l424"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l425"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l426"></a> arg1 = &tmpi->arg1;
|
|
<a name="l427"></a> arg2 = &tmpi->arg2;
|
|
<a name="l428"></a> alt = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l429"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l430"></a>
|
|
<a name="l431"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l432"></a> buf2 = cc->aotc->rip;
|
|
<a name="l433"></a>
|
|
<a name="l434"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l435"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l436"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l437"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg2->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l438"></a> {
|
|
<a name="l439"></a> t2 = arg2->type;
|
|
<a name="l440"></a> r2 = arg2-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l441"></a> d2 = arg2->disp;
|
|
<a name="l442"></a> }
|
|
<a name="l443"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l444"></a> {
|
|
<a name="l445"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l446"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l447"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin2 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l448"></a> {
|
|
<a name="l449"></a> t2 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l450"></a> r2 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l451"></a> d2 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l452"></a> }
|
|
<a name="l453"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l454"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l455"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l456"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi,arg2->type, arg2-></span><span class=cF1>reg</span><span class=cF0>, arg2->disp, rip);
|
|
<a name="l457"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l458"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l459"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l460"></a> rsp_size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l461"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l462"></a> }
|
|
<a name="l463"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l464"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l465"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l466"></a> </span><span class=cF1>if</span><span class=cF0> (alt)
|
|
<a name="l467"></a> {
|
|
<a name="l468"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>arg2->type & </span><span class=cF3>MDF_STACK</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l469"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l470"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg1->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l471"></a> {
|
|
<a name="l472"></a> t1 = arg1->type;
|
|
<a name="l473"></a> r1 = arg1-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l474"></a> d1 = arg1->disp;
|
|
<a name="l475"></a> }
|
|
<a name="l476"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l477"></a> {
|
|
<a name="l478"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l479"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l480"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin1 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l481"></a> {
|
|
<a name="l482"></a> t1 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l483"></a> r1 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l484"></a> d1 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l485"></a> }
|
|
<a name="l486"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l487"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l488"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l489"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, arg1->type, arg1-></span><span class=cF1>reg</span><span class=cF0>, arg1->disp, rip);
|
|
<a name="l490"></a> t1 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l491"></a> r1 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l492"></a> d1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l493"></a> rsp_size+=</span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l494"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l495"></a> }
|
|
<a name="l496"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg2->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l497"></a> {
|
|
<a name="l498"></a> t2 = arg2->type;
|
|
<a name="l499"></a> r2 = arg2-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l500"></a> d2 = arg2->disp;
|
|
<a name="l501"></a> }
|
|
<a name="l502"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l503"></a> {
|
|
<a name="l504"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l505"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l506"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin2 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l507"></a> {
|
|
<a name="l508"></a> t2 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l509"></a> r2 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l510"></a> d2 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l511"></a> }
|
|
<a name="l512"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l513"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l514"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l515"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, arg2->type, arg2-></span><span class=cF1>reg</span><span class=cF0>, arg2->disp, rip);
|
|
<a name="l516"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l517"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l518"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l519"></a> rsp_size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l520"></a> </span><span class=cF1>if</span><span class=cF0> (r1 == </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l521"></a> d1 += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l522"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l523"></a> }
|
|
<a name="l524"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l525"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l526"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l527"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> +</span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, arg1->type, arg1-></span><span class=cF1>reg</span><span class=cF0>, arg1->disp, rip);
|
|
<a name="l528"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> +</span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, arg2->type, arg2-></span><span class=cF1>reg</span><span class=cF0>, arg2->disp, rip);
|
|
<a name="l529"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0x5052</span><span class=cF0>); </span><span class=cF2>//PUSH EDX PUSH EAX</span><span class=cF0>
|
|
<a name="l530"></a> rsp_size = </span><span class=cFE>16</span><span class=cF0>;
|
|
<a name="l531"></a> t1 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l532"></a> r1 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l533"></a> d1 = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l534"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l535"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l536"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l537"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l538"></a> }
|
|
<a name="l539"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l540"></a> {
|
|
<a name="l541"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>arg1->type & </span><span class=cF3>MDF_STACK</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l542"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l543"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg2->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l544"></a> {
|
|
<a name="l545"></a> t2 = arg2->type;
|
|
<a name="l546"></a> r2 = arg2-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l547"></a> d2 = arg2->disp;
|
|
<a name="l548"></a> }
|
|
<a name="l549"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l550"></a> {
|
|
<a name="l551"></a> </span><span class=cF1>if</span><span class=cF0> (arg2->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l552"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l553"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin2 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l554"></a> {
|
|
<a name="l555"></a> t2 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l556"></a> r2 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l557"></a> d2 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg2->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l558"></a> }
|
|
<a name="l559"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l560"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l561"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l562"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, arg2->type, arg2-></span><span class=cF1>reg</span><span class=cF0>, arg2->disp, rip);
|
|
<a name="l563"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l564"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l565"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l566"></a> rsp_size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l567"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l568"></a> }
|
|
<a name="l569"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type.raw_type >= </span><span class=cF3>RT_I64</span><span class=cF0> && arg1->type & </span><span class=cF3>MDG_DISP_SIB_RIP</span><span class=cF0>)
|
|
<a name="l570"></a> {
|
|
<a name="l571"></a> t1 = arg1->type;
|
|
<a name="l572"></a> r1 = arg1-></span><span class=cF1>reg</span><span class=cF0>;
|
|
<a name="l573"></a> d1 = arg1->disp;
|
|
<a name="l574"></a> }
|
|
<a name="l575"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l576"></a> {
|
|
<a name="l577"></a> </span><span class=cF1>if</span><span class=cF0> (arg1->type & </span><span class=cF3>MDF_IMM</span><span class=cF0>)
|
|
<a name="l578"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l579"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>builtin1 = </span><span class=cFD>ICBuiltInFloatConst</span><span class=cF0>(arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l580"></a> {
|
|
<a name="l581"></a> t1 = </span><span class=cF3>MDF_RIP_DISP32</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l582"></a> r1 = </span><span class=cF3>REG_RIP</span><span class=cF0>;
|
|
<a name="l583"></a> d1 = </span><span class=cFD>COCFloatConstFind</span><span class=cF0>(cc, arg1->disp</span><span class=cF7>(</span><span class=cF1>F64</span><span class=cF7>)</span><span class=cF0>) + buf2;
|
|
<a name="l584"></a> }
|
|
<a name="l585"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l586"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l587"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l588"></a> </span><span class=cFD>ICPush</span><span class=cF0>(tmpi, arg1->type, arg1-></span><span class=cF1>reg</span><span class=cF0>, arg1->disp, rip);
|
|
<a name="l589"></a> t1 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l590"></a> r1 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l591"></a> d1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l592"></a> rsp_size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l593"></a> </span><span class=cF1>if</span><span class=cF0> (r2 == </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l594"></a> d2 += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l595"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l596"></a> }
|
|
<a name="l597"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l598"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l599"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l600"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, arg2->type, arg2-></span><span class=cF1>reg</span><span class=cF0>, arg2->disp, rip);
|
|
<a name="l601"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, arg1->type, arg1-></span><span class=cF1>reg</span><span class=cF0>, arg1->disp, rip);
|
|
<a name="l602"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, </span><span class=cFE>0x5052</span><span class=cF0>); </span><span class=cF2>//PUSH EDX PUSH EAX</span><span class=cF0>
|
|
<a name="l603"></a> rsp_size = </span><span class=cFE>16</span><span class=cF0>;
|
|
<a name="l604"></a> t1 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l605"></a> r1 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l606"></a> d1 = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l607"></a> t2 = </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>;
|
|
<a name="l608"></a> r2 = </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l609"></a> d2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l610"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l611"></a> }
|
|
<a name="l612"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l613"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_pop_float && !rsp_size)
|
|
<a name="l614"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l615"></a> rsp_size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l616"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, -</span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l617"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l618"></a> </span><span class=cF1>if</span><span class=cF0> (!dont_push_float)
|
|
<a name="l619"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l620"></a> </span><span class=cF1>if</span><span class=cF0> (builtin2 && !builtin1)
|
|
<a name="l621"></a> {
|
|
<a name="l622"></a> alt = !alt;
|
|
<a name="l623"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&t1, &t2);
|
|
<a name="l624"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&r1, &r2);
|
|
<a name="l625"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&d1, &d2);
|
|
<a name="l626"></a> </span><span class=cF5>SwapI64</span><span class=cF0>(&builtin1, &builtin2);
|
|
<a name="l627"></a> }
|
|
<a name="l628"></a> </span><span class=cF1>if</span><span class=cF0> (builtin1)
|
|
<a name="l629"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, builtin1);
|
|
<a name="l630"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l631"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, t1, r1, d1, SLASH_OP_FLD, rip);
|
|
<a name="l632"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l633"></a> </span><span class=cF1>if</span><span class=cF0> (alt)
|
|
<a name="l634"></a> </span><span class=cF1>switch</span><span class=cF0> (op.u8[</span><span class=cFE>0</span><span class=cF0>])
|
|
<a name="l635"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l636"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>4</span><span class=cF0>:
|
|
<a name="l637"></a> op = SLASH_OP_FSUBR;
|
|
<a name="l638"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l639"></a>
|
|
<a name="l640"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cFE>6</span><span class=cF0>:
|
|
<a name="l641"></a> op = SLASH_OP_FDIVR;
|
|
<a name="l642"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l643"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l644"></a> </span><span class=cF1>if</span><span class=cF0> (builtin2)
|
|
<a name="l645"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l646"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, builtin2);
|
|
<a name="l647"></a> </span><span class=cFD>ICU16</span><span class=cF0>(tmpi, op.u16[</span><span class=cFE>2</span><span class=cF0>]);
|
|
<a name="l648"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l649"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l650"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, t2, r2, d2, op, rip);
|
|
<a name="l651"></a> </span><span class=cFD>CompNoteFloatOp</span><span class=cF0>(cc, tmpi, </span><span class=cF3>TRUE</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, CN_INST);
|
|
<a name="l652"></a> </span><span class=cF1>if</span><span class=cF0> (dont_pop_float)
|
|
<a name="l653"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l654"></a> </span><span class=cF1>if</span><span class=cF0> (rsp_size)
|
|
<a name="l655"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, rsp_size);
|
|
<a name="l656"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l657"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l658"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l659"></a> </span><span class=cF1>if</span><span class=cF0> (rsp_size == </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l660"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, SLASH_OP_FSTP, rip);
|
|
<a name="l661"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (rsp_size > </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l662"></a> {
|
|
<a name="l663"></a> </span><span class=cFD>ICSlashOp</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_SIB</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RSP</span><span class=cF0> + </span><span class=cF3>REG_RSP</span><span class=cF0> << </span><span class=cFE>8</span><span class=cF0>, rsp_size - </span><span class=cFE>8</span><span class=cF0>, SLASH_OP_FSTP, rip);
|
|
<a name="l664"></a> </span><span class=cFD>ICAddRSP</span><span class=cF0>(tmpi, rsp_size - </span><span class=cFE>8</span><span class=cF0>);
|
|
<a name="l665"></a> }
|
|
<a name="l666"></a> </span><span class=cFD>ICPop</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, rip);
|
|
<a name="l667"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l668"></a>}
|
|
<a name="l669"></a>
|
|
<a name="l670"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFCmp</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> op, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l671"></a>{
|
|
<a name="l672"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float;
|
|
<a name="l673"></a>
|
|
<a name="l674"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l675"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l676"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l677"></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="l678"></a> {
|
|
<a name="l679"></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="l680"></a> </span><span class=cFD>ICPopRegs</span><span class=cF0>(tmpi, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>REG_RAX</span><span class=cF0>);
|
|
<a name="l681"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l682"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l683"></a> }
|
|
<a name="l684"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l685"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l686"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l687"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l688"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l689"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l690"></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="l691"></a> </span><span class=cFD>ICPopRegs</span><span class=cF0>(tmpi, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>REG_RDX</span><span class=cF0>);
|
|
<a name="l692"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l693"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l694"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l695"></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="l696"></a> </span><span class=cFD>ICPushRegs</span><span class=cF0>(tmpi, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>REG_RAX</span><span class=cF0>);
|
|
<a name="l697"></a> </span><span class=cFD>ICCopyTemplate</span><span class=cF0>(cc, tmpi, op, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, CN_INST);
|
|
<a name="l698"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l699"></a>}
|
|
<a name="l700"></a>
|
|
<a name="l701"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ICFModEqu</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi, </span><span class=cF9>I64</span><span class=cF0> rip)
|
|
<a name="l702"></a>{
|
|
<a name="l703"></a> </span><span class=cF1>Bool</span><span class=cF0> dont_push_float, dont_pop_float;
|
|
<a name="l704"></a>
|
|
<a name="l705"></a> </span><span class=cFD>CompSetFloatOpPushPop</span><span class=cF0>(cc, tmpi, &dont_push_float, &dont_pop_float);
|
|
<a name="l706"></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="l707"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l708"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l709"></a> {
|
|
<a name="l710"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>,
|
|
<a name="l711"></a> tmpi->arg1.type & </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi->arg1_type_pointed_to,
|
|
<a name="l712"></a> tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l713"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l714"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, rip);
|
|
<a name="l715"></a> }
|
|
<a name="l716"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l717"></a> {
|
|
<a name="l718"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l719"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>,
|
|
<a name="l720"></a> tmpi->arg1.type & </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi->arg1_type_pointed_to,
|
|
<a name="l721"></a> tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l722"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l723"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, rip);
|
|
<a name="l724"></a> }
|
|
<a name="l725"></a></span><span class=cF2>//TODO: unpushable,unpop? Not sure</span><span class=cF0>
|
|
<a name="l726"></a> </span><span class=cFD>ICCopyTemplate</span><span class=cF0>(cc, tmpi, </span><span class=cF3>CMP_TEMPLATE_MOD</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, CN_INST);
|
|
<a name="l727"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l728"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, rip);
|
|
<a name="l729"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->arg1.type & </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi->arg1_type_pointed_to,
|
|
<a name="l730"></a> tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l731"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->res.type.mode)
|
|
<a name="l732"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp,
|
|
<a name="l733"></a> tmpi->arg1.type & </span><span class=cF3>MDG_MASK</span><span class=cF0> + tmpi->arg1_type_pointed_to,
|
|
<a name="l734"></a> tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l735"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l736"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l737"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l738"></a> </span><span class=cF1>if</span><span class=cF0> (dont_push_float)
|
|
<a name="l739"></a> {
|
|
<a name="l740"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RCX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l741"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi->arg1_type_pointed_to, </span><span class=cF3>REG_RCX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l742"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l743"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, rip);
|
|
<a name="l744"></a> }
|
|
<a name="l745"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l746"></a> {
|
|
<a name="l747"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg2.type, tmpi->arg2.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg2.disp, rip);
|
|
<a name="l748"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RCX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpi->arg1.type, tmpi->arg1.</span><span class=cF1>reg</span><span class=cF0>, tmpi->arg1.disp, rip);
|
|
<a name="l749"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi->arg1_type_pointed_to, </span><span class=cF3>REG_RCX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l750"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l751"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RDX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, rip);
|
|
<a name="l752"></a> }
|
|
<a name="l753"></a></span><span class=cF2>//TODO: unpushable,unpop? Not sure</span><span class=cF0>
|
|
<a name="l754"></a> </span><span class=cFD>ICCopyTemplate</span><span class=cF0>(cc, tmpi, </span><span class=cF3>CMP_TEMPLATE_MOD</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, </span><span class=cF3>FALSE</span><span class=cF0>, CN_INST);
|
|
<a name="l755"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->arg1_type_pointed_to != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l756"></a> </span><span class=cFD>ICFConvert2</span><span class=cF0>(cc, tmpi, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>, rip);
|
|
<a name="l757"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, </span><span class=cF3>MDF_DISP</span><span class=cF0> + tmpi->arg1_type_pointed_to, </span><span class=cF3>REG_RCX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l758"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->res.type.mode)
|
|
<a name="l759"></a> </span><span class=cFD>ICMov</span><span class=cF0>(tmpi, tmpi->res.type, tmpi->res.</span><span class=cF1>reg</span><span class=cF0>, tmpi->res.disp, </span><span class=cF3>MDF_REG</span><span class=cF0> + </span><span class=cF3>RT_I64</span><span class=cF0>, </span><span class=cF3>REG_RAX</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, rip);
|
|
<a name="l760"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l761"></a>}
|
|
</span></pre></body>
|
|
</html>
|