Microchip® Advanced Software Framework

vect_dsp16_neg_at32uc.c File Reference
#include "dsp.h"
#include "preprocessor.h"

Macros

#define ASM_INSTRUCT_COMPACKED(str)   str
 
#define ASM_INSTRUCT_EXTENDED(str)   str
 
#define DSP16_NEG_END_KERNEL_X_FCT(x_num, data)   __attribute__((__naked__)) DSP16_NEG_END_KERNEL_X_FCT__(x_num, data)
 
#define DSP16_NEG_END_KERNEL_X_FCT__(x_num, data)
 
#define DSP16_NEGATE_0(r_vect1, r_vect2)
 
#define DSP16_NEGATE_1(r_vect1, r_vect2)
 
#define DSP16_NEGATE_2(r_vect1, r_vect2)
 
#define DSP16_NEGATE_3(r_vect1, r_vect2)
 

Functions

void dsp16_vect_neg (dsp16_t *vect1, dsp16_t *vect2, int size)
 16-bit fixed point version of the vector negate function. More...
 
static int dsp16_vect_neg_kernel_ext (dsp16_t *vect1, dsp16_t *vect2, int size)
 avr32-uc3 16 bit version More...
 

#define ASM_INSTRUCT_COMPACKED (   str)    str
#define ASM_INSTRUCT_EXTENDED (   str)    str
#define DSP16_NEG_END_KERNEL_X_FCT (   x_num,
  data 
)    __attribute__((__naked__)) DSP16_NEG_END_KERNEL_X_FCT__(x_num, data)
#define DSP16_NEG_END_KERNEL_X_FCT__ (   x_num,
  data 
)
Value:
static void TPASTE2(dsp16_vect_neg_end_kernel_x, x_num)(dsp16_t *vect1, dsp16_t *vect2) \
{ \
__asm__ __volatile__ ( \
"pushm r0-r3, lr\n\t" \
TPASTE2(DSP16_NEGATE_, x_num)(r12, r11) \
"popm r0-r3, pc\n\t" \
); \
}
dsp16_t__ dsp16_t
16-bit signed fixed point type optimized for 32-bit or lower microcontrollers
Definition: dsp_types.h:192
A_ALIGNED dsp16_t vect2[SIZE]
The input signal resulting from a multiplication between a cosine and a sine.
Definition: complex_fft_example.c:92
A_ALIGNED dsp16_complex_t vect1[SIZE]
The output buffer.
Definition: complex_fft_example.c:89
#define TPASTE2(a, b)
Definition: tpaste.h:61
#define DSP16_NEGATE_0 (   r_vect1,
  r_vect2 
)
#define DSP16_NEGATE_1 (   r_vect1,
  r_vect2 
)
Value:
"ld.sh r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
\
"neg r2\n\t" \
"st.h "ASTRINGZ(r_vect1)"[0x0], r2\n\t"
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71
#define DSP16_NEGATE_2 (   r_vect1,
  r_vect2 
)
Value:
"ld.w r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
"mov r3, 0\n\t" \
\
"subhh.w r1, r3:b, r2:b\n\t" \
"subhh.w r0, r3:b, r2:t\n\t" \
"sthh.w "ASTRINGZ(r_vect1)"[0x0], r0:b, r1:b\n\t"
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71
#define DSP16_NEGATE_3 (   r_vect1,
  r_vect2 
)
Value:
"ld.w r2, "ASTRINGZ(r_vect2)"[0x0]\n\t" \
"mov r3, 0\n\t" \
\
"subhh.w r1, r3:b, r2:b\n\t" \
"subhh.w r0, r3:b, r2:t\n\t" \
"sthh.w "ASTRINGZ(r_vect1)"[0x0], r0:b, r1:b\n\t" \
\
"ld.sh r2, "ASTRINGZ(r_vect2)"[0x4]\n\t" \
\
"neg r2\n\t" \
"st.h "ASTRINGZ(r_vect1)"[0x4], r2\n\t"
#define ASTRINGZ(x)
Absolute stringize.
Definition: stringz.h:71

static int dsp16_vect_neg_kernel_ext ( dsp16_t vect1,
dsp16_t vect2,
int  size 
)
static

avr32-uc3 16 bit version

References ASM_INSTRUCT_COMPACKED.

Referenced by dsp16_vect_neg().