⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fpparchlib.html

📁 vxworks相关论文
💻 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>(&nbsp;)</b>  -  save the floating-point coprocessor context<br><b><i><a href="./fppArchLib.html#fppRestore">fppRestore</a></i>(&nbsp;)</b>  -  restore the floating-point coprocessor context<br><b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>(&nbsp;)</b>  -  probe for the presence of a floating-point coprocessor<br><b><i><a href="./fppArchLib.html#fppTaskRegsGet">fppTaskRegsGet</a></i>(&nbsp;)</b>  -  get the floating-point registers from a task TCB<br><b><i><a href="./fppArchLib.html#fppTaskRegsSet">fppTaskRegsSet</a></i>(&nbsp;)</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>(&nbsp;)</b> and <b><i><a href="./fppArchLib.html#fppRestore">fppRestore</a></i>(&nbsp;)</b> saveand restore all the task floating-point context information.  The routine<b><i><a href="./fppArchLib.html#fppProbe">fppProbe</a></i>(&nbsp;)</b> checks for the presence of the floating-point coprocessor.  Theroutines <b><i><a href="./fppArchLib.html#fppTaskRegsSet">fppTaskRegsSet</a></i>(&nbsp;)</b> and <b><i><a href="./fppArchLib.html#fppTaskRegsGet">fppTaskRegsGet</a></i>(&nbsp;)</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>(&nbsp;)</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>(&nbsp;)</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>(&nbsp;)</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>(&nbsp;)</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>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fppSave</i>(&nbsp;)</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fpcr</b>,&nbsp;<b>fpsr</b>,&nbsp;and&nbsp;<b>fpiar</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>f0</b>&nbsp;-&nbsp;<b>f7</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;internal&nbsp;state&nbsp;frame&nbsp;(if&nbsp;NULL,&nbsp;the&nbsp;other&nbsp;registers&nbsp;are&nbsp;not&nbsp;saved.)<p></blockquote><h4>SPARC</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fsr</b>&nbsp;and&nbsp;<b>fpq</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>f0</b>&nbsp;-&nbsp;<b>f31</b><p>i960:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fp0</b>&nbsp;-&nbsp;<b>fp3</b><p></blockquote><h4>MIPS</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;register&nbsp;<b>fpcsr</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fp0</b>&nbsp;-&nbsp;<b>fp31</b><p>i386/i486:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;control&nbsp;word,&nbsp;status&nbsp;word,&nbsp;tag&nbsp;word,&nbsp;IP&nbsp;offset,&nbsp;CS&nbsp;selector,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data&nbsp;operand&nbsp;offset,&nbsp;and&nbsp;operand&nbsp;selector&nbsp;(4&nbsp;bytes&nbsp;each)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>st0</b>&nbsp;-&nbsp;<b>st7</b>&nbsp;(8&nbsp;bytes&nbsp;each)<p></blockquote><h4>ARM</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;currently,&nbsp;on&nbsp;this&nbsp;architecture,&nbsp;this&nbsp;routine&nbsp;does&nbsp;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>(&nbsp;)</b><hr><a name="fppRestore"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>fppRestore</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fppRestore</i>(&nbsp;)</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fpcr</b>,&nbsp;<b>fpsr</b>,&nbsp;and&nbsp;<b>fpiar</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>f0</b>&nbsp;-&nbsp;<b>f7</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;internal&nbsp;state&nbsp;frame&nbsp;(if&nbsp;NULL,&nbsp;the&nbsp;other&nbsp;registers&nbsp;are&nbsp;not&nbsp;saved.)<p></blockquote><h4>SPARC</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fsr</b>&nbsp;and&nbsp;<b>fpq</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>f0</b>&nbsp;-&nbsp;<b>f31</b><p>i960:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fp0</b>&nbsp;-&nbsp;<b>fp3</b><p></blockquote><h4>MIPS</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;register&nbsp;<b>fpcsr</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>fp0</b>&nbsp;-&nbsp;<b>fp31</b><p>i386/i486:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;control&nbsp;word,&nbsp;status&nbsp;word,&nbsp;tag&nbsp;word,&nbsp;IP&nbsp;offset,&nbsp;CS&nbsp;selector,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data&nbsp;operand&nbsp;offset,&nbsp;and&nbsp;operand&nbsp;selector<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;registers&nbsp;<b>st0</b>&nbsp;-&nbsp;<b>st7</b><p></blockquote><h4>ARM</h4><blockquote><p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;currently,&nbsp;on&nbsp;this&nbsp;architecture,&nbsp;this&nbsp;routine&nbsp;does&nbsp;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>(&nbsp;)</b><hr><a name="fppProbe"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>fppProbe</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fppProbe</i>(&nbsp;)</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>(&nbsp;)</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>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fppTaskRegsGet</i>(&nbsp;)</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>(&nbsp;)</b><hr><a name="fppTaskRegsSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>fppTaskRegsSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fppTaskRegsSet</i>(&nbsp;)</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>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -