CORE: Some more try on new_dynarec (no effect it seems
[mupen64plus-pandora.git] / source / mupen64plus-core / src / r4300 / r4300.h
CommitLineData
451ab91e 1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - r4300.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2002 Hacktarux *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
21
22#ifndef R4300_H
23#define R4300_H
24
25#include "recomp.h"
26#include "memory/tlb.h"
27
28extern precomp_instr *PC;
29
30extern precomp_block *blocks[0x100000], *actual;
31
32extern int stop, llbit, rompause;
33extern long long int reg[32], hi, lo;
34extern long long int local_rs;
35extern unsigned int reg_cop0[32];
36extern double *reg_cop1_double[32];
37extern float *reg_cop1_simple[32];
38extern long long int reg_cop1_fgr_64[32];
39extern int FCR0, FCR31;
40extern tlb tlb_e[32];
41extern unsigned int delay_slot, skip_jump, dyna_interp, op;
451ab91e 42extern unsigned int r4300emu;
43extern unsigned int next_interupt, CIC_Chip;
44extern int rounding_mode, trunc_mode, round_mode, ceil_mode, floor_mode;
45extern unsigned int last_addr;
46extern char invalid_code[0x100000];
47extern unsigned int jump_to_address;
48extern int no_compiled_jump;
49
50void init_blocks(void);
51void free_blocks(void);
52void r4300_reset_hard(void);
53void r4300_reset_soft(void);
54void r4300_execute(void);
55void pure_interpreter(void);
56void compare_core(void);
57void jump_to_func(void);
58void update_count(void);
59int check_cop1_unusable(void);
60void shuffle_fpr_data(int oldStatus, int newStatus);
61void set_fpr_pointers(int newStatus);
62
63/* Jumps to the given address. This is for the cached interpreter / dynarec. */
64#define jump_to(a) { jump_to_address = a; jump_to_func(); }
65
66/* Jump to the given address. This works for all r4300 emulator, but is slower.
67 * Use this for common code which can be executed from any r4300 emulator. */
68void generic_jump_to(unsigned int address);
69
70// r4300 emulators
71#define CORE_PURE_INTERPRETER 0
72#define CORE_INTERPRETER 1
73#define CORE_DYNAREC 2
74
75// profiling
76#define ALL_SECTION 0
77#define GFX_SECTION 1
78#define AUDIO_SECTION 2
79#define COMPILER_SECTION 3
80#define IDLE_SECTION 4
81
82#ifdef PROFILE
83 void start_section(int section_type);
84 void end_section(int section_type);
85 void refresh_stat(void);
86#else
87 #define start_section(a)
88 #define end_section(a)
89 #define refresh_stat()
90#endif
91
92#endif /* R4300_H */
93