From a160967d4ce131c6cad7c1c44b654e3aa5855023 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 30 Aug 2019 10:44:43 +0200 Subject: Fixed the extraction of instructions from TargetPrinter.ml --- test/mppa/coverage.sh | 5 ++--- test/mppa/coverage_helper.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/mppa/coverage.sh b/test/mppa/coverage.sh index 2b3dafc0..ec66c94e 100755 --- a/test/mppa/coverage.sh +++ b/test/mppa/coverage.sh @@ -1,5 +1,6 @@ #!/bin/bash +printer=../../mppa_k1c/TargetPrinter.ml asmdir=instr/asm/ to_cover_raw=/tmp/to_cover_raw to_cover=/tmp/to_cover @@ -11,8 +12,7 @@ set -e # Pipes do not mask errors set -o pipefail -sed -n "s/^.*fprintf oc \" \([^.].*\) .*/\1/p" ../../mppa_k1c/TargetPrinter.ml | sort -u > $to_cover_raw -sed -n "s/^.*fprintf oc \" \([^.].*\)\\n.*/\1/p" ../../mppa_k1c/TargetPrinter.ml | sort -u >> $to_cover_raw +sed -n "s/^.*fprintf\s*oc\s*\"\s*\([a-z][^[:space:]]*\)\s.*/\1/p" $printer > $to_cover_raw python2.7 coverage_helper.py $to_cover_raw | sort -u > $to_cover rm -f $covered_raw @@ -22,4 +22,3 @@ done python2.7 coverage_helper.py $covered_raw | sort -u > $covered vimdiff $to_cover $covered - diff --git a/test/mppa/coverage_helper.py b/test/mppa/coverage_helper.py index 42e0c887..cf7a84c9 100644 --- a/test/mppa/coverage_helper.py +++ b/test/mppa/coverage_helper.py @@ -9,10 +9,10 @@ all_iconds = "ne eq lt ge le gt ltu geu leu gtu all nall any none".split(" ") all_fconds = "one ueq oeq une olt uge oge ult".split(" ") -replaces_a = [(["cb."], all_bconds), +replaces_a = [(["cb.", "cmoved."], all_bconds), (["compd.", "compw."], all_iconds), (["fcompd.", "fcompw."], all_fconds), - (all_loads_stores, [".xs"])] + (all_loads_stores, [".xs", ""])] replaces_dd = [(["addx", "sbfx"], ["2d", "4d", "8d", "16d"])] replaces_dw = [(["addx", "sbfx"], ["2w", "4w", "8w", "16w"])] -- cgit