/[pcsx2_0.9.7]/trunk/common/include/x86emitter/implement/simd_comparisons.h
ViewVC logotype

Contents of /trunk/common/include/x86emitter/implement/simd_comparisons.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 10 months ago) by william
File MIME type: text/plain
File size: 4900 byte(s)
committing r3113 initial commit again...
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #pragma once
17
18 namespace x86Emitter {
19
20 struct xImplSimd_MinMax
21 {
22 const xImplSimd_DestRegSSE PS; // packed single precision
23 const xImplSimd_DestRegSSE PD; // packed double precision
24 const xImplSimd_DestRegSSE SS; // scalar single precision
25 const xImplSimd_DestRegSSE SD; // scalar double precision
26 };
27
28 //////////////////////////////////////////////////////////////////////////////////////////
29 //
30 struct xImplSimd_Compare
31 {
32 SSE2_ComparisonType CType;
33
34 void PS( const xRegisterSSE& to, const xRegisterSSE& from ) const;
35 void PS( const xRegisterSSE& to, const ModSibBase& from ) const;
36
37 void PD( const xRegisterSSE& to, const xRegisterSSE& from ) const;
38 void PD( const xRegisterSSE& to, const ModSibBase& from ) const;
39
40 void SS( const xRegisterSSE& to, const xRegisterSSE& from ) const;
41 void SS( const xRegisterSSE& to, const ModSibBase& from ) const;
42
43 void SD( const xRegisterSSE& to, const xRegisterSSE& from ) const;
44 void SD( const xRegisterSSE& to, const ModSibBase& from ) const;
45 };
46
47 //////////////////////////////////////////////////////////////////////////////////////////
48 // Compare scalar floating point values and set EFLAGS (Ordered or Unordered)
49 //
50 struct xImplSimd_COMI
51 {
52 const xImplSimd_DestRegSSE SS;
53 const xImplSimd_DestRegSSE SD;
54 };
55
56
57 //////////////////////////////////////////////////////////////////////////////////////////
58 //
59 struct xImplSimd_PCompare
60 {
61 public:
62 // Compare packed bytes for equality.
63 // If a data element in dest is equal to the corresponding date element src, the
64 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
65 const xImplSimd_DestRegEither EQB;
66
67 // Compare packed words for equality.
68 // If a data element in dest is equal to the corresponding date element src, the
69 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
70 const xImplSimd_DestRegEither EQW;
71
72 // Compare packed doublewords [32-bits] for equality.
73 // If a data element in dest is equal to the corresponding date element src, the
74 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
75 const xImplSimd_DestRegEither EQD;
76
77 // Compare packed signed bytes for greater than.
78 // If a data element in dest is greater than the corresponding date element src, the
79 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
80 const xImplSimd_DestRegEither GTB;
81
82 // Compare packed signed words for greater than.
83 // If a data element in dest is greater than the corresponding date element src, the
84 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
85 const xImplSimd_DestRegEither GTW;
86
87 // Compare packed signed doublewords [32-bits] for greater than.
88 // If a data element in dest is greater than the corresponding date element src, the
89 // corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
90 const xImplSimd_DestRegEither GTD;
91 };
92
93 //////////////////////////////////////////////////////////////////////////////////////////
94 //
95 struct xImplSimd_PMinMax
96 {
97 // Compare packed unsigned byte integers in dest to src and store packed min/max
98 // values in dest.
99 // Operation can be performed on either MMX or SSE operands.
100 const xImplSimd_DestRegEither UB;
101
102 // Compare packed signed word integers in dest to src and store packed min/max
103 // values in dest.
104 // Operation can be performed on either MMX or SSE operands.
105 const xImplSimd_DestRegEither SW;
106
107 // [SSE-4.1] Compare packed signed byte integers in dest to src and store
108 // packed min/max values in dest. (SSE operands only)
109 const xImplSimd_DestRegSSE SB;
110
111 // [SSE-4.1] Compare packed signed doubleword integers in dest to src and store
112 // packed min/max values in dest. (SSE operands only)
113 const xImplSimd_DestRegSSE SD;
114
115 // [SSE-4.1] Compare packed unsigned word integers in dest to src and store
116 // packed min/max values in dest. (SSE operands only)
117 const xImplSimd_DestRegSSE UW;
118
119 // [SSE-4.1] Compare packed unsigned doubleword integers in dest to src and store
120 // packed min/max values in dest. (SSE operands only)
121 const xImplSimd_DestRegSSE UD;
122 };
123
124 } // end namespace x86Emitter
125

  ViewVC Help
Powered by ViewVC 1.1.22