From: Christian Würdig Date: Fri, 18 Aug 2006 14:44:11 +0000 (+0000) Subject: extended test X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6a6f280271113d7960ac8f9921de18c4568c11ad;p=libfirm extended test --- diff --git a/ir/be/test/max.c b/ir/be/test/max.c index 367baec5a..6cb22302b 100644 --- a/ir/be/test/max.c +++ b/ir/be/test/max.c @@ -1,7 +1,9 @@ #include +#include -#define MAX 65536 -#define MAX_CALC 64 +#define MAX (1 << 20) +#define TRUNC 0xff +#define MAX_SHOW TRUNC void dump_field(short *field, int size, const char *name) { int i; @@ -17,7 +19,7 @@ void dequant_h263_inter_c(short *data, const short *coeff, const unsigned int qu const unsigned short quant_add = (quant & 1 ? quant : quant - 1); int i; - for (i = 0; i < MAX_CALC; i++) { + for (i = 0; i < MAX; i++) { short acLevel = coeff[i]; if (acLevel == 0) { @@ -40,19 +42,19 @@ int main(int argc){ for (i = 0; i < numofruns; i++){ /* Reset cache. Alles andere ist unrealistisch. */ - for(ii = 0; ii < MAX_CALC; ii++){ + for(ii = 0; ii < MAX; ii++){ cur[ii] = 0; - ref[ii] = (ii + i + 3) & 0xff; + ref[ii] = (ii + i + 3) & TRUNC; } if (i == 0 && argc == 1) - dump_field(ref, MAX_CALC, "ref"); + dump_field(ref, MAX_SHOW, "ref"); dequant_h263_inter_c(cur, ref, 1024 * (i & 0x3)); } if (argc == 1) - dump_field(cur, MAX_CALC, "cur"); + dump_field(cur, MAX_SHOW, "cur"); - return 0 ; + return 0; }