Search
lxdream.org :: lxdream :: r515:5e5bb1dd369e
lxdream 0.9.1
released Jun 29
Download Now
changeset515:5e5bb1dd369e
parent514:97f7e4bb2b54
child516:71a2cf942f17
authornkeynes
dateThu Nov 15 08:17:17 2007 +0000 (12 years ago)
Fix compilation of the unit tests
src/sh4/xltcache.c
src/test/testsh4x86.c
src/test/testxlt.c
src/x86dasm/x86dasm.c
1.1 --- a/src/sh4/xltcache.c Thu Nov 15 08:16:27 2007 +0000
1.2 +++ b/src/sh4/xltcache.c Thu Nov 15 08:17:17 2007 +0000
1.3 @@ -452,10 +452,3 @@
1.4 xlat_check_cache_integrity( xlat_old_cache, xlat_old_cache_ptr, XLAT_OLD_CACHE_SIZE );
1.5 }
1.6
1.7 -
1.8 -void xlat_disasm_block( FILE *out, void *block )
1.9 -{
1.10 - uint32_t buflen = xlat_get_block_size(block);
1.11 - x86_set_symtab( NULL, 0 );
1.12 - x86_disasm_block( out, block, buflen );
1.13 -}
2.1 --- a/src/test/testsh4x86.c Thu Nov 15 08:16:27 2007 +0000
2.2 +++ b/src/test/testsh4x86.c Thu Nov 15 08:17:17 2007 +0000
2.3 @@ -85,6 +85,8 @@
2.4 void signsat48(void) { }
2.5 uint16_t *sh4_icache = NULL;
2.6 uint32_t sh4_icache_addr = 0;
2.7 +gboolean gui_error_dialog( const char *fmt, ... ) { }
2.8 +
2.9
2.10 void usage()
2.11 {
3.1 --- a/src/test/testxlt.c Thu Nov 15 08:16:27 2007 +0000
3.2 +++ b/src/test/testxlt.c Thu Nov 15 08:17:17 2007 +0000
3.3 @@ -17,7 +17,7 @@
3.4 assert( block->active == 1 );
3.5 assert( block->size == XLAT_NEW_CACHE_SIZE - (2*sizeof(struct xlat_cache_block)) );
3.6 memset( block->code, 0xB5, 8192 );
3.7 - xlat_commit_block( 8192 );
3.8 + xlat_commit_block( 8192, 100 );
3.9 assert( block->active == 1 );
3.10 assert( block->size == 8192 );
3.11
3.12 @@ -26,7 +26,7 @@
3.13 assert( block2->active == 1 );
3.14 assert( block2->size == XLAT_NEW_CACHE_SIZE - (3*sizeof(struct xlat_cache_block)) - 8192 );
3.15 memset( block2->code, 0x6D, size );
3.16 - xlat_commit_block( size );
3.17 + xlat_commit_block( size, 200 );
3.18 assert( block2->active == 1 );
3.19 assert( block2->size == size );
3.20
3.21 @@ -41,7 +41,7 @@
3.22 assert( block3->active == 1 );
3.23 assert( block3->size == 4096 );
3.24 memset( block3->code, 0x9C, 4096 );
3.25 - xlat_cache_block_t block3a = xlat_extend_block();
3.26 + xlat_cache_block_t block3a = xlat_extend_block(8192);
3.27 assert( block3a != block3 );
3.28 assert( block3a == block );
3.29 assert( block3a->active == 1 );
3.30 @@ -54,7 +54,7 @@
3.31 for( i=4096; i<8192; i++ ) {
3.32 assert( block3a->code[i] == 0xB5 );
3.33 }
3.34 - xlat_commit_block(6142);
3.35 + xlat_commit_block(6142, 432);
3.36 addr = xlat_get_code( 0x0D009800 );
3.37 assert( addr == &block3a->code );
3.38 /* check promoted block in temp cache */
4.1 --- a/src/x86dasm/x86dasm.c Thu Nov 15 08:16:27 2007 +0000
4.2 +++ b/src/x86dasm/x86dasm.c Thu Nov 15 08:17:17 2007 +0000
4.3 @@ -39,6 +39,14 @@
4.4 static x86_symbol *x86_symtab;
4.5 static int x86_num_symbols = 0;
4.6
4.7 +
4.8 +void xlat_disasm_block( FILE *out, void *block )
4.9 +{
4.10 + uint32_t buflen = xlat_get_block_size(block);
4.11 + x86_set_symtab( NULL, 0 );
4.12 + x86_disasm_block( out, block, buflen );
4.13 +}
4.14 +
4.15 void x86_disasm_block(FILE *out, void *start, uint32_t len)
4.16 {
4.17 uint32_t start_addr = (uint32_t)start;
.