OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr40470-1.c] - Blame information for rev 754

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2
/* { dg-options "-msse4" } */
3
#include <nmmintrin.h>
4
__m128i load (char *);
5
char *
6
foo (char *p1, char *p2,
7
     int bmsk, __m128i mask1, __m128i mask2)
8
{
9
  int len = 0;
10
  __m128i frag1, frag2;
11
  int  cmp_s;
12
  if( !p2[0]) return p1;
13
  if( !p1[0] ) return NULL;
14
  frag2 = load (p2);
15
  frag1 = load (p1);
16
  frag2 = _mm_blendv_epi8(frag2, mask2, mask1);
17
  frag1 = _mm_blendv_epi8(frag1, mask2, mask1);
18
  cmp_s = _mm_cmpistrs(frag2, frag1, 0x0c);
19
  if( cmp_s )
20
    __asm("bsfl %[bmsk], %[len]" : [len] "=r" (len) : [bmsk] "r" (bmsk) );
21
  return p1 + len;
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.