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/] [funcspec-8.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* Test whether using target specific options, we can use the x86 builtin
2
   functions in functions with the appropriate function specific options.  */
3
/* { dg-do compile } */
4
/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
5
/* { dg-options "-O2 -march=k8 -mfpmath=sse" } */
6
 
7
typedef float     __m128  __attribute__ ((__vector_size__ (16), __may_alias__));
8
typedef double    __m128d __attribute__ ((__vector_size__ (16), __may_alias__));
9
typedef int       __m128w __attribute__ ((__vector_size__ (16), __may_alias__));
10
typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
11
 
12
#ifdef __SSE3__
13
#error "-msse3 should not be set for this test"
14
#endif
15
 
16
__m128d sse3_hsubpd (__m128d a, __m128d b) __attribute__((__target__("sse3")));
17
__m128d generic_hsubpd (__m128d a, __m128d b);
18
 
19
__m128d
20
sse3_hsubpd (__m128d a, __m128d b)
21
{
22
  return __builtin_ia32_hsubpd (a, b);
23
}
24
 
25
__m128d
26
generic_hsubpd (__m128d a, __m128d b)
27
{
28
  return __builtin_ia32_hsubpd (a, b);                  /* { dg-error "needs isa option" } */
29
}
30
 
31
#ifdef __SSSE3__
32
#error "-mssse3 should not be set for this test"
33
#endif
34
 
35
__m128w ssse3_psignd128 (__m128w a, __m128w b) __attribute__((__target__("ssse3")));
36
__m128w generic_psignd (__m128w ab, __m128w b);
37
 
38
__m128w
39
ssse3_psignd128 (__m128w a, __m128w b)
40
{
41
  return __builtin_ia32_psignd128 (a, b);
42
}
43
 
44
__m128w
45
generic_psignd128 (__m128w a, __m128w b)
46
{
47
  return __builtin_ia32_psignd128 (a, b);               /* { dg-error "needs isa option" } */
48
}
49
 
50
#ifdef __SSE4_1__
51
#error "-msse4.1 should not be set for this test"
52
#endif
53
 
54
__m128d sse4_1_blendvpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("sse4.1")));
55
__m128d generic_blendvpd (__m128d a, __m128d b, __m128d c);
56
 
57
__m128d
58
sse4_1_blendvpd  (__m128d a, __m128d b, __m128d c)
59
{
60
  return __builtin_ia32_blendvpd (a, b, c);
61
}
62
 
63
__m128d
64
generic_blendvpd  (__m128d a, __m128d b, __m128d c)
65
{
66
  return __builtin_ia32_blendvpd (a, b, c);             /* { dg-error "needs isa option" } */
67
}
68
 
69
#ifdef __SSE4_2__
70
#error "-msse4.2 should not be set for this test"
71
#endif
72
 
73
__m128i sse4_2_pcmpgtq (__m128i a, __m128i b) __attribute__((__target__("sse4.2")));
74
__m128i generic_pcmpgtq (__m128i ab, __m128i b);
75
 
76
__m128i
77
sse4_2_pcmpgtq (__m128i a, __m128i b)
78
{
79
  return __builtin_ia32_pcmpgtq (a, b);
80
}
81
 
82
__m128i
83
generic_pcmpgtq (__m128i a, __m128i b)
84
{
85
  return __builtin_ia32_pcmpgtq (a, b);                 /* { dg-error "needs isa option" } */
86
}
87
 
88
#ifdef __SSE4A__
89
#error "-msse4a should not be set for this test"
90
#endif
91
 
92
__m128i sse4_2_insertq (__m128i a, __m128i b) __attribute__((__target__("sse4a")));
93
__m128i generic_insertq (__m128i ab, __m128i b);
94
 
95
__m128i
96
sse4_2_insertq (__m128i a, __m128i b)
97
{
98
  return __builtin_ia32_insertq (a, b);
99
}
100
 
101
__m128i
102
generic_insertq (__m128i a, __m128i b)
103
{
104
  return __builtin_ia32_insertq (a, b);                 /* { dg-error "needs isa option" } */
105
}
106
 
107
#ifdef __FMA4__
108
#error "-mfma4 should not be set for this test"
109
#endif
110
 
111
__m128d fma4_fmaddpd (__m128d a, __m128d b, __m128d c) __attribute__((__target__("fma4")));
112
__m128d generic_fmaddpd (__m128d a, __m128d b, __m128d c);
113
 
114
__m128d
115
fma4_fmaddpd  (__m128d a, __m128d b, __m128d c)
116
{
117
  return __builtin_ia32_vfmaddpd (a, b, c);
118
}
119
 
120
__m128d
121
generic_fmaddpd  (__m128d a, __m128d b, __m128d c)
122
{
123
  return __builtin_ia32_vfmaddpd (a, b, c);             /* { dg-error "needs isa option" } */
124
}
125
 
126
#ifdef __AES__
127
#error "-maes should not be set for this test"
128
#endif
129
 
130
__m128i aes_aesimc128 (__m128i a) __attribute__((__target__("aes")));
131
__m128i generic_aesimc128 (__m128i a);
132
 
133
__m128i
134
aes_aesimc128 (__m128i a)
135
{
136
  return __builtin_ia32_aesimc128 (a);
137
}
138
 
139
__m128i
140
generic_aesimc128 (__m128i a)
141
{
142
  return __builtin_ia32_aesimc128 (a);                  /* { dg-error "needs isa option" } */
143
}
144
 
145
#ifdef __PCLMUL__
146
#error "-mpclmul should not be set for this test"
147
#endif
148
 
149
__m128i pclmul_pclmulqdq128 (__m128i a, __m128i b) __attribute__((__target__("pclmul")));
150
__m128i generic_pclmulqdq128 (__m128i a, __m128i b);
151
 
152
__m128i
153
pclmul_pclmulqdq128 (__m128i a, __m128i b)
154
{
155
  return __builtin_ia32_pclmulqdq128 (a, b, 5);
156
}
157
 
158
__m128i
159
generic_pclmulqdq128 (__m128i a, __m128i b)
160
{
161
  return __builtin_ia32_pclmulqdq128 (a, b, 5);         /* { dg-error "needs isa option" } */
162
}

powered by: WebSVN 2.1.0

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