summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Foster2011-05-19 15:05:18 -0700
committerNick Foster2011-05-19 15:05:18 -0700
commit95377fea8f83bfaf956704e961c15d687848cb5c (patch)
treec274302493fe91fa2965e350816221115fbf5fbb
parente8610bae2cf87440a1c836e3b72b45b60130df34 (diff)
downloadgnuradio-95377fea8f83bfaf956704e961c15d687848cb5c.tar.gz
gnuradio-95377fea8f83bfaf956704e961c15d687848cb5c.tar.bz2
gnuradio-95377fea8f83bfaf956704e961c15d687848cb5c.zip
Volk: first stab at NEON support. Using compile-time detection.
-rw-r--r--volk/gen/archs.xml5
-rw-r--r--volk/gen/machines.xml5
-rw-r--r--volk/gen/make_cpuid_c.py13
-rw-r--r--volk/gen/volk_register.py4
4 files changed, 25 insertions, 2 deletions
diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml
index 0e8c22eea..a976190da 100644
--- a/volk/gen/archs.xml
+++ b/volk/gen/archs.xml
@@ -10,6 +10,11 @@
<alignment>16</alignment>
</arch>
+<arch name="neon" type="arm">
+ <flag>mneon</flag>
+ <alignment>16</alignment>
+</arch>
+
<arch name="32" type="x86" no_test="true" >
<flag>m32</flag>
<overrule>MD_SUBCPU</overrule>
diff --git a/volk/gen/machines.xml b/volk/gen/machines.xml
index 1f8b201ae..b872b9fb1 100644
--- a/volk/gen/machines.xml
+++ b/volk/gen/machines.xml
@@ -20,6 +20,11 @@ This machine is intended to support the MSVC compiler on x86/amd64.
The MSVC compiler has intrinsic support for SSE and SSE2,
however it does not support the gcc style inline assembly.
-->
+
+<machine name="neon">
+<archs>generic neon</archs>
+</machine>
+
<machine name="sse2_only">
<archs>generic mmx sse sse2</archs>
</machine>
diff --git a/volk/gen/make_cpuid_c.py b/volk/gen/make_cpuid_c.py
index 2fdbaf304..3b2f12d5c 100644
--- a/volk/gen/make_cpuid_c.py
+++ b/volk/gen/make_cpuid_c.py
@@ -153,6 +153,19 @@ int i_can_has_%s () {
}
""" % (arch)
+
+ elif str(domarch.attributes["type"].value) == "arm":
+ arch = str(domarch.attributes["name"].value);
+ tempstring = tempstring + """\
+int i_can_has_%s () {
+#ifdef __NEON__
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+""" % (arch)
elif str(domarch.attributes["type"].value) == "all":
arch = str(domarch.attributes["name"].value);
diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py
index 76f41205b..75e5eeb87 100644
--- a/volk/gen/volk_register.py
+++ b/volk/gen/volk_register.py
@@ -144,8 +144,8 @@ machine_alignment_dict = {}
for machine in machines:
machine_alignment_dict[machine] = max((archalign_dict.get(k, 1)) for k in machines[machine])
-for machine in machine_alignment_dict:
- print machine + ": %d" % machine_alignment_dict[machine]
+#for machine in machine_alignment_dict:
+# print machine + ": %d" % machine_alignment_dict[machine]
taglist = [];
fcountlist = [];