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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (hide annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 2866 byte(s)
committing r3113 initial commit again...
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     // Implementations found here: TEST + BTS/BT/BTC/BTR + BSF/BSR! (for lack of better location)
19    
20     namespace x86Emitter {
21    
22     // --------------------------------------------------------------------------------------
23     // xImpl_Test
24     // --------------------------------------------------------------------------------------
25     //
26     struct xImpl_Test
27     {
28     void operator()( const xRegister8& to, const xRegister8& from ) const;
29     void operator()( const xRegister16& to, const xRegister16& from ) const;
30     void operator()( const xRegister32& to, const xRegister32& from ) const;
31     void operator()( const ModSib32orLess& dest, int imm ) const;
32     void operator()( const xRegisterInt& to, int imm ) const;
33     };
34    
35     enum G8Type
36     {
37     G8Type_BT = 4,
38     G8Type_BTS,
39     G8Type_BTR,
40     G8Type_BTC,
41     };
42    
43     // --------------------------------------------------------------------------------------
44     // BSF / BSR
45     // --------------------------------------------------------------------------------------
46     // 16/32 operands are available. No 8 bit ones, not that any of you cared, I bet.
47     //
48     struct xImpl_BitScan
49     {
50     // 0xbc [fwd] / 0xbd [rev]
51     u16 Opcode;
52    
53     void operator()( const xRegister32& to, const xRegister32& from ) const;
54     void operator()( const xRegister16& to, const xRegister16& from ) const;
55     void operator()( const xRegister16or32& to, const ModSibBase& sibsrc ) const;
56     };
57    
58     // --------------------------------------------------------------------------------------
59     // xImpl_Group8
60     // --------------------------------------------------------------------------------------
61     // Bit Test Instructions - Valid on 16/32 bit instructions only.
62     //
63     struct xImpl_Group8
64     {
65     G8Type InstType;
66    
67     void operator()( const xRegister32& bitbase, const xRegister32& bitoffset ) const;
68     void operator()( const xRegister16& bitbase, const xRegister16& bitoffset ) const;
69     void operator()( const xRegister16or32& bitbase, u8 bitoffset ) const;
70    
71     void operator()( const ModSibBase& bitbase, const xRegister16or32& bitoffset ) const;
72     void operator()( const ModSib32& bitbase, u8 bitoffset ) const;
73     void operator()( const ModSib16& bitbase, u8 bitoffset ) const;
74     };
75    
76     } // End namespace x86Emitter
77    

  ViewVC Help
Powered by ViewVC 1.1.22