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 Wed Dec 02 10:36:49 2009 +1000 (14 years ago)
permissions -rw-r--r--
last change Add missing SUBV instruction to the emulation core (translation core is ok),
along with test cases. Thanks to D. Jeff Dionne for pointing this out.
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 Wed Dec 02 10:36:49 2009 +1000
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
.