Search
lxdream.org :: lxdream/test/testta.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/testta.c
changeset 754:35c496703380
prev561:533f6b478071
author nkeynes
date Sat Dec 27 02:59:35 2008 +0000 (15 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Replace fpscr_mask/fpscr flags in xlat_cache_block with a single xlat_sh4_mode,
which tracks the field of the same name in sh4r - actually a little faster this way.
Now depends on SR.MD, FPSCR.PR and FPSCR.SZ (although it doesn't benefit from the SR
flag yet).

Also fixed the failure to check the flags in the common case (code address returned
by previous block) which took away the performance benefits, but oh well.
file annotate diff log raw
1.1 --- a/test/testta.c Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/test/testta.c Sat Dec 27 02:59:35 2008 +0000
1.3 @@ -130,18 +130,33 @@
1.4 test_data_block_t input2 = get_test_data(test_case, "input2");
1.5 test_data_block_t output = get_test_data(test_case, "output");
1.6 test_data_block_t error = get_test_data(test_case, "error");
1.7 + test_data_block_t sortconf = get_test_data(test_case, "sortconf");
1.8 + test_data_block_t sorttab = get_test_data(test_case, "sorttab");
1.9 +
1.10 if( input == NULL || output == NULL ) {
1.11 fprintf( stderr, "Skipping test case '%s': data incomplete\n", test_case->test_name );
1.12 return -1;
1.13 }
1.14
1.15 - if( pvr_dma_write( 0x10000000, input->data, input->length, 0 ) == -1 ) {
1.16 - return -1;
1.17 + if( sortconf != NULL && sorttab != NULL ) {
1.18 + if( sortconf->length != 8 ) {
1.19 + fprintf( stderr, "Invalid sort config length: %d - abort test %s\n",
1.20 + sortconf->length, test_case->test_name );
1.21 + return -1;
1.22 + }
1.23 + uint32_t *sc = (uint32_t *)sortconf->data;
1.24 + if( sort_dma_write( sorttab->data, sorttab->length, input->data, input->length, *sc, *(sc+1) ) == -1 ){
1.25 + return -1;
1.26 + }
1.27 + } else {
1.28 + if( pvr_dma_write( 0x10000000, input->data, input->length, 0 ) == -1 ) {
1.29 + return -1;
1.30 + }
1.31 }
1.32
1.33 if( input2 != NULL ) {
1.34 - ta_reinit();
1.35 - pvr_dma_write( 0x10000000, input2->data, input2->length, 0 );
1.36 + ta_reinit();
1.37 + pvr_dma_write( 0x10000000, input2->data, input2->length, 0 );
1.38 }
1.39
1.40
.