/[pcsx2_0.9.7]/trunk/common/include/x86emitter/inlines.inl
ViewVC logotype

Annotation of /trunk/common/include/x86emitter/inlines.inl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (hide annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 11 months ago) by william
File size: 3576 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     /*
17     * ix86 core v0.9.1
18     *
19     * Original Authors (v0.6.2 and prior):
20     * linuzappz <linuzappz@pcsx.net>
21     * alexey silinov
22     * goldfinger
23     * zerofrog(@gmail.com)
24     *
25     * Authors of v0.9.1:
26     * Jake.Stine(@gmail.com)
27     * cottonvibes(@gmail.com)
28     * sudonim(1@gmail.com)
29     */
30    
31     #pragma once
32    
33     // This header module contains functions which, under most circumstances, inline
34     // nicely with constant propagation from the compiler, resulting in little or
35     // no actual codegen in the majority of emitter statements. (common forms include:
36     // RegToReg, PointerToReg, RegToPointer). These cannot be included in the class
37     // definitions in the .h file because of inter-dependencies with other classes.
38     // (score one for C++!!)
39     //
40 william 62 // In order for MSVC to work correctly with __fi on class members,
41 william 31 // however, we need to include these methods into all source files which might
42     // reference them. Without this MSVC generates linker errors. Or, in other words,
43     // global optimization fails to resolve the externals and junk.
44     // (score one for MSVC!)
45    
46     namespace x86Emitter
47     {
48 william 62 #if 0
49 william 31 // --------------------------------------------------------------------------------------
50     // x86Register Method Implementations (inlined!)
51     // --------------------------------------------------------------------------------------
52    
53 william 62 __fi xAddressInfo xAddressReg::operator+( const xAddressReg& right ) const
54 william 31 {
55     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
56     return xAddressInfo( *this, right );
57     }
58    
59 william 62 __fi xAddressInfo xAddressReg::operator+( const xAddressInfo& right ) const
60 william 31 {
61     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
62     return right + *this;
63     }
64    
65 william 62 __fi xAddressInfo xAddressReg::operator+( s32 right ) const
66 william 31 {
67     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
68     return xAddressInfo( *this, right );
69     }
70    
71 william 62 __fi xAddressInfo xAddressReg::operator+( const void* right ) const
72 william 31 {
73     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
74     return xAddressInfo( *this, (s32)right );
75     }
76    
77     // ------------------------------------------------------------------------
78 william 62 __fi xAddressInfo xAddressReg::operator-( s32 right ) const
79 william 31 {
80     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
81     return xAddressInfo( *this, -right );
82     }
83    
84 william 62 __fi xAddressInfo xAddressReg::operator-( const void* right ) const
85 william 31 {
86     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
87     return xAddressInfo( *this, -(s32)right );
88     }
89    
90     // ------------------------------------------------------------------------
91 william 62 __fi xAddressInfo xAddressReg::operator*( u32 right ) const
92 william 31 {
93     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
94     return xAddressInfo( xEmptyReg, *this, right );
95     }
96    
97 william 62 __fi xAddressInfo xAddressReg::operator<<( u32 shift ) const
98 william 31 {
99     pxAssertMsg( Id != -1, "Uninitialized x86 register." );
100     return xAddressInfo( xEmptyReg, *this, 1<<shift );
101     }
102 william 62 #endif
103 william 31 }

  ViewVC Help
Powered by ViewVC 1.1.22