ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ivec.h
Revision: 1166
Committed: Tue Oct 26 14:22:36 2021 UTC (4 years ago) by rossy
Content type: text/x-chdr
File size: 1146 byte(s)
Log Message:
Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File Contents

# Content
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 #ifndef _IVEC_H_INCLUDED
7 #define _IVEC_H_INCLUDED
8 #ifndef RC_INVOKED
9
10 #if !defined __cplusplus
11 #error This file is only supported in C++ compilations!
12 #endif
13
14 #include <intrin.h>
15 #include <assert.h>
16 #include <crtdefs.h>
17
18 #pragma pack(push,_CRT_PACKING)
19
20 #if defined(_ENABLE_VEC_DEBUG)
21 #include <iostream>
22 #endif
23
24 #pragma pack(pop)
25
26 #ifdef __SSE__
27
28 #define _MM_QW (*((__int64*)&vec))
29
30 #pragma pack(push,16)
31
32 class M64
33 {
34 protected:
35 __m64 vec;
36 public:
37 M64() {}
38 M64(__m64 mm) { vec = mm; }
39 M64(__int64 mm) { _MM_QW = mm; }
40 M64(int i) { vec = _m_from_int(i); }
41
42 operator __m64() const { return vec; }
43
44 M64& operator&=(const M64 &a) { return *this = (M64) _m_pand(vec,a); }
45 M64& operator|=(const M64 &a) { return *this = (M64) _m_por(vec,a); }
46 M64& operator^=(const M64 &a) { return *this = (M64) _m_pxor(vec,a); }
47 };
48
49 #pragma pack(pop)
50
51 #endif /* ifdef __SSE__ */
52
53 #include <dvec.h>
54
55 #endif
56 #endif
57