diff --git a/test/dt_arith.c b/test/dt_arith.c index 078242dd5a..054f0691ae 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -121,7 +121,7 @@ static int without_hardware_g = 0; TYPE value2 = 0; \ \ /* Allocate buffers */ \ - NELMTS=(SRC_PREC-1)*3+1; \ + NELMTS=SRC_PREC*3; \ BUF = (unsigned char*)aligned_malloc(NELMTS*MAX(SRC_SIZE, DST_SIZE)); \ SAVED = (unsigned char*)aligned_malloc(NELMTS*MAX(SRC_SIZE, DST_SIZE)); \ HDmemset(BUF, 0, NELMTS*MAX(SRC_SIZE, DST_SIZE)); \ @@ -132,7 +132,7 @@ static int without_hardware_g = 0; \ /*positive values, ascending order. VALUE1 starts from 00000001, to 00000010, until 10000000*/ \ /*VALUE2 ascends from 00000000, to 00000011, 00000111,..., until 11111111.*/ \ - for(n=0; n=SRC_MIN) { \ memcpy(buf_p, &value1, SRC_SIZE); \ memcpy(saved_p, &value1, SRC_SIZE); \ @@ -146,20 +146,26 @@ static int without_hardware_g = 0; saved_p += SRC_SIZE; \ } \ \ - value1 <<= 1; \ - value2 = (value1 - 1) | value1; \ + if(n=SRC_MIN) { \ memcpy(buf_p, &value2, SRC_SIZE); \ memcpy(saved_p, &value2, SRC_SIZE); \ buf_p += SRC_SIZE; \ saved_p += SRC_SIZE; \ } \ - value2 <<= 1; \ + if(n