Strange warning "string length" in noatun/library/noatunarts/fft.c
Roger Larsson
roger.larsson at skelleftea.mail.telia.com
Tue Jan 14 19:07:28 GMT 2003
Got a strange warning when compiling kdemultimedia
>>fft.c:124:warning string length '1564' is greater than '509' ISO C89
compilers are required to support<<
This is the function in question, I indicated the line with HERE:
void BandPassSSE(struct BandPassInfo *ip, float *inbuffer, float *outbuffer,
unsigned long samples)
{
#ifdef HAVE_X86_SSE
__asm__(
"testl %0, %0 \n"
"jz .l5 \n" /* if (!samples) */
"movl %1, %%ecx \n"
"movups 0x10(%%ecx), %%xmm2 \n" /* ip->a[0] */
"shufps $0x00, %%xmm2, %%xmm2 \n" /* ip->a[0] all over xmm3 */
"movups 0x14(%%ecx), %%xmm4 \n" /* xmm4 = {ip->a[1], ip->a[2], ip->b}
*/
"movups 0x24(%%ecx), %%xmm5 \n" /* xmm5 = {ip->bufferX, ip->bufferY}
*/
"xorl %%ecx, %%ecx \n" /* i = 0 */
"movl $1, %%edx \n" /* j = 1 */
"prefetcht0 (%2) \n"
".l1: \n"
"decl %%edx \n" /* --j */
"jnz .l4 \n" /* if (j) */
/* only load single values if less than four remain in inbuffer */
"testl $0xfffffffc, %0 \n"
"jnz .l2 \n"
"movss (%2, %%ecx, 4), %%xmm3\n"
"movl $1, %%edx \n"
"jmp .l3 \n"
".l2: \n"
/* {inbuffer[i], inbuffer[i+1], inbuffer[i+2], inbuffer[i+3]} * ip->a[0] */
"movups (%2, %%ecx, 4), %%xmm3\n"
"movl $3, %%edx \n" /* j = 3 */
".l3: \n"
"movaps %%xmm3, %%xmm6 \n"
"mulps %%xmm2, %%xmm3 \n"
".l4: \n"
/* {ip->a[1], ip->a[2], ip->b} * {ip->bufferX, ip->bufferY} */
"movaps %%xmm4, %%xmm0 \n"
"mulps %%xmm5, %%xmm0 \n"
"movaps %%xmm0, %%xmm1 \n"
/* xmm0 = {xmm0[0] + xmm0[1], <unused>, xmm0[2] + xmm0[3], <unused>} */
"shufps $0xb1, %%xmm0, %%xmm1 \n"
"addps %%xmm1, %%xmm0 \n"
/* xmm0[0] -= xmm0[2] */
"movhlps %%xmm0, %%xmm1 \n"
"subss %%xmm1, %%xmm0 \n"
"addss %%xmm3, %%xmm0 \n" /* xmm0[0] += inbuffer[i] * ip->a[0]
*/
"movss %%xmm0, (%3, %%ecx, 4)\n" /* outbuffer[i] = xmm0[0] */
/* xmm5 = {inbuffer[i], xmm5[0], outbuffer[i], xmm5[2]} */
"shufps $0x24, %%xmm5, %%xmm0 \n"
"shufps $0x81, %%xmm0, %%xmm5 \n"
"movss %%xmm6, %%xmm5 \n"
/* right-shift xmm3 (inbuffer * ip->a[0]) and xmm6 (inbuffer) */
"shufps $0x39, %%xmm3, %%xmm3 \n"
"shufps $0x39, %%xmm6, %%xmm6 \n"
"incl %%ecx \n" /* ++i */
"decl %0 \n"
"jnz .l1 \n"
"movl %1,%%ecx \n"
"movups %%xmm5, 0x24(%%ecx) \n" /* {ip->bufferX, ip->bufferY} = xmm5
*/
"emms \n"
".l5: \n"
: <=== HERE
: "r" (samples), /* %0 */
"m" (ip), /* %1 */
"r" (inbuffer), /* %2 */
"r" (outbuffer) /* %3 */
: "ecx", "edx");
#endif
}
--
Roger Larsson
SkellefteƄ
Sweden
More information about the kde-multimedia
mailing list