Core commit. Compile and run on the OpenPandora
[mupen64plus-pandora.git] / source / mupen64plus-core / src / r4300 / x86_64 / gtlb.c
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  *   Mupen64plus - gtlb.c                                                  *
3  *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
4  *   Copyright (C) 2007 Richard Goedeken (Richard42)                       *
5  *   Copyright (C) 2002 Hacktarux                                          *
6  *                                                                         *
7  *   This program is free software; you can redistribute it and/or modify  *
8  *   it under the terms of the GNU General Public License as published by  *
9  *   the Free Software Foundation; either version 2 of the License, or     *
10  *   (at your option) any later version.                                   *
11  *                                                                         *
12  *   This program is distributed in the hope that it will be useful,       *
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15  *   GNU General Public License for more details.                          *
16  *                                                                         *
17  *   You should have received a copy of the GNU General Public License     *
18  *   along with this program; if not, write to the                         *
19  *   Free Software Foundation, Inc.,                                       *
20  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
21  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
22
23 #include <stdio.h>
24
25 #include "assemble.h"
26
27 #include "r4300/recomph.h"
28 #include "r4300/r4300.h"
29 #include "r4300/ops.h"
30
31 void gentlbwi(void)
32 {
33 #if defined(COUNT_INSTR)
34    inc_m32rel(&instr_count[104]);
35 #endif
36    gencallinterp((unsigned long long)cached_interpreter_table.TLBWI, 0);
37    /*dst->local_addr = code_length;
38    mov_m32_imm32((void *)(&PC), (unsigned int)(dst));
39    mov_reg32_imm32(EAX, (unsigned int)(TLBWI));
40    call_reg32(EAX);
41    genupdate_system(0);*/
42 }
43
44 void gentlbp(void)
45 {
46 #if defined(COUNT_INSTR)
47    inc_m32rel(&instr_count[105]);
48 #endif
49    gencallinterp((unsigned long long)cached_interpreter_table.TLBP, 0);
50    /*dst->local_addr = code_length;
51    mov_m32_imm32((void *)(&PC), (unsigned int)(dst));
52    mov_reg32_imm32(EAX, (unsigned int)(TLBP));
53    call_reg32(EAX);
54    genupdate_system(0);*/
55 }
56
57 void gentlbr(void)
58 {
59 #if defined(COUNT_INSTR)
60    inc_m32rel(&instr_count[106]);
61 #endif
62    gencallinterp((unsigned long long)cached_interpreter_table.TLBR, 0);
63    /*dst->local_addr = code_length;
64    mov_m32_imm32((void *)(&PC), (unsigned int)(dst));
65    mov_reg32_imm32(EAX, (unsigned int)(TLBR));
66    call_reg32(EAX);
67    genupdate_system(0);*/
68 }
69
70 void generet(void)
71 {
72 #if defined(COUNT_INSTR)
73    inc_m32rel(&instr_count[108]);
74 #endif
75    gencallinterp((unsigned long long)cached_interpreter_table.ERET, 1);
76    /*dst->local_addr = code_length;
77    mov_m32_imm32((void *)(&PC), (unsigned int)(dst));
78    genupdate_system(0);
79    mov_reg32_imm32(EAX, (unsigned int)(ERET));
80    call_reg32(EAX);
81    mov_reg32_imm32(EAX, (unsigned int)(jump_code));
82    jmp_reg32(EAX);*/
83 }
84
85 void gentlbwr(void)
86 {
87 #if defined(COUNT_INSTR)
88    inc_m32rel(&instr_count[107]);
89 #endif
90    gencallinterp((unsigned long long)cached_interpreter_table.TLBWR, 0);
91 }
92