filename | src/sh4/sh4trans.h |
changeset | 561:533f6b478071 |
prev | 527:14c9489f647e |
next | 571:9bc09948d0f2 |
author | nkeynes |
date | Fri Jan 04 11:54:17 2008 +0000 (15 years ago) |
branch | lxdream-mmu |
permissions | -rw-r--r-- |
last change | Bring icache partially into line with the mmu, a little less slow with AT off now. |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * SH4->x86 translation module
5 *
6 * Copyright (c) 2005 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 #include "dream.h"
20 #include "mem.h"
22 /** Maximum size of a translated instruction, in bytes. This includes potentially
23 * writing the entire epilogue
24 */
25 #define MAX_INSTRUCTION_SIZE 256
26 /** Maximum size of the translation epilogue (current real size is 116 bytes, so
27 * allows a little room
28 */
29 #define EPILOGUE_SIZE 128
30 /**
32 */
33 uint32_t sh4_xlat_run_slice( uint32_t nanosecs );
35 /**
36 * Translate the specified block of code starting from the specified start
37 * address until the first branch/jump instruction.
38 */
39 void *sh4_translate_basic_block( sh4addr_t start );
41 extern uint8_t *xlat_output;
43 /******************************************************************************
44 * Code generation - these methods must be provided by the
45 * actual code gen (eg sh4x86.c)
46 ******************************************************************************/
48 #define TARGET_X86 1
49 #define TARGET_X86_64 2
51 void sh4_translate_begin_block( sh4addr_t pc );
52 uint32_t sh4_translate_instruction( sh4addr_t pc );
53 void sh4_translate_end_block( sh4addr_t pc );
.