filename | src/sh4/sh4trans.h |
changeset | 359:c588dce7ebde |
next | 389:3e354da62264 |
author | nkeynes |
date | Thu Aug 23 12:33:27 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Commit decoder generator Translator work in progress Fix mac.l, mac.w in emu core |
file | annotate | diff | log | raw |
nkeynes@359 | 1 | /** |
nkeynes@359 | 2 | * $Id: sh4trans.h,v 1.1 2007-08-23 12:33:27 nkeynes Exp $ |
nkeynes@359 | 3 | * |
nkeynes@359 | 4 | * SH4->x86 translation module |
nkeynes@359 | 5 | * |
nkeynes@359 | 6 | * Copyright (c) 2005 Nathan Keynes. |
nkeynes@359 | 7 | * |
nkeynes@359 | 8 | * This program is free software; you can redistribute it and/or modify |
nkeynes@359 | 9 | * it under the terms of the GNU General Public License as published by |
nkeynes@359 | 10 | * the Free Software Foundation; either version 2 of the License, or |
nkeynes@359 | 11 | * (at your option) any later version. |
nkeynes@359 | 12 | * |
nkeynes@359 | 13 | * This program is distributed in the hope that it will be useful, |
nkeynes@359 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
nkeynes@359 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nkeynes@359 | 16 | * GNU General Public License for more details. |
nkeynes@359 | 17 | */ |
nkeynes@359 | 18 | |
nkeynes@359 | 19 | #include "dream.h" |
nkeynes@359 | 20 | #include "mem.h" |
nkeynes@359 | 21 | |
nkeynes@359 | 22 | /** Maximum size of a translated instruction, in bytes. This includes potentially |
nkeynes@359 | 23 | * writing the entire epilogue |
nkeynes@359 | 24 | */ |
nkeynes@359 | 25 | #define MAX_INSTRUCTION_SIZE 32 |
nkeynes@359 | 26 | |
nkeynes@359 | 27 | /** |
nkeynes@359 | 28 | |
nkeynes@359 | 29 | */ |
nkeynes@359 | 30 | uint32_t sh4_xlat_run_slice( uint32_t nanosecs ); |
nkeynes@359 | 31 | |
nkeynes@359 | 32 | /** |
nkeynes@359 | 33 | * Translate the specified block of code starting from the specified start |
nkeynes@359 | 34 | * address until the first branch/jump instruction. |
nkeynes@359 | 35 | */ |
nkeynes@359 | 36 | void *sh4_translate_basic_block( sh4addr_t start ); |
nkeynes@359 | 37 | |
nkeynes@359 | 38 | extern uint8_t *xlat_output; |
nkeynes@359 | 39 | |
nkeynes@359 | 40 | /************** Output generation ***************/ |
nkeynes@359 | 41 | |
nkeynes@359 | 42 | void sh4_translate_begin_block(); |
nkeynes@359 | 43 | |
nkeynes@359 | 44 | uint32_t sh4_x86_translate_instruction( sh4addr_t pc ); |
nkeynes@359 | 45 | |
nkeynes@359 | 46 | void sh4_translate_end_block( sh4addr_t pc ); |
.