Update of /cvsroot/pure-data/externals/tb/volctl~
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15338
Modified Files:
volctl~.c
Log Message:
improvement for factor 1
Index: volctl~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/tb/volctl~/volctl~.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** volctl~.c 8 Jan 2005 22:13:53 -0000 1.3
--- volctl~.c 24 Jan 2005 21:22:31 -0000 1.4
***************
*** 54,58 ****
void *volctl_new(t_symbol *s, int argc, t_atom *argv)
{
! if (argc > 2) post("volctl~: extra arguments ignored");
t_volctl *x = (t_volctl *)pd_new(volctl_class);
--- 54,58 ----
void *volctl_new(t_symbol *s, int argc, t_atom *argv)
{
! if (argc > 3) post("volctl~: extra arguments ignored");
t_volctl *x = (t_volctl *)pd_new(volctl_class);
***************
*** 172,175 ****
--- 172,176 ----
}
+
static t_int *volctl_perf_simd(t_int *w)
{
***************
*** 230,234 ****
else
{
! if(x->x_target)
asm(
".set T_FLOAT,4 \n"
--- 231,281 ----
else
{
! switch(x->x_target)
! {
! case 0:
! asm(
! ".set T_FLOAT,4 \n"
!
! "xorps %%xmm0, %%xmm0 \n"
! "shrl $4, %1 \n"
!
! "1: \n"
! "movaps %%xmm0, (%0) \n"
! "movaps %%xmm0, 4*T_FLOAT(%0) \n"
! "movaps %%xmm0, 8*T_FLOAT(%0) \n"
! "movaps %%xmm0, 12*T_FLOAT(%0) \n"
! "addl $16*T_FLOAT, %0 \n"
! "loop 1b \n"
! :
! :"r"(out),
! "c"(w[4])
! : "%xmm0");
! break;
!
! case 1:
! asm(
! ".set T_FLOAT,4 \n"
!
! "shrl $4, %1 \n"
!
! "1: \n"
! "movaps (%1), %%xmm0 \n"
! "movaps 4*T_FLOAT(%1), %%xmm1 \n"
! "movaps 8*T_FLOAT(%1), %%xmm2 \n"
! "movaps 12*T_FLOAT(%1), %%xmm3 \n"
! "movaps %%xmm0, (%2) \n"
! "movaps %%xmm1, 4*T_FLOAT(%2) \n"
! "movaps %%xmm2, 8*T_FLOAT(%2) \n"
! "movaps %%xmm3, 12*T_FLOAT(%2) \n"
!
! "addl $16*T_FLOAT,%1 \n"
! "addl $16*T_FLOAT,%2 \n"
! "loop 1b \n"
! :
! :"c"(w[4]),"r"(in),"r"(out)
! :"%xmm0","%xmm1","%xmm2","%xmm3");
! break;
!
! default:
asm(
".set T_FLOAT,4 \n"
***************
*** 258,280 ****
"c"(w[4]),"r"(&(t_float)(x->x_target))
: "%xmm0", "%xmm1","%xmm2","%xmm3","%xmm4");
! else
! asm(
! ".set T_FLOAT,4 \n"
!
! "xorps %%xmm0, %%xmm0 \n"
! "shrl $4, %1 \n"
!
! "1: \n"
! "movaps %%xmm0, (%0) \n"
! "movaps %%xmm0, 4*T_FLOAT(%0) \n"
! "movaps %%xmm0, 8*T_FLOAT(%0) \n"
! "movaps %%xmm0, 12*T_FLOAT(%0) \n"
! "addl $16*T_FLOAT, %0 \n"
! "loop 1b \n"
! :
! :"r"(out),
! "c"(w[4])
! : "%xmm0");
!
}
return (w+5);
--- 305,309 ----
"c"(w[4]),"r"(&(t_float)(x->x_target))
: "%xmm0", "%xmm1","%xmm2","%xmm3","%xmm4");
! }
}
return (w+5);