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

Annotation of /trunk/common/include/x86emitter/implement/group3.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (hide annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 10 months ago) by william
File MIME type: text/plain
File size: 3659 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
1 william 31 /* 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     enum G3Type
21     {
22     G3Type_NOT = 2,
23     G3Type_NEG = 3,
24     G3Type_MUL = 4,
25     G3Type_iMUL = 5, // partial implementation, iMul has additional forms in ix86.cpp
26     G3Type_DIV = 6,
27     G3Type_iDIV = 7
28     };
29    
30     // --------------------------------------------------------------------------------------
31     // xImpl_Group3
32     // --------------------------------------------------------------------------------------
33     struct xImpl_Group3
34     {
35     G3Type InstType;
36    
37     void operator()( const xRegisterInt& from ) const;
38 william 62 void operator()( const xIndirect32orLess& from ) const;
39 william 31
40     #if 0
41     template< typename T >
42     void operator()( const xDirectOrIndirect<T>& from ) const
43     {
44     _DoI_helpermess( *this, from );
45     }
46     #endif
47     };
48    
49     // --------------------------------------------------------------------------------------
50     // xImpl_MulDivBase
51     // --------------------------------------------------------------------------------------
52     // This class combines x86 and SSE/SSE2 instructions for iMUL and iDIV.
53     //
54     struct xImpl_MulDivBase
55     {
56     G3Type InstType;
57     u16 OpcodeSSE;
58    
59     void operator()( const xRegisterInt& from ) const;
60 william 62 void operator()( const xIndirect32orLess& from ) const;
61 william 31
62     const xImplSimd_DestRegSSE PS;
63     const xImplSimd_DestRegSSE PD;
64     const xImplSimd_DestRegSSE SS;
65     const xImplSimd_DestRegSSE SD;
66     };
67    
68     // --------------------------------------------------------------------------------------
69     // xImpl_iDiv
70     // --------------------------------------------------------------------------------------
71     struct xImpl_iDiv
72     {
73     void operator()( const xRegisterInt& from ) const;
74 william 62 void operator()( const xIndirect32orLess& from ) const;
75 william 31
76     const xImplSimd_DestRegSSE PS;
77     const xImplSimd_DestRegSSE PD;
78     const xImplSimd_DestRegSSE SS;
79     const xImplSimd_DestRegSSE SD;
80     };
81    
82     // --------------------------------------------------------------------------------------
83     // xImpl_iMul
84     // --------------------------------------------------------------------------------------
85     //
86     struct xImpl_iMul
87     {
88     void operator()( const xRegisterInt& from ) const;
89 william 62 void operator()( const xIndirect32orLess& from ) const;
90 william 31
91     // The following iMul-specific forms are valid for 16 and 32 bit register operands only!
92    
93     void operator()( const xRegister32& to, const xRegister32& from ) const;
94 william 62 void operator()( const xRegister32& to, const xIndirectVoid& src ) const;
95 william 31 void operator()( const xRegister16& to, const xRegister16& from ) const;
96 william 62 void operator()( const xRegister16& to, const xIndirectVoid& src ) const;
97 william 31
98     void operator()( const xRegister32& to, const xRegister32& from, s32 imm ) const;
99 william 62 void operator()( const xRegister32& to, const xIndirectVoid& from, s32 imm ) const;
100 william 31 void operator()( const xRegister16& to, const xRegister16& from, s16 imm ) const;
101 william 62 void operator()( const xRegister16& to, const xIndirectVoid& from, s16 imm ) const;
102 william 31
103     const xImplSimd_DestRegSSE PS;
104     const xImplSimd_DestRegSSE PD;
105     const xImplSimd_DestRegSSE SS;
106     const xImplSimd_DestRegSSE SD;
107     };
108    
109     }

  ViewVC Help
Powered by ViewVC 1.1.22