Dspf_Blk_Eswap64 - Texas Instruments TMS320C67 DSP Series Programmer's Reference Manual

Library
Hide thumbs Also See for TMS320C67 DSP Series:
Table of Contents

Advertisement

Implementation Notes
Benchmarks

DSPF_blk_eswap64

Function
Arguments
Description
Algorithm
-
The loop is unrolled twice.
-
Multiply instructions are used for shifting left and right.
-
Endianess: This implementation is endian neutral.
-
Interruptibility: This code is interrupt-tolerant but not interruptible.
Cycles
1.5 * nx + 14
For nx=64 cycles=110
For nx=32 cycles=62
Code size
224
(in bytes)
Endian swap a block of 64-bit values
void DSPF_blk_eswap64 (void *restrict x, void *restrict r, int nx)
x[nx]
Pointer to source data.
r[nx]
Pointer to destination array.
nx
Number of doubles (64-bit values) to swap.
The data in the x[] array is endian swapped, meaning that the byte-order of the
bytes within each double word of the r[] array is reversed. This is meant to facili-
tate moving big-endian data to a little-endian system or vice versa. When the
r pointer is non-NULL, the endian swap occurs out-of-place, similar to a block
move. When the r pointer is NULL, the endian swap occurs in place, allowing
the swap to occur without using any additional storage.
This is the C equivalent of the assembly code. Note that the assembly code
is hand optimized and restrictions may apply.
void DSPF_blk_eswap64(void *restrict x, void *restrict r, int
nx)
{
int i;
char *_src, *_dst;
if (r)
DSPF_blk_eswap64
DSPLIB Reference
4-73

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents