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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse-15.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -msse -msse2" } */
3
/* { dg-require-effective-target sse2 } */
4
 
5
/* Test that the intrinsics compile with optimization.  These were not
6
   tested in i386-sse-[12].c because these builtins require immediate
7
   operands.  */
8
 
9
#include <xmmintrin.h>
10
 
11
__m128
12
test_shuf (void)
13
{
14
  __m128 a = _mm_set1_ps (1.0);
15
  __m128 b = _mm_set1_ps (2.0);
16
  return _mm_shuffle_ps (a, b, _MM_SHUFFLE (0,1,2,3));
17
}
18
 
19
__m64
20
test_ins_ext (__m64 a)
21
{
22
  return _mm_insert_pi16 (a, _mm_extract_pi16 (a, 0), 3);
23
}
24
 
25
__m64
26
test_shuf2 (__m64 a)
27
{
28
  return _mm_shuffle_pi16 (a, 0xA5);
29
}
30
 
31
void
32
test_prefetch (char *p)
33
{
34
  _mm_prefetch (p, _MM_HINT_T0);
35
  _mm_prefetch (p+4, _MM_HINT_T1);
36
  _mm_prefetch (p+8, _MM_HINT_T2);
37
  _mm_prefetch (p+12, _MM_HINT_NTA);
38
}
39
 
40
__m128i
41
test__slli_si128 (__m128i a)
42
{
43
  return _mm_slli_si128 (a, 3);
44
}
45
 
46
__m128i
47
test__srli_si128 (__m128i a)
48
{
49
  return _mm_srli_si128 (a, 3);
50
}

powered by: WebSVN 2.1.0

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