This section describes particular routines that are specific to SPARC targets in one of the following ways:
|
NOTE: Unless otherwise noted, the information in this section applies to both the SPARC and SPARClite. For SPARClite-specific information, see SPARClite Overview.
|
||||||||||||||||||
The following buffer-manipulation routines provided by bALib exploit the SPARC LDD and STD instructions.
The library cacheMb930Lib contains routines that allow you to initialize, lock, and clear the Fujitsu MB86930 (SPARClite) cache. For more information, see the manual pages and Instruction and Data Cache Locking.
The library cacheMicroSparcLib contains routines that allow you to initialize, flush, and clear the MicroSparc I and II caches. For more information, see the manual pages.
If you are using the target shell, note the following architecture-specific information on routines in the dbgLib:
The SPARC versions of c( ) (continue) and s( ) (single-step) can take a second address parameter, addr1. With this parameter, you can set nPC as well as the PC.
In VxWorks for SPARC, cret( ) 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 CALL and routines return with the following:
ret restore
This is the assumption made by cret( ) when it places a breakpoint at the return address of the current subroutine and continues execution. Note that returns other than %i7 + 8 result in cret( ) setting an incorrect breakpoint value and continuing.
The so( ) 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 CALL or JMPL x, %o7, 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.
save %sp, -STACK_FRAME_SIZE, %sp ... ret restore
If you are using the target shell, the following architecture-specific show routines are available if INCLUDE_DEBUG is defined:
The SPARC version of fppArchLib saves and restores a math coprocessor context appropriate to the SPARC floating-point architecture standard.
The library ioMmuMicroSparcLib contains routines that allow you to initialize and map memory in the microSPARC I/O MMU. For more information, see the manual pages.
Because the overall SPARC architecture includes hardware floating-point support, while the SPARClite variant does not, VxWorks includes mathALib hardware floating-point support for SPARC and software floating-point support for SPARClite.
On SPARC targets, the following mathALib routines are available. Note that these are all double-precision routines; no single-precision routines are supported for SPARC:
On SPARClite targets, the following mathALib routines are supported (for information about how to use this support, see USS Floating-Point Emulation Library):
The test-and-set primitive vxTas( ) provides a C-callable interface to the SPARC ldstub instruction.