VxWorks Reference Manual : Libraries
bALib - buffer manipulation library SPARC assembly language routines
bzeroDoubles( ) - zero out a buffer eight bytes at a time (SPARC)
bfillDoubles( ) - fill a buffer with a specified eight-byte pattern (SPARC)
bcopyDoubles( ) - copy one buffer to another eight bytes at a time (SPARC)
This library contains routines to manipulate buffers, which are simply variable length byte arrays. These routines are highly optimized loops.
All address pointers must be properly aligned for 8-byte moves. Note that buffer lengths are specified in terms of bytes or doubles. Since this is meant to be a high-performance operation, the minimum number of bytes is 256.
None of the buffer routines have been hand-coded in assembly. These are additional routines that exploit the SPARC's LDD and STD instructions.
bzeroDoubles( ) - zero out a buffer eight bytes at a time (SPARC)
STATUS bzeroDoubles ( void * buffer, /* 8-byte aligned buffer */ int nbytes /* multiple of 256 bytes */ )
This routine fills the first nbytes characters of the specified buffer with 0, eight bytes at a time. The buffer address is assumed to be 8-byte aligned. The number of bytes will be rounded up to a multiple of 256 bytes.
OK, if it runs to completion.
bfillDoubles( ) - fill a buffer with a specified eight-byte pattern (SPARC)
STATUS bfillDoubles ( void * buffer, /* 8-byte aligned buffer */ int nbytes, /* Multiple of 256 bytes */ ULONG bits_63to32, /* Upper 32 bits of fill pattern */ ULONG bits_31to0 /* Lower 32 bits of fill pattern */ )
This function copies a specified 8-byte pattern to the buffer, which must be 8-byte aligned. The filling is done eight bytes at a time. The number of bytes filled will be rounded up to a multiple of 256 bytes.
OK, if it runs to completion.
bcopyDoubles( ) - copy one buffer to another eight bytes at a time (SPARC)
STATUS bcopyDoubles ( void * source, /* 8-byte aligned source buffer */ void * destination, /* 8-byte aligned destination buffer */ int ndoubles /* Number of 256-byte quantities */ )
This function copies the buffer source to the buffer destination, both of which must be 8-byte aligned. The copying is done eight bytes at a time. Note the count is the number of doubles, or the number of bytes divided by eight. The number of bytes copied will always be a multiple of 256.
OK, if it runs to completion.