📄 fpparchlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/fppArchLib.html - generated by refgen from fppArchLib.c --> <title> fppArchLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>fppArchLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fppArchLib</strong> - architecture-dependent floating-point coprocessor support </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./fppArchLib.html#fppSave">fppSave</a></i>( )</b> - save the floating-point coprocessor context<br><b><i><a href="./fppArchLib.html#fppRestore">fppRestore</a></i>( )</b> - restore the floating-point coprocessor context<br><b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>( )</b> - probe for the presence of a floating-point coprocessor<br><b><i><a href="./fppArchLib.html#fppTaskRegsGet">fppTaskRegsGet</a></i>( )</b> - get the floating-point registers from a task TCB<br><b><i><a href="./fppArchLib.html#fppTaskRegsSet">fppTaskRegsSet</a></i>( )</b> - set the floating-point registers of a task<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains architecture-dependent routines to support the floating-point coprocessor. The routines <b><i><a href="./fppArchLib.html#fppSave">fppSave</a></i>( )</b> and <b><i><a href="./fppArchLib.html#fppRestore">fppRestore</a></i>( )</b> saveand restore all the task floating-point context information. The routine<b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>( )</b> checks for the presence of the floating-point coprocessor. Theroutines <b><i><a href="./fppArchLib.html#fppTaskRegsSet">fppTaskRegsSet</a></i>( )</b> and <b><i><a href="./fppArchLib.html#fppTaskRegsGet">fppTaskRegsGet</a></i>( )</b> inspect and set coprocessorregisters on a per-task basis.<p>With the exception of <b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>( )</b>, the higher-level facilities in <b><a href="./dbgLib.html#top">dbgLib</a></b>and <b><a href="./usrLib.html#top">usrLib</a></b> should be used instead of these routines. For information aboutarchitecture-independent access mechanisms, see the manual entry for fppLib.<p></blockquote><h4>INITIALIZATION</h4><blockquote><p>To activate floating-point support, <b><i><a href="./fppLib.html#fppInit">fppInit</a></i>( )</b> must be called before anytasks using the coprocessor are spawned. This is done by the root task,<b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>( )</b>, in <b>usrConfig.c</b>. See the manual entry for fppLib.<p>NOTE I386/I486On this architecture, VxWorks disables the six FPU exceptions that cansend an IRQ to the CPU.<p></blockquote><h4>NOTE ARM</h4><blockquote><p>This architecture does not currently support floating-point coprocessors.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>fppLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b>, <b><a href="./fppLib.html#top">fppLib</a></b>, <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>( )</b>, <i>Motorola MC68881/882 Floating-Point Coprocessor User's Manual</i>, <i>SPARC Architecture Manual</i>, <i>Intel 80960SA/SB Reference Manual</i>, <i>Intel 80960KB Programmer's Reference Manual</i>, <i>Intel 387 DX User's Manual</i>, Gerry Kane and Joe Heinrich:<i>MIPS RISC Architecture Manual </i><hr><a name="fppSave"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fppSave</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fppSave</i>( )</strong> - save the floating-point coprocessor context</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void fppSave ( FP_CONTEXT * pFpContext /* where to save context */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine saves the floating-point coprocessor context.The context saved is:<p>MC680x0:<br> - registers <b>fpcr</b>, <b>fpsr</b>, and <b>fpiar</b><br> - registers <b>f0</b> - <b>f7</b><br> - internal state frame (if NULL, the other registers are not saved.)<p></blockquote><h4>SPARC</h4><blockquote><p><p> - registers <b>fsr</b> and <b>fpq</b><br> - registers <b>f0</b> - <b>f31</b><p>i960:<br> - registers <b>fp0</b> - <b>fp3</b><p></blockquote><h4>MIPS</h4><blockquote><p><p> - register <b>fpcsr</b><br> - registers <b>fp0</b> - <b>fp31</b><p>i386/i486:<br> - control word, status word, tag word, IP offset, CS selector,<br> data operand offset, and operand selector (4 bytes each)<br> - registers <b>st0</b> - <b>st7</b> (8 bytes each)<p></blockquote><h4>ARM</h4><blockquote><p><p> - currently, on this architecture, this routine does nothing.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b>, <b><i><a href="./fppArchLib.html#fppRestore">fppRestore</a></i>( )</b><hr><a name="fppRestore"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fppRestore</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fppRestore</i>( )</strong> - restore the floating-point coprocessor context</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void fppRestore ( FP_CONTEXT * pFpContext /* where to restore context from */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine restores the floating-point coprocessor context.The context restored is:<p>MC680x0:<br> - registers <b>fpcr</b>, <b>fpsr</b>, and <b>fpiar</b><br> - registers <b>f0</b> - <b>f7</b><br> - internal state frame (if NULL, the other registers are not saved.)<p></blockquote><h4>SPARC</h4><blockquote><p><p> - registers <b>fsr</b> and <b>fpq</b><br> - registers <b>f0</b> - <b>f31</b><p>i960:<br> - registers <b>fp0</b> - <b>fp3</b><p></blockquote><h4>MIPS</h4><blockquote><p><p> - register <b>fpcsr</b><br> - registers <b>fp0</b> - <b>fp31</b><p>i386/i486:<br> - control word, status word, tag word, IP offset, CS selector,<br> data operand offset, and operand selector<br> - registers <b>st0</b> - <b>st7</b><p></blockquote><h4>ARM</h4><blockquote><p><p> - currently, on this architecture, this routine does nothing.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b>, <b><i><a href="./fppArchLib.html#fppSave">fppSave</a></i>( )</b><hr><a name="fppProbe"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fppProbe</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fppProbe</i>( )</strong> - probe for the presence of a floating-point coprocessor</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fppProbe (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine determines whether there is afloating-point coprocessor in the system.<p>The implementation of this routine is architecture-dependent:<p><dl><dt>MC680x0, SPARC, i386/i486:<dd>This routine sets the illegal coprocessor opcode trap vector and executesa coprocessor instruction. If the instruction causes an exception,<b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>( )</b> returns ERROR. Note that this routine saves and restoresthe illegal coprocessor opcode trap vector that was there prior to thiscall.<p>The probe is only performed the first time this routine is called.The result is stored in a static and returned on subsequentcalls without actually probing.<p><dt>i960:<dd>This routine merely indicates whether VxWorks was compiled withthe flag <b>-DCPU=I960KB</b>.<p><dt></blockquote><h4>MIPS</h4><blockquote><p><dd>This routine simply reads the R-Series status register and reportsthe bit that indicates whether coprocessor 1 is usable. This bitmust be correctly initialized in the BSP.<p><dt></blockquote><h4>ARM</h4><blockquote><p><dd> This routine currently returns ERROR to indicate no floating-point coprocessorsupport.<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if there is no floating-point coprocessor.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b><hr><a name="fppTaskRegsGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fppTaskRegsGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fppTaskRegsGet</i>( )</strong> - get the floating-point registers from a task TCB</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fppTaskRegsGet ( int task, /* task to get info about */ FPREG_SET * pFpRegSet /* ptr to floating-point register set */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies a task's floating-point registers and/or statusregisters to the locations whose pointers are passed asparameters. The floating-point registers are copied intoan array containing all the registers.<p></blockquote><h4>NOTE</h4><blockquote><p>This routine only works well if <i>task</i> is not the calling task.If a task tries to discover its own registers, the values will be stale(that is, left over from the last task switch).<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if there is no floating-pointsupport or there is an invalid state.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b>, <b><i><a href="./fppArchLib.html#fppTaskRegsSet">fppTaskRegsSet</a></i>( )</b><hr><a name="fppTaskRegsSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fppTaskRegsSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fppTaskRegsSet</i>( )</strong> - set the floating-point registers of a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fppTaskRegsSet ( int task, /* task to set registers for */ FPREG_SET * pFpRegSet /* ptr to floating-point register set */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine loads the specified values into the TCB of a specified task.The register values are copied from the array at <i>pFpRegSet</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if there is no floating-pointsupport or there is an invalid state.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./fppArchLib.html#top">fppArchLib</a></b>, <b><i><a href="./fppArchLib.html#fppTaskRegsGet">fppTaskRegsGet</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -