diff options
| author | David Schleef <ds@schleef.org> | 2010-07-27 17:21:08 -0700 |
|---|---|---|
| committer | David Schleef <ds@schleef.org> | 2010-07-28 01:01:14 -0700 |
| commit | 35e9856fb89d2097a43f74796213ce155237293c (patch) | |
| tree | f16b22b88279ed98f7abcced74bdd833af0d280b /testsuite | |
| parent | 9f5602ad073b62d269c034fb78fe08abb52def16 (diff) | |
tests: quiet test output
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/exec_opcodes_sys.c | 15 | ||||
| -rw-r--r-- | testsuite/exec_parse.c | 3 | ||||
| -rw-r--r-- | testsuite/generate_opcodes_sys.c | 52 | ||||
| -rw-r--r-- | testsuite/test-schro.c | 2 |
4 files changed, 56 insertions, 16 deletions
diff --git a/testsuite/exec_opcodes_sys.c b/testsuite/exec_opcodes_sys.c index 6f04ca0..1627e8f 100644 --- a/testsuite/exec_opcodes_sys.c +++ b/testsuite/exec_opcodes_sys.c @@ -8,6 +8,7 @@ int error = FALSE; +int verbose = FALSE; void test_opcode_src (OrcStaticOpcode *opcode); void test_opcode_const (OrcStaticOpcode *opcode); @@ -29,7 +30,7 @@ main (int argc, char *argv[]) opcode_set = orc_opcode_set_get ("sys"); for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s src %d,%d,%d,%d */\n", + if (verbose) printf("%s src %d,%d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].dest_size[1], @@ -38,7 +39,7 @@ main (int argc, char *argv[]) test_opcode_src (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s const %d,%d,%d */\n", + if (verbose) printf("%s const %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], @@ -46,7 +47,7 @@ main (int argc, char *argv[]) test_opcode_const (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s param %d,%d,%d */\n", + if (verbose) printf("%s param %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], @@ -54,7 +55,7 @@ main (int argc, char *argv[]) test_opcode_param (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s inplace %d,%d,%d */\n", + if (verbose) printf("%s inplace %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], @@ -62,7 +63,7 @@ main (int argc, char *argv[]) test_opcode_inplace (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s src 2d %d,%d,%d */\n", + if (verbose) printf("%s src 2d %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], @@ -70,7 +71,7 @@ main (int argc, char *argv[]) test_opcode_src_2d (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s src const n %d,%d,%d */\n", + if (verbose) printf("%s src const n %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], @@ -78,7 +79,7 @@ main (int argc, char *argv[]) test_opcode_src_const_n (opcode_set->opcodes + i); } for(i=0;i<opcode_set->n_opcodes;i++){ - printf("/* %s src const n 2d %d,%d,%d */\n", + if (verbose) printf("%s src const n 2d %d,%d,%d\n", opcode_set->opcodes[i].name, opcode_set->opcodes[i].dest_size[0], opcode_set->opcodes[i].src_size[0], diff --git a/testsuite/exec_parse.c b/testsuite/exec_parse.c index b35d0f7..17ee569 100644 --- a/testsuite/exec_parse.c +++ b/testsuite/exec_parse.c @@ -11,6 +11,7 @@ void output_code (OrcProgram *p, FILE *output); void output_code_header (OrcProgram *p, FILE *output); void output_code_test (OrcProgram *p, FILE *output); +int verbose = FALSE; int error = FALSE; int @@ -43,7 +44,7 @@ main (int argc, char *argv[]) n = orc_parse (code, &programs); for(i=0;i<n;i++){ - printf("%s\n", programs[i]->name); + if (verbose) printf("%s\n", programs[i]->name); orc_test_compare_output_full (programs[i], 0); } diff --git a/testsuite/generate_opcodes_sys.c b/testsuite/generate_opcodes_sys.c index a1ebd0f..2de7e81 100644 --- a/testsuite/generate_opcodes_sys.c +++ b/testsuite/generate_opcodes_sys.c @@ -30,13 +30,40 @@ main (int argc, char *argv[]) for(i=0;i<opcode_set->n_opcodes;i++){ opcode = opcode_set->opcodes + i; - if (opcode->dest_size[0] == 0 || - opcode->src_size[0] == 0) { - printf("# skipping %s\n\n", opcode->name); - continue; + printf(".function emulate_%s\n", opcode->name); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + printf(".accumulator %d a1\n", opcode->dest_size[0]); + d1 = "a1"; + } else { + printf(".dest %d d1\n", opcode->dest_size[0]); + d1 = "d1"; + } + if (opcode->dest_size[1]) { + printf(".dest %d d2\n", opcode->dest_size[1]); + } + printf(".source %d s1\n", opcode->src_size[0]); + if (opcode->src_size[1]) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + printf(".param %d s2\n", opcode->src_size[1]); + } else { + printf(".source %d s2\n", opcode->src_size[1]); + } } + printf("\n"); + if (opcode->src_size[1]) { + printf("%s %s, s1, s2\n", opcode->name, d1); + } else { + if (opcode->dest_size[1]) { + printf("%s %s, d2, s1\n", opcode->name, d1); + } else { + printf("%s %s, s1\n", opcode->name, d1); + } + } + printf("\n"); + printf("\n"); - printf(".function orc_%s\n", opcode->name); + printf(".function emulate_n16_%s\n", opcode->name); + printf(".n 16\n"); if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { printf(".accumulator %d a1\n", opcode->dest_size[0]); d1 = "a1"; @@ -44,15 +71,26 @@ main (int argc, char *argv[]) printf(".dest %d d1\n", opcode->dest_size[0]); d1 = "d1"; } + if (opcode->dest_size[1]) { + printf(".dest %d d2\n", opcode->dest_size[1]); + } printf(".source %d s1\n", opcode->src_size[0]); if (opcode->src_size[1]) { - printf(".source %d s2\n", opcode->src_size[1]); + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + printf(".param %d s2\n", opcode->src_size[1]); + } else { + printf(".source %d s2\n", opcode->src_size[1]); + } } printf("\n"); if (opcode->src_size[1]) { printf("%s %s, s1, s2\n", opcode->name, d1); } else { - printf("%s %s, s1\n", opcode->name, d1); + if (opcode->dest_size[1]) { + printf("%s %s, d2, s1\n", opcode->name, d1); + } else { + printf("%s %s, s1\n", opcode->name, d1); + } } printf("\n"); printf("\n"); diff --git a/testsuite/test-schro.c b/testsuite/test-schro.c index f5706e2..148b53d 100644 --- a/testsuite/test-schro.c +++ b/testsuite/test-schro.c @@ -236,7 +236,7 @@ main (int argc, char *argv[]) orc_test_init(); for(i=0;i<18;i++){ - printf("/* %d */\n", i); + //printf("/* %d */\n", i); test_program (i); } |
