Search
lxdream.org :: lxdream/src/sh4/sh4trans.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4trans.h
changeset 1125:9dd5dee45db9
prev1091:186558374345
next1182:b38a327ad8fa
author nkeynes
date Mon Sep 13 10:13:42 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change Implement shadow-execution 'core' to run translator + interpreter side by
side (for testing)
file annotate diff log raw
1.1 --- a/src/sh4/sh4trans.h Tue Dec 15 08:46:37 2009 +1000
1.2 +++ b/src/sh4/sh4trans.h Mon Sep 13 10:13:42 2010 +1000
1.3 @@ -41,6 +41,9 @@
1.4 */
1.5 #define MAX_RECOVERY_SIZE 2049
1.6
1.7 +typedef void (*xlat_block_begin_callback_t)();
1.8 +typedef void (*xlat_block_end_callback_t)();
1.9 +
1.10 /**
1.11 */
1.12 uint32_t sh4_translate_run_slice( uint32_t nanosecs );
1.13 @@ -63,6 +66,11 @@
1.14 */
1.15 void sh4_translate_add_recovery( uint32_t icount );
1.16
1.17 +/**
1.18 + * Initialize shadow execution mode
1.19 + */
1.20 +void sh4_shadow_init( void );
1.21 +
1.22 extern uint8_t *xlat_output;
1.23 extern struct xlat_recovery_record xlat_recovery[MAX_RECOVERY_SIZE];
1.24 extern xlat_cache_block_t xlat_current_block;
1.25 @@ -85,6 +93,21 @@
1.26 typedef void (*unwind_thunk_t)(void);
1.27
1.28 /**
1.29 + * Set instrumentation callbacks
1.30 + */
1.31 +void sh4_translate_set_callbacks( xlat_block_begin_callback_t begin, xlat_block_end_callback_t end );
1.32 +
1.33 +/**
1.34 + * Enable/disable memory optimizations that bypass the mmu
1.35 + */
1.36 +void sh4_translate_set_fastmem( gboolean flag );
1.37 +
1.38 +/**
1.39 + * Set the address spaces for the translated code.
1.40 + */
1.41 +void sh4_translate_set_address_space( struct mem_region_fn **priv, struct mem_region_fn **user );
1.42 +
1.43 +/**
1.44 * From within the translator, (typically called from MMU exception handling routines)
1.45 * immediately exit the current translation block (performing cleanup as necessary) and
1.46 * return to sh4_translate_run_slice(). Effectively a fast longjmp w/ xlat recovery.
.