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 Mon Nov 08 22:10:47 2010 +1000 (13 years ago)
permissions -rw-r--r--
last change Suggest to the compiler a little more firmly that it inline the x86op
functions (as these are nearly always called with constants, they can
usually be reduced down pretty dramatically)
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 Mon Nov 08 22:10:47 2010 +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
.