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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (show annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 10 months ago) by william
File MIME type: text/plain
File size: 2979 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
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 // =====================================================================================================
21 // xImpl_SIMD Types (template free!)
22 // =====================================================================================================
23
24 // ------------------------------------------------------------------------
25 // For implementing SSE-only logic operations that have xmmreg,xmmreg/rm forms only,
26 // like ANDPS/ANDPD
27 //
28 struct xImplSimd_DestRegSSE
29 {
30 u8 Prefix;
31 u16 Opcode;
32
33 void operator()( const xRegisterSSE& to, const xRegisterSSE& from ) const;
34 void operator()( const xRegisterSSE& to, const xIndirectVoid& from ) const;
35 };
36
37 // ------------------------------------------------------------------------
38 // For implementing SSE-only logic operations that have xmmreg,reg/rm,imm forms only
39 // (PSHUFD / PSHUFHW / etc).
40 //
41 struct xImplSimd_DestRegImmSSE
42 {
43 u8 Prefix;
44 u16 Opcode;
45
46 void operator()( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm ) const;
47 void operator()( const xRegisterSSE& to, const xIndirectVoid& from, u8 imm ) const;
48 };
49
50 struct xImplSimd_DestSSE_CmpImm
51 {
52 u8 Prefix;
53 u16 Opcode;
54
55 void operator()( const xRegisterSSE& to, const xRegisterSSE& from, SSE2_ComparisonType imm ) const;
56 void operator()( const xRegisterSSE& to, const xIndirectVoid& from, SSE2_ComparisonType imm ) const;
57 };
58
59 struct xImplSimd_DestRegImmMMX
60 {
61 u8 Prefix;
62 u16 Opcode;
63
64 void operator()( const xRegisterMMX& to, const xRegisterMMX& from, u8 imm ) const;
65 void operator()( const xRegisterMMX& to, const xIndirectVoid& from, u8 imm ) const;
66 };
67
68 // ------------------------------------------------------------------------
69 // For implementing MMX/SSE operations that have reg,reg/rm forms only,
70 // but accept either MM or XMM destinations (most PADD/PSUB and other P arithmetic ops).
71 //
72 struct xImplSimd_DestRegEither
73 {
74 u8 Prefix;
75 u16 Opcode;
76
77 void operator()( const xRegisterSSE& to, const xRegisterSSE& from ) const;
78 void operator()( const xRegisterSSE& to, const xIndirectVoid& from ) const;
79
80 void operator()( const xRegisterMMX& to, const xRegisterMMX& from ) const;
81 void operator()( const xRegisterMMX& to, const xIndirectVoid& from ) const;
82 };
83
84 } // end namespace x86Emitter
85

  ViewVC Help
Powered by ViewVC 1.1.22