📄 215.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://202.112.58.200"><font face="黑体"><big><big>Tsinghua</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> 嵌入式系统 (BM: turbolinux jacobw) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="嵌入式系统.htm">回到开始</a>][<a href="198.htm">上一层</a>][<a href="216.htm">下一篇</a>]
<hr><p align="left"><small>发信人: plato (纯真年代), 信区: Embedded <br>
标 题: linux for ppc chapter 14 <br>
发信站: BBS 水木清华站 (Wed May 30 23:20:24 2001) <br>
<br>
Next Previous Contents <br>
---------------------------------------------------------------------------- <br>
---- <br>
14. Floating Point <br>
Some of the embedded PowerPC processors do not have a floating point unit, a <br>
nd so must perform all floating point operations in software. Others do have <br>
a hardware floating point unit, and may perform operations in hardware. <br>
14.1 Software <br>
If your application has very intensive floating point requirements, you may <br>
need to switch to fixed point or choose a target processor which does have a <br>
n FPU. <br>
Floating point can be performed either by instruction emulation in the kerne <br>
l, or by compiling everything with -msoft-float. In particular, it's importa <br>
nt that all the libraries, whether dynamically or statically linked are comp <br>
iled with the same options as the binaries that use them. Unless you're usin <br>
g a toolkit where this has already been done for you, this will generally me <br>
an that if you wish to use -msoft-float to gain maximum performance, you nee <br>
d to (re)compile everything, including: <br>
All static and shared libraries <br>
The compiler's internal libraries, such as libgcc.a <br>
All executables <br>
You will almost certainly not get this right first time. The primary symptom <br>
is that printf gives bogus numbers for simple floating point values. <br>
However, if you succeed, you can save space by configuring the kernel withou <br>
t floating point emulation. <br>
See: http://lists.linuxppc.org/listarcs/linuxppc-embedded/199911/msg00056.ht <br>
ml <br>
To add kernel math emulation to the 2.2.13 kernel, see: http://lists.linuxpp <br>
c.org/listarcs/linuxppc-embedded/199912/msg00017.html <br>
The "paranoia" test should give no complaints if everything is working corre <br>
ctly. See: http://www.enseeiht.fr/NetLib/paranoia/index.html <br>
14.2 Hardware <br>
If your CPU has an FPU, you'll want to use it. Make sure that everything is <br>
consistently compiled for hardware floating point, especially if you've asse <br>
mbled your toolkit yourself, or are using an 8xx toolkit to compile for the <br>
8260. <br>
Programs compiled for hardware floating point can still run on a CPU without <br>
an FPU, provided the kernel is built with the floating point instruction em <br>
ulator. This incurs a further performance penalty on CPUs lacking an FPU. <br>
14.3 Mixed <br>
If you are using a single set of shared libraries, you cannot mix the two te <br>
chniques in the one system. If you link statically or try really hard by cre <br>
ating two sets of shared libraries, the two can co-exist since programs comp <br>
iled with -msoft-float never generate floating point instructions requiring <br>
kernel emulation. <br>
In general, you're better off choosing one or the other; and choosing hardwa <br>
re floating point with kernel instruction emulation is much easier to get wo <br>
rking correctly. <br>
---------------------------------------------------------------------------- <br>
---- <br>
Next Previous Contents <br>
<br>
-- <br>
<br>
※ 来源:·BBS 水木清华站 smth.org·[FROM: 166.111.161.8] <br>
</small><hr>
<p align="center">[<a href="嵌入式系统.htm">回到开始</a>][<a href="198.htm">上一层</a>][<a href="216.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -