~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to none/tests/amd64/pcmpstr64.c

  • Committer: Benjamin Kerensa
  • Date: 2012-11-21 23:57:58 UTC
  • mfrom: (1.1.16)
  • Revision ID: bkerensa@ubuntu.com-20121121235758-bd1rv5uc5vzov2p6
Merge from debian unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
      UInt   validL  = ~(zmaskL | -zmaskL);  // not(left(zmaskL))
306
306
      UInt   validR  = ~(zmaskR | -zmaskR);  // not(left(zmaskR))
307
307
      for (hi = 0; hi < 16; hi++) {
308
 
         if ((validL & (1 << hi)) == 0)
309
 
            // run off the end of the haystack
310
 
            break;
311
308
         UInt m = 1;
312
309
         for (ni = 0; ni < 16; ni++) {
313
310
            if ((validR & (1 << ni)) == 0) break;
316
313
            if (argL[i] != argR[ni]) { m = 0; break; }
317
314
         }
318
315
         boolRes |= (m << hi);
 
316
         if ((validL & (1 << hi)) == 0)
 
317
            // run off the end of the haystack
 
318
            break;
319
319
      }
320
320
 
321
321
      // boolRes is "pre-invalidated"
573
573
   memcpy(&block[1], argR, sizeof(V128));
574
574
   ULong res = 0, flags = 0;
575
575
   __asm__ __volatile__(
576
 
      "movdqa    0(%2),  %%xmm2"            "\n\t"
577
 
      "movdqa    16(%2), %%xmm11"           "\n\t"
 
576
      "movdqu    0(%2),  %%xmm2"            "\n\t"
 
577
      "movdqu    16(%2), %%xmm11"           "\n\t"
578
578
      "pcmpistri $0x0C,  %%xmm2, %%xmm11"   "\n\t"
579
579
      //"pcmpistrm $0x0C,  %%xmm2, %%xmm11"   "\n\t"
580
580
      //"movd %%xmm0, %%ecx" "\n\t"
639
639
   try_istri(wot,h,s, "1111111111111234", "1111111111111234"); 
640
640
   try_istri(wot,h,s, "a111111111111111", "000000000000000a"); 
641
641
   try_istri(wot,h,s, "b111111111111111", "000000000000000a"); 
 
642
 
 
643
   try_istri(wot,h,s, "b111111111111111", "0000000000000000");
 
644
   try_istri(wot,h,s, "0000000000000000", "0000000000000000");
 
645
   try_istri(wot,h,s, "123456789abcdef1", "0000000000000000");
 
646
   try_istri(wot,h,s, "0000000000000000", "123456789abcdef1");
642
647
}
643
648
 
644
649