diff options
Diffstat (limited to 'volk/gen')
-rw-r--r-- | volk/gen/archs.xml | 1 | ||||
-rw-r--r-- | volk/gen/volk_register.py | 16 |
2 files changed, 7 insertions, 10 deletions
diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml index f6822871f..960558b7c 100644 --- a/volk/gen/archs.xml +++ b/volk/gen/archs.xml @@ -29,6 +29,7 @@ <val>1</val> <overrule>MD_SUBCPU</overrule> <overrule_val>x86</overrule_val> + <mutex>32</mutex> </arch> <arch name="3dnow" type="x86"> diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py index 75e5eeb87..cd874e470 100644 --- a/volk/gen/volk_register.py +++ b/volk/gen/volk_register.py @@ -3,6 +3,7 @@ import sys import os import re +import glob import string from xml.dom import minidom from volk_regexp import * @@ -48,18 +49,13 @@ outfile_environment_h = open(os.path.join(gendir, "lib/volk_environment_init.h") outfile_makefile_am = open(os.path.join(gendir, "lib/Makefile.am"), "w") outfile_machines_h = open(os.path.join(gendir, "lib/volk_machines.h"), "w") outfile_machines_c = open(os.path.join(gendir, "lib/volk_machines.c"), "w") -infile = open(os.path.join(srcdir, "include/volk/Makefile.am"), "r") - - -mfile = infile.readlines(); +hdr_files = glob.glob(os.path.join(srcdir, "include/volk/*.h")) datatypes = []; functions = []; - - -for line in mfile: - subline = re.search(".*_(a|u)\.h.*", line); +for line in hdr_files: + subline = re.search(".*_(a|u)\.h.*", os.path.basename(line)) if subline: subsubline = re.search("(?<=volk_).*", subline.group(0)); if subsubline: @@ -71,7 +67,7 @@ for line in mfile: datatypes = set(datatypes); -for line in mfile: +for line in hdr_files: for dt in datatypes: if dt in line: subline = re.search("(volk_" + dt +"_.*(a|u).*\.h)", line); @@ -91,7 +87,7 @@ for arch in archs: if a_var: archs.remove(arch); - +#strip out mutex archs archflags_dict = {} for filearch in filearchs: |