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

📄 x-sparc3.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    Sun SPARC, SPARClite   </title></head><body bgcolor="FFFFFF"><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-sparc.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-sparc2.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-sparc4.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84435">B.3  &nbsp;&nbsp;Interface Variations</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84436"> </a>This section describes particular routines that are specific to SPARC targets in one of the following ways:</p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84437"> </a>available only for SPARC or SPARClite targets</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84438"> </a>parameters specific to SPARC or SPARClite targets</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84439"> </a>special restrictions or characteristics on SPARC or SPARClite targets</li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="84440"> </a>For complete documentation on these routines, see the reference entries.</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="85115"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE:  </font></b></a>Unless otherwise noted, the information in this section applies to both the SPARC and SPARClite. For SPARClite-specific information, see <a href="x-sparc4.html#84860"><i class="title">SPARClite Overview</i></a>.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84445"><b class="library">bALib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84447"> </a><b class="library"></b>The following buffer-manipulation routines provided by <b class="library">bALib</b> exploit the SPARC LDD and STD instructions.</p></dl><dl class="margin"><dd><div class="Item"><a name="84449"> </a><b class="routine"><i class="routine">bzeroDoubles</i></b><b>(&nbsp;)</b> </div><dl class="margin"><dd><div class="Indent"><a name="84450"> </a>Zeroes out a buffer, 256 bytes at a time. </div><br></dl><dd><div class="Item"><a name="84452"> </a><b class="routine"><i class="routine">bfillDoubles</i></b><b>(&nbsp;)</b> </div><dl class="margin"><dd><div class="Indent"><a name="84453"> </a>Fills a buffer with a specified eight-byte pattern. </div><br></dl><dd><div class="Item"><a name="84455"> </a><b class="routine"><i class="routine">bcopyDoubles</i></b><b>(&nbsp;)</b> </div><dl class="margin"><dd><div class="Indent"><a name="84456"> </a>Copies one buffer to another, eight bytes at a time. </div><br></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84457"><b class="library">cacheMb930Lib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84459"> </a><b class="library"></b>The library <b class="library">cacheMb930Lib</b> contains routines that allow you to initialize, lock, and clear the Fujitsu MB86930 (SPARClite) cache. For more information, see the manual pages and <a href="x-sparc4.html#84864"><i class="title">Instruction and Data Cache Locking</i></a>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84463"><b class="library">cacheMicroSparcLib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84465"> </a>The library <b class="library">cacheMicroSparcLib</b> contains routines that allow you to initialize, flush, and clear the MicroSparc I and II caches. For more information, see the manual pages.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84466"><b class="library">dbgLib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84468"> </a><b class="library"></b>If you are using the target shell, note the following architecture-specific information on routines in the <b class="library">dbgLib</b>:</p></dl><dl class="margin"><b class="HU-bullet"><li><a name="84469"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Optional Parameter for <b class="routine"><i class="routine">c</i></b><b>(&nbsp;)</b> and<b class="routine"><i class="routine"> s</i></b><b>(&nbsp;)</b></font></li></b></dl><dl class="margin"><dd><p class="Body"><a name="84472"> </a>The SPARC versions of <b class="routine"><i class="routine">c</i></b><b>(</b>&nbsp;<b>)</b> (continue) and <b class="routine"><i class="routine">s</i></b><b>(</b>&nbsp;<b>)</b> (single-step) can take a second address parameter, <i class="textVariable">addr1</i>. With this parameter, you can set <b class="symbol_UC">nPC</b> as well as the <b class="symbol_UC">PC</b>. </p><dd><p class="Body"><a name="84473"> </a>Note that if <i class="textVariable">addr</i> is NULL, <i class="textVariable">addr1</i> is ignored.</p></dl><dl class="margin"><b class="HU-bullet"><li><a name="84475"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Restrictions on <b class="routine"><i class="routine">cret</i></b><b>(&nbsp;)</b> </font></li></b></dl><dl class="margin"><dd><p class="Body"><a name="84476"> </a><b></b>In VxWorks for SPARC, <b class="routine"><i class="routine">cret</i></b><b>(</b>&nbsp;<b>)</b> cannot determine the correct return address. Because the actual return address is determined by code within the routine, only the calling address is known. With C code in general, the calling instruction is a <b class="symbol_UC">CALL</b> and routines return with the following: </p><dl class="margin"><dd><pre class="Code2"><b><a name="84477">ret restore</a></b></pre></dl><dd><p class="Body"><a name="84479"> </a>This is the assumption made by <b class="routine"><i class="routine">cret</i></b><b>(</b>&nbsp;<b>)</b> when it places a breakpoint at the return address of the current subroutine and continues execution. Note that returns other than <b class="keyword">%i7 + 8</b> result in <b class="routine"><i class="routine">cret</i></b><b>(</b>&nbsp;<b>)</b> setting an incorrect breakpoint value and continuing. </p></dl><dl class="margin"><b class="HU-bullet"><li><a name="84480"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Restrictions on <b class="routine"><i class="routine">so</i></b><b>(&nbsp;)</b></font></li></b></dl><dl class="margin"><dd><p class="Body"><a name="84482"> </a>The <b class="routine"><i class="routine">so</i></b><b>(</b>&nbsp;<b>)</b> routine single-steps a task stopped at a breakpoint, but steps over a subroutine. However, in the SPARC version, if the next instruction is a <b class="keyword">CALL</b> or <b class="keyword">JMPL&nbsp;x,&nbsp;%o7</b>, the routine breaks at the second instruction following the subroutine (that is, the first instruction following the delay slot's instruction). In general, the delay slot loads parameters for the subroutine. This loading can have unintended consequences if the delay slot is also a transfer of control. </p></dl><dl class="margin"><b class="HU-bullet"><li><a name="84485"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Trace Routine, <b class="routine"><i class="routine">tt</i></b><b>(&nbsp;)</b> </font></li></b></dl></dl><dl class="margin"><dl class="margin"><dl class="margin"><dd><pre class="Code2"><b><a name="84487">save    %sp,&nbsp;-STACK_FRAME_SIZE,&nbsp;%sp ... ret restore</a></b></pre></dl></dl><dl class="margin"><dd><p class="Body"><a name="84491"> </a>Although the <b class="routine"><i class="routine">tt</i></b><b>(&nbsp;)</b> routine works correctly in general, note the following caveats:</p></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="84492"> </a>Routines written in assembly or other languages, strange entries in routines, or tasks with corrupted stacks, can result in confusing trace information. </li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84493"> </a>All parameters are assumed to be 32-bit quantities. </li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84494"> </a>The cross-compiler does not handle structures passed as parameters correctly.</li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84495"> </a>The current trace-back tag generated by C compilers is limited to 16 parameters; thus, <b class="routine"><i class="routine">tt</i></b><b>(&nbsp;)</b>does not report the value of parameters above 16. However, this does not mean that your application cannot use routines with more than 16 parameters.</li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84496"> </a>If the routine changes the values of its local registers between the time it is called and the time it calls the next level down (or, at the lowest level, the time the task is suspended), <b class="routine"><i class="routine">tt</i></b><b>(&nbsp;)</b> reports the changed values. It has no way to locate the original values. </li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84497"> </a>If the routine changes the values of registers <b class="symbol_lc">i0</b> through <b class="symbol_lc">i5</b> between the time it is called and the time it calls the next level down (or, at the lowest level, the time the task is suspended), <b class="routine"><i class="routine">tt</i></b><b>(</b>&nbsp;<b>)</b> reports the changed values. It has no way to locate the original values. </li></ul></p><p class="listspace"><ul class="Dash" type="circle"><li><a name="84498"> </a>If you attempt a <b class="routine"><i class="routine">tt</i></b><b>(</b>&nbsp;<b>)</b> of a routine between the time the routine is called and the time its initial <i class="emphasis">save</i> is finished, you can expect strange results.</li></ul></p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84500"><b class="library">dbgArchLib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84502"> </a><b class="library"></b>If you are using the target shell, the following architecture-specific show routines are available if <b class="symbol_UC">INCLUDE_DEBUG </b>is defined:</p></dl><dl class="margin"><dd><div class="Item"><a name="84504"> </a><b class="routine"><i class="routine">psrShow</i></b><b>(&nbsp;)</b></div><dl class="margin"><dd><div class="Indent"><a name="84505"> </a>Displays the symbolic meaning of a specified PSR value on the standard output device.</div><br></dl><dd><div class="Item"><a name="84507"> </a><b class="routine"><i class="routine">fsrShow</i></b><b>(&nbsp;)</b></div><dl class="margin"><dd><div class="Indent"><a name="84508"> </a>Displays the symbolic meaning of a specified FSR value on the standard output device.<tt class="output"></tt></div><br></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84510"><b class="library">fppArchLib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84512"> </a><b class="library"></b>The SPARC version of <b class="library">fppArchLib</b> saves and restores a math coprocessor context appropriate to the SPARC floating-point architecture standard. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84513"><b class="library">intArchLib</b> </a></i></h5></font><dl class="margin"><dd><div class="Item"><a name="84516"> </a><b class="routine"><i class="routine">intLevelSet</i></b><b>(&nbsp;)</b>parameters</div><dl class="margin"><dd><div class="Indent"><a name="84517"> </a>The SPARC version of <b class="routine"><i class="routine">intLevelSet</i></b><b>(</b>&nbsp;<b>)</b> takes an argument from 0 to 15.</div><br></dl><dd><div class="Item"><a name="84519"> </a><b class="routine"><i class="routine">intLock</i></b><b>(&nbsp;)</b> returns </div><dl class="margin"><dd><div class="Indent"><a name="84520"> </a>The SPARC version of <b class="routine"><i class="routine">intLock</i></b><b>(</b>&nbsp;<b>)</b> returns an interrupt level.</div><br></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84521"><b class="library">ioMmuMicroSparcLib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84523"> </a>The library <b class="library">ioMmuMicroSparcLib</b> contains routines that allow you to initialize and map memory in the microSPARC I/O MMU. For more information, see the manual pages.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84525"><b class="library">mathALib</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84526"> </a>Because the overall SPARC architecture includes hardware floating-point support, while the SPARClite variant does not, VxWorks includes <b class="library">mathALib</b> hardware floating-point support for SPARC and software floating-point support for SPARClite.</p></dl><dl class="margin"><b class="HU-bullet"><li><a name="84527"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">SPARC </font></li></b></dl><dl class="margin"><dd><p class="Body"><a name="84528"> </a>On SPARC targets, the following <b class="library">mathALib</b> routines are available. Note that these are all double-precision routines; no single-precision routines are supported for SPARC:<p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85204"> </a><b class="routine"><i class="routine">acos</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85206"> </a><b class="routine"><i class="routine">asin</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85208"> </a><b class="routine"><i class="routine">atan</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85210"> </a><b class="routine"><i class="routine">atan2</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85212"> </a><b class="routine"><i class="routine">cbrt</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85214"> </a><b class="routine"><i class="routine">ceil</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85216"> </a><b class="routine"><i class="routine">cos</i></b><b>(&nbsp;)</b> </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85218"> </a><b class="routine"><i class="routine">cosh</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85220"> </a><b class="routine"><i class="routine">exp</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85222"> </a><b class="routine"><i class="routine">fabs</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85224"> </a><b class="routine"><i class="routine">floor</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85226"> </a><b class="routine"><i class="routine">fmod</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85228"> </a><b class="routine"><i class="routine">irint</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85230"> </a><b class="routine"><i class="routine">iround</i></b><b>(&nbsp;)</b> </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85232"> </a><b class="routine"><i class="routine">log</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85234"> </a><b class="routine"><i class="routine">log10</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85236"> </a><b class="routine"><i class="routine">pow</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85238"> </a><b class="routine"><i class="routine">round</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85240"> </a><b class="routine"><i class="routine">sin</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85242"> </a><b class="routine"><i class="routine">sinh</i></b><b>(&nbsp;)</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85244"> </a><b class="routine"><i class="routine">sqrt</i></b><b>(&nbsp;)</b> </p></td>

⌨️ 快捷键说明

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