<div>
<div><span></span>Hi Jim,</div>
<div><span>    X86 and ARM have the assembly instruction convert float to half/covert half to float, so they need not to call libcall, but MIPS have not.  So we must add -soft-float option. The terrible thing is all function will be using soft, not FPU (hard).</span></div>

<div><br></div>
<div>Cheers,</div>
<div>Robin</div>
<div><br></div>
<hr style="MIN-HEIGHT:1px;WIDTH:210px" align="left" color="#b5c4df" size="1">

<div><span>
<div style="MARGIN:10px;FONT-FAMILY:verdana;FONT-SIZE:10pt">
<div><a href="mailto:liuyalong.email@gmail.com" target="_blank">liuyalong.email@gmail.com</a></div></div></span></div>
<blockquote style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;MARGIN-LEFT:0.5em">
<div>  </div>
<div style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0cm;PADDING-LEFT:0cm;PADDING-RIGHT:0cm;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<div style="PADDING-BOTTOM:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px;FONT-FAMILY:tahoma;BACKGROUND:#efefef;COLOR:#000000;FONT-SIZE:12px;PADDING-TOP:8px">
<div><b>From:</b> <a href="mailto:grosbach@apple.com" target="_blank">Jim Grosbach</a></div>
<div><b>Date:</b> <a href="tel:2014-07-25%C2%A010" target="_blank" value="+12014072510">2014-07-25 10</a>:50</div>
<div><b>To:</b> <a href="mailto:liuyalong.email@gmail.com" target="_blank">刘亚龙</a></div>
<div><b>CC:</b> <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev</a></div>
<div><b>Subject:</b> Re: [LLVMdev] FPU cannot be compatible with -soft-float code on mips by llc</div></div></div>
<div>
<div>Hi Robin, 
<div><br></div>
<div>It sounds like you want to support half (f16 in LLVM terms) as a storage only interchange format. AArch64 and X86 (among others) do the same thing. You shouldn’t need the “-soft-float” option or anything of that nature at all. That, as you’ve found, disables all hard float operations. There’s been some recent cleanup in how this is handled in LLVM that should help guide you in what the Mips backend needs to do. In particular, Tim Northover’s recent patch, r213374.</div>

<div><br></div>
<div>Regards,</div>
<div>  Jim</div>
<div><br>
<div>
<blockquote style="MARGIN-TOP:0px" type="cite">
<div>On Jul 24, 2014, at 6:32 PM, 刘亚龙 <<a href="mailto:liuyalong.email@gmail.com" target="_blank">liuyalong.email@gmail.com</a>> wrote:</div><br>
<div>
<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">Hi all,</div>
<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:''">    </span><span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-FAMILY:'';FONT-SIZE:10.5pt">-soft-float can not be rightly use by llc. All float function operation will call soft float, but not hard.</span></div>

<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:''">    My mips device cannot support half float type, so I hack the llvm, and add soft half float and add -soft-float option.</span></div>

<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:''">    I add the function define for </span><span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-FAMILY:'';FONT-SIZE:10.5pt">__gnu_f2h_ieee() and __gnu_h2f_ieee (), and it can call the soft half float.</span></div>

<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:''">    However, all the others function about float also call the soft float, how I do make only </span><span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-SIZE:10.5pt">__gnu_f2h_ieee() use soft float, other use hard float???</span></div>

<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><br></div>
<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:''">    Thank you all !!</span></div>

<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><br style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-SIZE:10.5pt">
<span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-FAMILY:'';FONT-SIZE:10.5pt">Cheers, </span></div>
<div style="TEXT-TRANSFORM:none;BACKGROUND-COLOR:rgb(255,255,255);TEXT-INDENT:0px;FONT:14px/21px 'Segoe UI';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-FAMILY:'';FONT-SIZE:10.5pt"><span style="LINE-HEIGHT:1.5;BACKGROUND-COLOR:window;FONT-FAMILY:'';FONT-SIZE:10.5pt">    </span>Robin</span></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></div></div></blockquote></div>