drc: try even more to not compile code as 64bit
[pcsx_rearmed.git] / libpcsxcore / ix86_64 / iGte.h
1 /***************************************************************************
2  *   Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team              *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA.           *
18  ***************************************************************************/
19
20 #ifndef __IGTE_H__
21 #define __IGTE_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "../r3000a.h"
28 #include "../psxmem.h"
29
30 #define CP2_FUNC(f) \
31 void gte##f(); \
32 static void rec##f() { \
33         iFlushRegs(); \
34         MOV32ItoM((uptr)&psxRegs.code, (u32)psxRegs.code); \
35         CALLFunc((uptr)gte##f); \
36 /*      branch = 2; */\
37 }
38
39 #define CP2_FUNCNC(f) \
40 void gte##f(); \
41 static void rec##f() { \
42         iFlushRegs(); \
43         CALLFunc((uptr)gte##f); \
44 /*      branch = 2; */\
45 }
46
47 CP2_FUNC(MFC2);
48 CP2_FUNC(MTC2);
49 CP2_FUNC(CFC2);
50 CP2_FUNC(CTC2);
51 CP2_FUNC(LWC2);
52 CP2_FUNC(SWC2);
53 CP2_FUNCNC(RTPS);
54 CP2_FUNC(OP);
55 CP2_FUNCNC(NCLIP);
56 CP2_FUNC(DPCS);
57 CP2_FUNC(INTPL);
58 CP2_FUNC(MVMVA);
59 CP2_FUNCNC(NCDS);
60 CP2_FUNCNC(NCDT);
61 CP2_FUNCNC(CDP);
62 CP2_FUNCNC(NCCS);
63 CP2_FUNCNC(CC);
64 CP2_FUNCNC(NCS);
65 CP2_FUNCNC(NCT);
66 CP2_FUNC(SQR);
67 CP2_FUNC(DCPL);
68 CP2_FUNCNC(DPCT);
69 CP2_FUNCNC(AVSZ3);
70 CP2_FUNCNC(AVSZ4);
71 CP2_FUNCNC(RTPT);
72 CP2_FUNC(GPF);
73 CP2_FUNC(GPL);
74 CP2_FUNCNC(NCCT);
75
76 #ifdef __cplusplus
77 }
78 #endif
79 #endif