Search
lxdream.org :: lxdream/src/sh4/sh4trans.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4trans.h
changeset 1091:186558374345
prev1065:bc1cc0c54917
next1125:9dd5dee45db9
author nkeynes
date Tue Dec 15 08:46:37 2009 +1000 (13 years ago)
permissions -rw-r--r--
last change Add side-by-side x86+sh4 disassembly output
Print SH4 state information and disassembly of the current block when
crashing.
Fix delay slot instruction in conditional branch not being marked as a
delay-slot instruction in the branch-not-taken path.
Rename REG_* defines in cpu.h to avoid conflict with translation defs
file annotate diff log raw
1.1 --- a/src/sh4/sh4trans.h Sun Jul 05 13:52:50 2009 +1000
1.2 +++ b/src/sh4/sh4trans.h Tue Dec 15 08:46:37 2009 +1000
1.3 @@ -43,18 +43,13 @@
1.4
1.5 /**
1.6 */
1.7 -uint32_t sh4_xlat_run_slice( uint32_t nanosecs );
1.8 -
1.9 -/**
1.10 - * Return true if translated code is currently running
1.11 - */
1.12 -gboolean sh4_xlat_is_running();
1.13 +uint32_t sh4_translate_run_slice( uint32_t nanosecs );
1.14
1.15 /**
1.16 * Initialize the translation engine (if required). Note xlat cache
1.17 * must already be initialized.
1.18 */
1.19 -void sh4_xlat_init();
1.20 +void sh4_translate_init( void);
1.21
1.22 /**
1.23 * Translate the specified block of code starting from the specified start
1.24 @@ -80,19 +75,19 @@
1.25
1.26 #define TARGET_X86 1
1.27
1.28 -void sh4_translate_init( void );
1.29 void sh4_translate_begin_block( sh4addr_t pc );
1.30 uint32_t sh4_translate_instruction( sh4addr_t pc );
1.31 void sh4_translate_end_block( sh4addr_t pc );
1.32 uint32_t sh4_translate_end_block_size();
1.33 void sh4_translate_emit_breakpoint( sh4vma_t pc );
1.34 +void sh4_translate_crashdump();
1.35
1.36 typedef void (*unwind_thunk_t)(void);
1.37
1.38 /**
1.39 * From within the translator, (typically called from MMU exception handling routines)
1.40 * immediately exit the current translation block (performing cleanup as necessary) and
1.41 - * return to sh4_xlat_run_slice(). Effectively a fast longjmp w/ xlat recovery.
1.42 + * return to sh4_translate_run_slice(). Effectively a fast longjmp w/ xlat recovery.
1.43 *
1.44 * Note: The correct working of this method depends on the translator anticipating the
1.45 * exception and generating the appropriate recovery block(s) - currently this means
1.46 @@ -132,6 +127,12 @@
1.47 */
1.48 void FASTCALL sh4_translate_breakpoint_hit( sh4vma_t pc );
1.49
1.50 +/**
1.51 + * Disassemble the given translated code block, and it's source SH4 code block
1.52 + * side-by-side. The current native pc will be marked if non-null.
1.53 + */
1.54 +void sh4_translate_disasm_block( FILE *out, void *code, sh4addr_t source_start, void *native_pc );
1.55 +
1.56 #ifdef __cplusplus
1.57 }
1.58 #endif
.