Permalink
Browse files

Fix bad C code

  • Loading branch information...
1 parent 600710b commit 0d95fff98efeebdc11c28ae57dd13b7cd29a8848 @pkhuong committed May 20, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 primops/binary-double-predicate.inc
  2. +3 −3 primops/unary-unsigned-reduce.inc
  3. +1 −1 primops/vm-ops.c
@@ -50,7 +50,7 @@ void NAME (void ** values, unsigned * properties,
for (unsigned ii = 0; ii+4 <= packed_size; ii+=4)
for (unsigned j = 0; j < 4; j++)
- BODY(i+j);
+ BODY(ii+j);
for (unsigned ii = (packed_size&(-4U)); ii < packed_size; ii++)
BODY(ii);
#undef BODY
@@ -39,15 +39,15 @@ void NAME (void ** values, unsigned * properties,
acc0 = OP(acc0, x);
}
{
- v4u x = psrc[i];
+ v4u x = psrc[i+1];
acc1 = OP(acc1, x);
}
{
- v4u x = psrc[i];
+ v4u x = psrc[i+2];
acc2 = OP(acc2, x);
}
{
- v4u x = psrc[i];
+ v4u x = psrc[i+3];
acc3 = OP(acc3, x);
}
}
View
@@ -190,7 +190,7 @@ void merge32 (void ** values, unsigned * properties,
{
unsigned packed_size = size/4;
v4u * restrict pmask = (v4u*)mask;
- v4u * restrict psel = (v4u*)mask;
+ v4u * restrict psel = (v4u*)select;
v4u * restrict pdst = (v4u*)dst;
v4u * restrict px = (v4u*)x;
v4u * restrict py = (v4u*)y;

0 comments on commit 0d95fff

Please sign in to comment.