Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / other / i386-11.C
blobf28cfcfa14b02bff6c4077b0e467764cce44dac0
1 // PR target/80799
2 // { dg-do compile { target i?86-*-* x86_64-*-* } }
3 // { dg-require-effective-target c++11 }
4 // { dg-options "-O2 -msse2" }
5 /* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
7 #include <xmmintrin.h>
8 #include <emmintrin.h>
10 class alignas(16) GSVector4i
12 public:
13     __m128i m;
15         explicit GSVector4i(__m128i m)
16         {
17                 this->m = m;
18         }
20         static void storel(void* p, const GSVector4i& v)
21         {
22                 _mm_storel_epi64((__m128i*)p, v.m);
23         }
25         static GSVector4i loadl(const void* p)
26         {
27                 return GSVector4i(_mm_loadl_epi64((__m128i*)p));
28         }
30         bool eq(const GSVector4i& v) const
31         {
32                 return _mm_movemask_epi8(_mm_cmpeq_epi32(m, v.m)) == 0xffff;
33         }
37 union GIFRegTRXPOS
39         unsigned long long u64;
40         void operator = (const GSVector4i& v) {GSVector4i::storel(this, v);}
41         bool operator != (const union GIFRegTRXPOS& r) const {return !((GSVector4i)r).eq(*this);}
42         operator GSVector4i() const {return GSVector4i::loadl(this);}
45 extern void dummy_call();
46 extern GIFRegTRXPOS TRXPOS;
48 void GIFRegHandlerTRXPOS(const GIFRegTRXPOS&  p)
50         if(p != TRXPOS)
51         {
52                 dummy_call();
53         }
55         TRXPOS = (GSVector4i)p;
58 // { dg-final { scan-assembler-not "%mm" } }