1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - recomp.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 #if defined(__x86_64__)
27 #include "x86_64/assemble_struct.h"
29 #include "x86/assemble_struct.h"
32 typedef struct _precomp_instr
45 unsigned int inst_index;
68 unsigned int addr; /* word-aligned instruction address in r4300 address space */
69 unsigned int local_addr; /* byte offset to start of corresponding x86_64 instructions, from start of code block */
70 reg_cache_struct reg_cache_infos;
73 typedef struct _precomp_block
79 unsigned int code_length;
80 unsigned int max_code_length;
85 //unsigned char md5[16];
89 void recompile_block(int *source, precomp_block *block, unsigned int func);
90 void init_block(precomp_block *block);
91 void free_block(precomp_block *block);
92 void recompile_opcode(void);
93 void prefetch_opcode(unsigned int op, unsigned int nextop);
95 void dyna_start(void *code);
97 void *realloc_exec(void *ptr, size_t oldsize, size_t newsize);
99 extern precomp_instr *dst; /* precomp_instr structure for instruction being recompiled */
101 #if defined(__x86_64__)
102 #include "x86_64/assemble.h"
103 #include "x86_64/regcache.h"
105 #include "x86/assemble.h"
106 #include "x86/regcache.h"