Commit 325e3b4c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: echo: remove unneeded USE_MMX defines

This define is never set in the kernel, so remove the code
using it.  This lets us drop the mmx.h file as well.

Cc: David Rowe <david@rowetel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 248ed329
......@@ -62,10 +62,6 @@
can.
*/
#if defined(USE_MMX) || defined(USE_SSE2)
#include "mmx.h"
#endif
/*!
16 bit integer FIR descriptor. This defines the working state for a single
instance of an FIR filter using 16 bit integer coefficients.
......@@ -106,7 +102,7 @@ static inline const int16_t *fir16_create(struct fir16_state_t *fir,
fir->taps = taps;
fir->curr_pos = taps - 1;
fir->coeffs = coeffs;
#if defined(USE_MMX) || defined(USE_SSE2) || defined(__bfin__)
#if defined(USE_SSE2) || defined(__bfin__)
fir->history = kcalloc(2 * taps, sizeof(int16_t), GFP_KERNEL);
#else
fir->history = kcalloc(taps, sizeof(int16_t), GFP_KERNEL);
......@@ -116,7 +112,7 @@ static inline const int16_t *fir16_create(struct fir16_state_t *fir,
static inline void fir16_flush(struct fir16_state_t *fir)
{
#if defined(USE_MMX) || defined(USE_SSE2) || defined(__bfin__)
#if defined(USE_SSE2) || defined(__bfin__)
memset(fir->history, 0, 2 * fir->taps * sizeof(int16_t));
#else
memset(fir->history, 0, fir->taps * sizeof(int16_t));
......@@ -158,38 +154,7 @@ static inline int32_t dot_asm(short *x, short *y, int len)
static inline int16_t fir16(struct fir16_state_t *fir, int16_t sample)
{
int32_t y;
#if defined(USE_MMX)
int i;
union mmx_t *mmx_coeffs;
union mmx_t *mmx_hist;
fir->history[fir->curr_pos] = sample;
fir->history[fir->curr_pos + fir->taps] = sample;
mmx_coeffs = (union mmx_t *)fir->coeffs;
mmx_hist = (union mmx_t *)&fir->history[fir->curr_pos];
i = fir->taps;
pxor_r2r(mm4, mm4);
/* 8 samples per iteration, so the filter must be a multiple of 8 long. */
while (i > 0) {
movq_m2r(mmx_coeffs[0], mm0);
movq_m2r(mmx_coeffs[1], mm2);
movq_m2r(mmx_hist[0], mm1);
movq_m2r(mmx_hist[1], mm3);
mmx_coeffs += 2;
mmx_hist += 2;
pmaddwd_r2r(mm1, mm0);
pmaddwd_r2r(mm3, mm2);
paddd_r2r(mm0, mm4);
paddd_r2r(mm2, mm4);
i -= 8;
}
movq_r2r(mm4, mm0);
psrlq_i2r(32, mm0);
paddd_r2r(mm0, mm4);
movd_r2m(mm4, y);
emms();
#elif defined(USE_SSE2)
#if defined(USE_SSE2)
int i;
union xmm_t *xmm_coeffs;
union xmm_t *xmm_hist;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment