📄 x-680x04.html
字号:
<div class="CellBodyC" align="center"><a name="85141"> </a>E</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85143"> </a>S</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85145"> </a>H</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85147"> </a><b class="routine"><i class="routine">tan</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85149"> </a>S</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85151"> </a>HS</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85153"> </a>E</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85155"> </a>S</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85157"> </a>E</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85159"> </a><b class="routine"><i class="routine">tanh</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85161"> </a>S</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85163"> </a>HS</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85165"> </a>E</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85167"> </a>S</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85169"> </a>E</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85171"> </a><b class="routine"><i class="routine">trunc</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85173"> </a></div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85175"> </a>H</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85177"> </a>E</div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85179"> </a></div></td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="85181"> </a>H</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85183"> </a> </div></td><td colspan=5 rowspan=1><div class="CellBody"><a name="85185"> </a>S = software floating-point support <br>H = hardware floating-point support <br>E = emulated hardware floating-point support </div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85195">Floating-Point Support for MC680x0 CPUs Using MC68881/MC68882</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85914"> </a>VxWorks provides both hardware and software floating-point, in support of those target configurations that include a floating-point coprocessor as well as those that do not. Use the compiler option <b class="command">-msoft-float</b> to generate object code that uses software floating-point, and the compiler option <b class="command">-m68881</b> for hardware floating-point.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85918">Floating-Point Support for the MC68040 and MC68060</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85919"> </a>For the MC68040 and the MC68060 (but not the MC68LC040), VxWorks includes support for MC68881/MC68882 floating-point instructions that are not directly supported by the CPU. This emulation is provided by the Floating-Point Software Package (FPSP) from Motorola, which is integrated into VxWorks.</p><dd><p class="Body"><a name="85202"> </a>The FPSP is called by special exception handlers that are invoked when one of the unsupported instructions executes. This allows MC68881/MC68882 instructions to be interpreted, although the exception overhead can be significant. Exception handlers are also provided for other floating-point exceptions (for example, floating-point division by zero, over- and underflow). </p><dd><p class="Body"><a name="85204"> </a>The initialization routine <b class="routine"><i class="routine">mathHardInit</i></b><b>(</b> <b>)</b> installs these exception handlers; this routine is called from <b class="file">usrConfig.c </b>when you configure VxWorks for hardware floating-point by selecting <b class="symbol_UC">INCLUDE_HW_FP</b> for inclusion in the project facility VxWorks view. (It is defined by default.)</p><dd><p class="Body"><a name="85206"> </a>To avoid the overhead associated with unimplemented-instruction exceptions, the floating-point libraries in VxWorks call specific routines in the FPSP directly. As a result, application code written in C that uses transcendental functions (for example, the <b class="routine"><i class="routine">sin</i></b><b>(</b> <b>) </b>or<b> </b><b class="routine"><i class="routine">log</i></b><b>(</b> <b>)</b> routines) does not suffer from the exception-handling overhead. No special changes to application source code are necessary. (However, support is provided only for double-precision floating-point operations.)</p><dd><p class="Body"><a name="85209"> </a>If you are using the GNU ToolKit C compiler (<b class="command">cc68k</b>) distributed by Wind River Systems, compile your code <i class="emphasis">without</i> the flag <b class="command">-msoft-float</b>.</p><dl class="margin"><b class="BulletHead"><li><a name="85212"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">MC68040 Floating-Point Software Package</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="85213"> </a>On the MC68040, VxWorks uses version 2.2 of the MC68040 Floating-Point Software Package (FPSP) from Motorola. This library makes full use of the floating-point support provided by the MC68040 hardware, as opposed to pure software emulation. The size of this FPSP is approximately 64KB. </div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="85214"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">MC68060 Floating-Point Software Package</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="85215"> </a>As with the MC68040, the MC68060 floating-point unit implements only a subset of the MC68881/MC68882 instruction set. The two subsets are not identical (see <i class="title">§6.5.1 Unimplemented Floating-Point Instructions</i> in the <i class="title">MC68060 Microprocessors User's Manual</i>); hence the MC68060 has its own FPSP. VxWorks uses version B1 of the MC68060 Floating-Point Software Package from Motorola. The size of this FPSP is approximately 84KB.</div><br></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85216">Floating-Point Support for the MC68LC040</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85217"> </a>While the MC68LC040 is a derivative of the MC68040 (implementing the same integer unit and memory management unit), it has no floating-point unit. Applications for the MC68LC040 must use software floating-point emulation. Use the compiler option <b class="command">-msoft-float</b> to generate object code that uses software floating-point. Be sure to specify a <b class="symbol_UC">CPU</b> value of <b class="symbol_UC">MC68LC040</b> when building VxWorks (see <a href="x-680x02.html#84387"><i class="title">Defining the CPU Type</i></a>).</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85223">Memory Layout</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85224"> </a>The VxWorks memory layout is the same for all MC680<i class="textVariable">x</i>0 processors, except that the MC68060 has no interrupt stack. <a href="x-680x04.html#85585">Figure A-1</a> shows memory layout, labeled as follows:<p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85658"> </a>Interrupt Vector Table </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85660"> </a>Table of exception/interrupt vectors.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85662"> </a>SM Anchor </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85664"> </a>Anchor for the shared memory network (if there is shared memory on the board).</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85666"> </a>Boot Line </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85668"> </a>ASCII string of boot parameters.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85670"> </a>Exception Message </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85672"> </a>ASCII string of the fatal exception message.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85674"> </a>Initial Stack </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85676"> </a>Initial stack for <b class="routine"><i class="routine">usrInit</i></b><b>(</b> <b>)</b>, until <b class="routine"><i class="routine">usrRoot</i></b><b>(</b> <b>)</b> gets allocated stack.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85678"> </a>System Image </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85680"> </a>VxWorks itself (three sections: text, data, bss). The entry point for VxWorks is at the start of this region.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85682"> </a>WDB Memory Pool </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85684"> </a>Size depends on the macro <b class="symbol_UC">WDB_POOL_SIZE</b> which defaults to one-sixteenth of the system memory pool. This space is used by the target server to support host-based tools. Modify <b class="symbol_UC">WDB_POOL_SIZE</b> under <b class="symbol_UC">INCLUDE_WDB</b>.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85686"> </a>Interrupt Stack </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85688"> </a>Stack for interrupt handlers (where present). Size is defined by <b class="symbol_UC">ISR_STACK_SIZE</b> under <b class="symbol_UC">INCLUDE_KERNEL</b>. Location depends on system image size.</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85690"> </a>System Memory Pool </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85692"> </a>Size depends on size of the system image and (on the all but MC68060) the interrupt stack. The <b class="routine"><i class="routine">sysMemTop</i></b><b>(</b> <b>)</b> routine returns the end of the free memory pool.</p></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="85326"> </a>All addresses shown in <a href="x-680x04.html#85585">Figure A-1</a> are relative to the start of memory for a particular target board. The start of memory (corresponding to 0x0 in the memory-layout diagram) is defined as <b class="symbol_UC">LOCAL_MEM_LOCAL_ADRS</b> under <b class="symbol_UC">INCLUDE_MEMORY_CONFIG</b> for each target.<div class="frame"><h4 class="EntityTitle"><a name="85585"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure A-1: VxWorks System Memory Layout (MC680x0)</font></a></h4><dl class="margin"><div class="Anchor"><a name="85652"> </a><img class="figure" border="0" src="images/x-680x0a.gif"></div></dl></div></p><dd><p class="Body"><a name="79990"> </a></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1: <span class="Footnote"><a name="84676"> </a><i class="term">Dirty data</i> refers to data saved in the cache, not in memory (copyback mode only).</span><p class="FootnoteNumberMarker">2: <span class="Footnote"><a name="85774"> </a>Defined in <b class="file">h/arch/mc68k/cacheMc68kLib.h</b>.</span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="x-680x0.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-680x03.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-sparc.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -