VxWorks Reference Manual : Libraries

bALib

NAME

bALib - buffer manipulation library SPARC assembly language routines

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)

DESCRIPTION

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.

NOTE

None of the buffer routines have been hand-coded in assembly. These are additional routines that exploit the SPARC's LDD and STD instructions.

SEE ALSO

bALib, bLib, ansiString


Libraries : Routines

bzeroDoubles( )

NAME

bzeroDoubles( ) - zero out a buffer eight bytes at a time (SPARC)

SYNOPSIS

STATUS bzeroDoubles
    (
    void * buffer, /* 8-byte aligned buffer */
    int    nbytes  /* multiple of 256 bytes */
    )

DESCRIPTION

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.

RETURNS

OK, if it runs to completion.

SEE ALSO

bALib, bzero( )


Libraries : Routines

bfillDoubles( )

NAME

bfillDoubles( ) - fill a buffer with a specified eight-byte pattern (SPARC)

SYNOPSIS

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 */
    )

DESCRIPTION

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.

RETURNS

OK, if it runs to completion.

SEE ALSO

bALib, bfill( )


Libraries : Routines

bcopyDoubles( )

NAME

bcopyDoubles( ) - copy one buffer to another eight bytes at a time (SPARC)

SYNOPSIS

STATUS bcopyDoubles
    (
    void * source,      /* 8-byte aligned source buffer */
    void * destination, /* 8-byte aligned destination buffer */
    int    ndoubles     /* Number of 256-byte quantities */
    )

DESCRIPTION

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.

RETURNS

OK, if it runs to completion.

SEE ALSO

bALib, bcopy( )