| 1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
| 2 | * Mupen64plus - regcache.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 | #ifndef __REGCACHE_H__ |
| 24 | #define __REGCACHE_H__ |
| 25 | |
| 26 | #include "r4300/recomp.h" |
| 27 | |
| 28 | void init_cache(precomp_instr* start); |
| 29 | void free_registers_move_start(void); |
| 30 | void free_all_registers(void); |
| 31 | void free_register(int reg); |
| 32 | int is64(unsigned int *addr); |
| 33 | int lru_register(void); |
| 34 | int lru_base_register(void); |
| 35 | void set_register_state(int reg, unsigned int *addr, int dirty, int is64bits); |
| 36 | int lock_register(int reg); |
| 37 | void unlock_register(int reg); |
| 38 | int allocate_register_32(unsigned int *addr); |
| 39 | int allocate_register_64(unsigned long long *addr); |
| 40 | int allocate_register_32_w(unsigned int *addr); |
| 41 | int allocate_register_64_w(unsigned long long *addr); |
| 42 | void allocate_register_32_manually(int reg, unsigned int *addr); |
| 43 | void allocate_register_32_manually_w(int reg, unsigned int *addr); |
| 44 | void build_wrappers(precomp_instr*, int, int, precomp_block*); |
| 45 | |
| 46 | #endif /* __REGCACHE_H__ */ |
| 47 | |