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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (show annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 2062 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 enum G2Type
21 {
22 G2Type_ROL=0,
23 G2Type_ROR,
24 G2Type_RCL,
25 G2Type_RCR,
26 G2Type_SHL,
27 G2Type_SHR,
28 G2Type_Unused,
29 G2Type_SAR
30 };
31
32 // --------------------------------------------------------------------------------------
33 // xImpl_Group2
34 // --------------------------------------------------------------------------------------
35 // Group 2 (shift) instructions have no Sib/ModRM forms.
36 // Optimization Note: For Imm forms, we ignore the instruction if the shift count is zero.
37 // This is a safe optimization since any zero-value shift does not affect any flags.
38 //
39 struct xImpl_Group2
40 {
41 G2Type InstType;
42
43 void operator()( const xRegisterInt& to, const xRegisterCL& from ) const;
44 void operator()( const xIndirect32orLess& to, const xRegisterCL& from ) const;
45 void operator()( const xRegisterInt& to, u8 imm ) const;
46 void operator()( const xIndirect32orLess& to, u8 imm ) const;
47
48 #if 0
49 // ------------------------------------------------------------------------
50 template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, u8 imm ) const
51 {
52 _DoI_helpermess( *this, to, imm );
53 }
54
55 template< typename T > __noinline void operator()( const xDirectOrIndirect<T>& to, const xRegisterCL& from ) const
56 {
57 _DoI_helpermess( *this, to, from );
58 }
59 #endif
60 };
61
62 } // End namespace x86Emitter

  ViewVC Help
Powered by ViewVC 1.1.22