diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-05-28 18:26:22 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-05-28 18:26:22 +0200 |
commit | 050f408dd2b3f2cf1b8db512edafe2701b7a2dce (patch) | |
tree | 5f962fb6166fd2cd95a239e0d66fee362c1bfb23 /test/mppa/coverage_helper.py | |
parent | d46e96ef6c0287d6892bfc7d2272b7473f5e4979 (diff) | |
parent | 17c564cb99076eb0e2b34eeed4f24a18febe7116 (diff) | |
download | compcert-kvx-050f408dd2b3f2cf1b8db512edafe2701b7a2dce.tar.gz compcert-kvx-050f408dd2b3f2cf1b8db512edafe2701b7a2dce.zip |
Merge branch 'kvx-work' into mppa-RTLpathSE
Adapting the new mppa-RTLpathSE passes into the new Compiler.vexpand
framework
Diffstat (limited to 'test/mppa/coverage_helper.py')
-rw-r--r-- | test/mppa/coverage_helper.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/test/mppa/coverage_helper.py b/test/mppa/coverage_helper.py deleted file mode 100644 index e5b1907c..00000000 --- a/test/mppa/coverage_helper.py +++ /dev/null @@ -1,45 +0,0 @@ -import fileinput -import sys - -all_loads_stores = "lbs lbz lhz lo lq ld lhs lws sb sd sh so sq sw".split(" ") - -all_bconds = "wnez weqz wltz wgez wlez wgtz dnez deqz dltz dgez dlez dgtz".split(" ") - -all_iconds = "ne eq lt ge le gt ltu geu leu gtu".split(" ") - -all_fconds = "one ueq oeq une olt uge oge ult".split(" ") - -replaces_a = [(["cb.", "cmoved."], all_bconds), - (["compd.", "compw."], all_iconds), - (["fcompd.", "fcompw."], all_fconds), - (all_loads_stores, [".xs", ""])] - -replaces_dd = [(["addx", "sbfx"], ["2d", "4d", "8d", "16d"])] -replaces_dw = [(["addx", "sbfx"], ["2w", "4w", "8w", "16w"])] - -macros_binds = {"%a": replaces_a, "%dd": replaces_dd, "%dw": replaces_dw} - -def expand_macro(fullinst, macro, replaceTable): - inst = fullinst.replace(macro, "") - for (searchlist, mods) in replaceTable: - if inst in searchlist: - return [fullinst.replace(macro, mod) for mod in mods] - raise NameError - -insts = [] -for line in fileinput.input(): - fullinst = line[:-1] - try: - for macro in macros_binds: - if macro in fullinst: - insts.extend(expand_macro(fullinst, macro, macros_binds[macro])) - break - else: - insts.append(fullinst) - except NameError: - print >> sys.stderr, fullinst + " could not be found any match for macro " + macro - sys.exit(1) - -for inst in insts: - print inst -occurs = {} |