From 6a0f95864af8c06add0d9134c15cf990c96653ed Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 16 Sep 1997 13:58:44 +0000 Subject: [PATCH] More sim-bits testing. --- sim/testsuite/.Sanitize | 1 + sim/testsuite/common/bits-tst.c | 40 +++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/sim/testsuite/.Sanitize b/sim/testsuite/.Sanitize index 321d4e64df..571a17eea0 100644 --- a/sim/testsuite/.Sanitize +++ b/sim/testsuite/.Sanitize @@ -46,6 +46,7 @@ Things-to-lose: common tic80-coff +v850eq-elf README Do-last: diff --git a/sim/testsuite/common/bits-tst.c b/sim/testsuite/common/bits-tst.c index 576dbe40cf..cb33544f46 100644 --- a/sim/testsuite/common/bits-tst.c +++ b/sim/testsuite/common/bits-tst.c @@ -54,6 +54,24 @@ calc (const char *call, if (strcmp (call, "INSERT64") == 0) return INSERTED64 (val, row, col); + if (strcmp (call, "LSINSERT") == 0) + return LSINSERTED (val, row, col); + if (strcmp (call, "LSINSERT16") == 0) + return LSINSERTED16 (val, row, col); + if (strcmp (call, "LSINSERT32") == 0) + return LSINSERTED32 (val, row, col); + if (strcmp (call, "LSINSERT64") == 0) + return LSINSERTED64 (val, row, col); + + if (strcmp (call, "MSINSERT") == 0) + return MSINSERTED (val, row, col); + if (strcmp (call, "MSINSERT16") == 0) + return MSINSERTED16 (val, row, col); + if (strcmp (call, "MSINSERT32") == 0) + return MSINSERTED32 (val, row, col); + if (strcmp (call, "MSINSERT64") == 0) + return MSINSERTED64 (val, row, col); + if (strcmp (call, "MSMASK") == 0) return MSMASKED (val, row, col); if (strcmp (call, "MSMASK16") == 0) @@ -88,6 +106,24 @@ calc (const char *call, if (strcmp (call, "SEXT") == 0) return SEXT (val, col); + if (strcmp (call, "LSSEXT16") == 0) + return LSSEXT16 (val, col); + if (strcmp (call, "LSSEXT32") == 0) + return LSSEXT32 (val, col); + if (strcmp (call, "LSSEXT64") == 0) + return LSSEXT64 (val, col); + if (strcmp (call, "LSSEXT") == 0) + return LSSEXT (val, col); + + if (strcmp (call, "MSSEXT16") == 0) + return MSSEXT16 (val, col); + if (strcmp (call, "MSSEXT32") == 0) + return MSSEXT32 (val, col); + if (strcmp (call, "MSSEXT64") == 0) + return MSSEXT64 (val, col); + if (strcmp (call, "MSSEXT") == 0) + return MSSEXT (val, col); + else { fprintf (stderr, "Unknown call passed to calc (%s, 0x%08lx%08lx, %d, %d)\n", @@ -296,20 +332,16 @@ main (argc, argv) errors += check_extract (64, "EXTRACT64", "INSERT64", "MASK64"); errors += check_extract (64, "EXTRACT", "INSERT", "MASK"); - - printf ("Checking SEXT*\n"); errors += check_sext (16, "SEXT16", "MASK16", "MSMASK16"); errors += check_sext (32, "SEXT32", "MASK32", "MSMASK32"); errors += check_sext (64, "SEXT64", "MASK64", "MSMASK64"); errors += check_sext (64, "SEXT", "MASK", "MSMASK"); - printf ("Checking ROT*\n"); errors += check_rot (16, "ROT16", "MASK16"); errors += check_rot (32, "ROT32", "MASK32"); errors += check_rot (64, "ROT64", "MASK64"); - return errors != 0; }