1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - r4300.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2002 Hacktarux *
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. *
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. *
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 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #include "memory/tlb.h"
28 extern precomp_instr *PC;
30 extern precomp_block *blocks[0x100000], *actual;
32 extern int stop, llbit, rompause;
33 extern long long int reg[32], hi, lo;
34 extern long long int local_rs;
35 extern unsigned int reg_cop0[32];
36 extern double *reg_cop1_double[32];
37 extern float *reg_cop1_simple[32];
38 extern long long int reg_cop1_fgr_64[32];
39 extern int FCR0, FCR31;
41 extern unsigned int delay_slot, skip_jump, dyna_interp, op;
42 extern unsigned int r4300emu;
43 extern unsigned int next_interupt, CIC_Chip;
44 extern int rounding_mode, trunc_mode, round_mode, ceil_mode, floor_mode;
45 extern unsigned int last_addr;
46 extern char invalid_code[0x100000];
47 extern unsigned int jump_to_address;
48 extern int no_compiled_jump;
49 extern unsigned int count_per_op;
51 void init_blocks(void);
52 void free_blocks(void);
53 void r4300_reset_hard(void);
54 void r4300_reset_soft(void);
55 void r4300_execute(void);
56 void pure_interpreter(void);
57 void compare_core(void);
58 void jump_to_func(void);
59 void update_count(void);
60 int check_cop1_unusable(void);
61 void shuffle_fpr_data(int oldStatus, int newStatus);
62 void set_fpr_pointers(int newStatus);
64 /* Jumps to the given address. This is for the cached interpreter / dynarec. */
65 #define jump_to(a) { jump_to_address = a; jump_to_func(); }
67 /* Jump to the given address. This works for all r4300 emulator, but is slower.
68 * Use this for common code which can be executed from any r4300 emulator. */
69 void generic_jump_to(unsigned int address);
72 #define CORE_PURE_INTERPRETER 0
73 #define CORE_INTERPRETER 1
74 #define CORE_DYNAREC 2
79 #define AUDIO_SECTION 2
80 #define COMPILER_SECTION 3
81 #define IDLE_SECTION 4
84 void start_section(int section_type);
85 void end_section(int section_type);
86 void refresh_stat(void);
88 #define start_section(a)
89 #define end_section(a)
90 #define refresh_stat()