summaryrefslogtreecommitdiff
path: root/volk/orc
diff options
context:
space:
mode:
Diffstat (limited to 'volk/orc')
-rw-r--r--volk/orc/.gitignore2
-rw-r--r--volk/orc/Makefile.am56
-rw-r--r--volk/orc/volk_16i_s32f_deinterleave_32f_x2_a16_orc_impl.orc12
-rw-r--r--volk/orc/volk_16ic_deinterleave_16i_x2_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_16ic_deinterleave_real_8i_a16_orc_impl.orc6
-rw-r--r--volk/orc/volk_16ic_magnitude_16i_a16_orc_impl.orc23
-rw-r--r--volk/orc/volk_16sc_magnitude_32f_aligned16_orc_impl.orc25
-rw-r--r--volk/orc/volk_16u_byteswap_a16_orc_impl.orc3
-rw-r--r--volk/orc/volk_32f_s32f_normalize_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_sqrt_32f_a16_orc_impl.orc4
-rw-r--r--volk/orc/volk_32f_x2_add_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_x2_divide_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_x2_max_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_x2_min_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_x2_multiply_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32f_x2_subtract_32f_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32fc_32f_multiply_32fc_a16_orc_impl.orc7
-rw-r--r--volk/orc/volk_32fc_magnitude_32f_a16_orc_impl.orc13
-rw-r--r--volk/orc/volk_32fc_s32f_magnitude_16i_a16_orc_impl.orc23
-rw-r--r--volk/orc/volk_32fc_x2_multiply_32fc_a16_orc_impl.orc18
-rw-r--r--volk/orc/volk_32i_x2_and_32i_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_32i_x2_or_32i_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_8i_convert_16i_a16_orc_impl.orc5
-rw-r--r--volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc11
24 files changed, 258 insertions, 0 deletions
diff --git a/volk/orc/.gitignore b/volk/orc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/volk/orc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/volk/orc/Makefile.am b/volk/orc/Makefile.am
new file mode 100644
index 000000000..6b5e4f8b6
--- /dev/null
+++ b/volk/orc/Makefile.am
@@ -0,0 +1,56 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(ORC_CFLAGS)
+
+include $(top_srcdir)/Makefile.common
+lib_LTLIBRARIES = libvolk_orc.la
+libvolk_orc_la_LDFLAGS = $(ORC_LDFLAGS)
+
+libvolk_orc_la_SOURCES = \
+volk_8i_convert_16i_a16_orc_impl.orc \
+volk_8i_s32f_convert_32f_a16_orc_impl.orc \
+volk_16u_byteswap_a16_orc_impl.orc \
+volk_32i_x2_and_32i_a16_orc_impl.orc \
+volk_32i_x2_or_32i_a16_orc_impl.orc \
+volk_32f_x2_add_32f_a16_orc_impl.orc \
+volk_32f_x2_subtract_32f_a16_orc_impl.orc \
+volk_32f_x2_divide_32f_a16_orc_impl.orc \
+volk_32f_x2_multiply_32f_a16_orc_impl.orc \
+volk_32fc_x2_multiply_32fc_a16_orc_impl.orc \
+volk_32fc_32f_multiply_32fc_a16_orc_impl.orc \
+volk_32f_sqrt_32f_a16_orc_impl.orc \
+volk_32f_x2_max_32f_a16_orc_impl.orc \
+volk_32f_x2_min_32f_a16_orc_impl.orc \
+volk_32f_s32f_normalize_a16_orc_impl.orc \
+volk_32fc_magnitude_32f_a16_orc_impl.orc \
+volk_32fc_s32f_magnitude_16i_a16_orc_impl.orc \
+volk_16ic_magnitude_16i_a16_orc_impl.orc \
+volk_16ic_deinterleave_16i_x2_a16_orc_impl.orc \
+volk_16i_s32f_deinterleave_32f_x2_a16_orc_impl.orc \
+volk_16ic_deinterleave_real_8i_a16_orc_impl.orc
+
+
+
+
+my_ORCC_FLAGS = --implementation $(ORCC_FLAGS)
+
+.orc.c:
+ $(ORCC) $(my_ORCC_FLAGS) -o $@ $<
diff --git a/volk/orc/volk_16i_s32f_deinterleave_32f_x2_a16_orc_impl.orc b/volk/orc/volk_16i_s32f_deinterleave_32f_x2_a16_orc_impl.orc
new file mode 100644
index 000000000..0189fbf5d
--- /dev/null
+++ b/volk/orc/volk_16i_s32f_deinterleave_32f_x2_a16_orc_impl.orc
@@ -0,0 +1,12 @@
+.function volk_16ic_s32f_deinterleave_32f_x2_a16_orc_impl
+.dest 4 idst
+.dest 4 qdst
+.source 4 src
+.floatparam 4 scalar
+.temp 8 iql
+.temp 8 iqf
+
+x2 convswl iql, src
+x2 convlf iqf, iql
+x2 divf iqf, iqf, scalar
+splitql qdst, idst, iqf
diff --git a/volk/orc/volk_16ic_deinterleave_16i_x2_a16_orc_impl.orc b/volk/orc/volk_16ic_deinterleave_16i_x2_a16_orc_impl.orc
new file mode 100644
index 000000000..56018edda
--- /dev/null
+++ b/volk/orc/volk_16ic_deinterleave_16i_x2_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_16ic_deinterleave_16i_x2_a16_orc_impl
+.dest 2 idst
+.dest 2 qdst
+.source 4 src
+splitlw qdst, idst, src
diff --git a/volk/orc/volk_16ic_deinterleave_real_8i_a16_orc_impl.orc b/volk/orc/volk_16ic_deinterleave_real_8i_a16_orc_impl.orc
new file mode 100644
index 000000000..dba9a4c8e
--- /dev/null
+++ b/volk/orc/volk_16ic_deinterleave_real_8i_a16_orc_impl.orc
@@ -0,0 +1,6 @@
+.function volk_16ic_deinterleave_real_8i_a16_orc_impl
+.dest 1 dst
+.source 4 src
+.temp 2 iw
+select0lw iw, src
+convhwb dst, iw
diff --git a/volk/orc/volk_16ic_magnitude_16i_a16_orc_impl.orc b/volk/orc/volk_16ic_magnitude_16i_a16_orc_impl.orc
new file mode 100644
index 000000000..37225e9b8
--- /dev/null
+++ b/volk/orc/volk_16ic_magnitude_16i_a16_orc_impl.orc
@@ -0,0 +1,23 @@
+.function volk_16ic_magnitude_16i_a16_orc_impl
+.source 4 src
+.dest 2 dst
+.floatparam 4 scalar
+.temp 8 iql
+.temp 8 iqf
+.temp 8 prodiqf
+.temp 4 qf
+.temp 4 if
+.temp 4 sumf
+.temp 4 rootf
+.temp 4 rootl
+
+x2 convswl iql, src
+x2 convlf iqf, iql
+x2 divf iqf, iqf, scalar
+x2 mulf prodiqf, iqf, iqf
+splitql qf, if, prodiqf
+addf sumf, if, qf
+sqrtf rootf, sumf
+mulf rootf, rootf, scalar
+convfl rootl, rootf
+convlw dst, rootl
diff --git a/volk/orc/volk_16sc_magnitude_32f_aligned16_orc_impl.orc b/volk/orc/volk_16sc_magnitude_32f_aligned16_orc_impl.orc
new file mode 100644
index 000000000..1e2380837
--- /dev/null
+++ b/volk/orc/volk_16sc_magnitude_32f_aligned16_orc_impl.orc
@@ -0,0 +1,25 @@
+.function volk_16ic_magnitude_32f_a16_orc_impl
+.source 4 src
+.dest 4 dst
+.floatparam 4 scalar
+.temp 4 reall
+.temp 4 imagl
+.temp 2 reals
+.temp 2 imags
+.temp 4 realf
+.temp 4 imagf
+.temp 4 sumf
+
+
+
+splitlw reals, imags, src
+convswl reall, reals
+convswl imagl, imags
+convlf realf, reall
+convlf imagf, imagl
+divf realf, realf, scalar
+divf imagf, imagf, scalar
+mulf realf, realf, realf
+mulf imagf, imagf, imagf
+addf sumf, realf, imagf
+sqrtf dst, sumf
diff --git a/volk/orc/volk_16u_byteswap_a16_orc_impl.orc b/volk/orc/volk_16u_byteswap_a16_orc_impl.orc
new file mode 100644
index 000000000..c1c8ee59e
--- /dev/null
+++ b/volk/orc/volk_16u_byteswap_a16_orc_impl.orc
@@ -0,0 +1,3 @@
+.function volk_16u_byteswap_a16_orc_impl
+.dest 2 dst
+swapw dst, dst
diff --git a/volk/orc/volk_32f_s32f_normalize_a16_orc_impl.orc b/volk/orc/volk_32f_s32f_normalize_a16_orc_impl.orc
new file mode 100644
index 000000000..acd319b16
--- /dev/null
+++ b/volk/orc/volk_32f_s32f_normalize_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_s32f_normalize_a16_orc_impl
+.source 4 src1
+.floatparam 4 invscalar
+.dest 4 dst
+mulf dst, src1, invscalar
diff --git a/volk/orc/volk_32f_sqrt_32f_a16_orc_impl.orc b/volk/orc/volk_32f_sqrt_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..ae5680f15
--- /dev/null
+++ b/volk/orc/volk_32f_sqrt_32f_a16_orc_impl.orc
@@ -0,0 +1,4 @@
+.function volk_32f_sqrt_32f_a16_orc_impl
+.source 4 src
+.dest 4 dst
+sqrtf dst, src
diff --git a/volk/orc/volk_32f_x2_add_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_add_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..8d095a052
--- /dev/null
+++ b/volk/orc/volk_32f_x2_add_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_add_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+addf dst, src1, src2
diff --git a/volk/orc/volk_32f_x2_divide_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_divide_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..0097646cb
--- /dev/null
+++ b/volk/orc/volk_32f_x2_divide_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_divide_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+divf dst, src1, src2
diff --git a/volk/orc/volk_32f_x2_max_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_max_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..b7f008737
--- /dev/null
+++ b/volk/orc/volk_32f_x2_max_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_max_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+maxf dst, src1, src2
diff --git a/volk/orc/volk_32f_x2_min_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_min_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..78328b576
--- /dev/null
+++ b/volk/orc/volk_32f_x2_min_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_min_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+minf dst, src1, src2
diff --git a/volk/orc/volk_32f_x2_multiply_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_multiply_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..e8fadff19
--- /dev/null
+++ b/volk/orc/volk_32f_x2_multiply_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_multiply_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+mulf dst, src1, src2
diff --git a/volk/orc/volk_32f_x2_subtract_32f_a16_orc_impl.orc b/volk/orc/volk_32f_x2_subtract_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..13fbe8c83
--- /dev/null
+++ b/volk/orc/volk_32f_x2_subtract_32f_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32f_x2_subtract_32f_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+subf dst, src1, src2
diff --git a/volk/orc/volk_32fc_32f_multiply_32fc_a16_orc_impl.orc b/volk/orc/volk_32fc_32f_multiply_32fc_a16_orc_impl.orc
new file mode 100644
index 000000000..455293cff
--- /dev/null
+++ b/volk/orc/volk_32fc_32f_multiply_32fc_a16_orc_impl.orc
@@ -0,0 +1,7 @@
+.function volk_32fc_32f_multiply_32fc_a16_orc_impl
+.source 8 src1
+.source 4 src2
+.dest 8 dst
+.temp 8 tmp
+mergelq tmp, src2, src2
+x2 mulf dst, src1, tmp
diff --git a/volk/orc/volk_32fc_magnitude_32f_a16_orc_impl.orc b/volk/orc/volk_32fc_magnitude_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..c5e2e57f1
--- /dev/null
+++ b/volk/orc/volk_32fc_magnitude_32f_a16_orc_impl.orc
@@ -0,0 +1,13 @@
+.function volk_32fc_magnitude_32f_a16_orc_impl
+.source 8 src
+.dest 4 dst
+.temp 8 iqf
+.temp 8 prodiqf
+.temp 4 qf
+.temp 4 if
+.temp 4 sumf
+
+x2 mulf prodiqf, src, src
+splitql qf, if, prodiqf
+addf sumf, if, qf
+sqrtf dst, sumf
diff --git a/volk/orc/volk_32fc_s32f_magnitude_16i_a16_orc_impl.orc b/volk/orc/volk_32fc_s32f_magnitude_16i_a16_orc_impl.orc
new file mode 100644
index 000000000..6116f5e1f
--- /dev/null
+++ b/volk/orc/volk_32fc_s32f_magnitude_16i_a16_orc_impl.orc
@@ -0,0 +1,23 @@
+.function volk_32fc_s32f_magnitude_16i_a16_orc_impl
+.source 8 src
+.dest 2 dst
+.floatparam 4 scalar
+.temp 8 iqf
+.temp 8 prodiqf
+.temp 4 qf
+.temp 4 if
+.temp 4 sumf
+.temp 4 rootf
+.temp 4 rootl
+.temp 4 maskl
+
+x2 mulf prodiqf, src, src
+splitql qf, if, prodiqf
+addf sumf, if, qf
+sqrtf rootf, sumf
+mulf rootf, rootf, scalar
+cmpltf maskl, 32768.0, rootf
+andl maskl, maskl, 0x80000000
+orl rootf, rootf, maskl
+convfl rootl, rootf
+convssslw dst, rootl
diff --git a/volk/orc/volk_32fc_x2_multiply_32fc_a16_orc_impl.orc b/volk/orc/volk_32fc_x2_multiply_32fc_a16_orc_impl.orc
new file mode 100644
index 000000000..a27d722cd
--- /dev/null
+++ b/volk/orc/volk_32fc_x2_multiply_32fc_a16_orc_impl.orc
@@ -0,0 +1,18 @@
+.function volk_32fc_x2_multiply_32fc_a16_orc_impl
+.source 8 src1
+.source 8 src2
+.dest 8 dst
+.temp 8 iqprod
+.temp 4 real
+.temp 4 imag
+.temp 4 ac
+.temp 4 bd
+.temp 8 swapped
+x2 mulf iqprod, src1, src2
+splitql bd, ac, iqprod
+subf real, ac, bd
+swaplq swapped, src1
+x2 mulf iqprod, swapped, src2
+splitql bd, ac, iqprod
+addf imag, ac, bd
+mergelq dst, real, imag
diff --git a/volk/orc/volk_32i_x2_and_32i_a16_orc_impl.orc b/volk/orc/volk_32i_x2_and_32i_a16_orc_impl.orc
new file mode 100644
index 000000000..7b331f8ed
--- /dev/null
+++ b/volk/orc/volk_32i_x2_and_32i_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32i_x2_and_32i_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+andl dst, src1, src2
diff --git a/volk/orc/volk_32i_x2_or_32i_a16_orc_impl.orc b/volk/orc/volk_32i_x2_or_32i_a16_orc_impl.orc
new file mode 100644
index 000000000..4984a9ced
--- /dev/null
+++ b/volk/orc/volk_32i_x2_or_32i_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_32i_x2_or_32i_a16_orc_impl
+.dest 4 dst
+.source 4 src1
+.source 4 src2
+orl dst, src1, src2
diff --git a/volk/orc/volk_8i_convert_16i_a16_orc_impl.orc b/volk/orc/volk_8i_convert_16i_a16_orc_impl.orc
new file mode 100644
index 000000000..f44845c88
--- /dev/null
+++ b/volk/orc/volk_8i_convert_16i_a16_orc_impl.orc
@@ -0,0 +1,5 @@
+.function volk_8i_convert_16i_a16_orc_impl
+.source 1 src
+.dest 2 dst
+convsbw dst, src
+shlw dst, dst, 8
diff --git a/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc b/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc
new file mode 100644
index 000000000..8f6e157e9
--- /dev/null
+++ b/volk/orc/volk_8i_s32f_convert_32f_a16_orc_impl.orc
@@ -0,0 +1,11 @@
+.function volk_8i_s32f_convert_32f_a16_orc_impl
+.source 1 src
+.dest 4 dst
+.floatparam 4 scalar
+.temp 4 flsrc
+.temp 4 lsrc
+.temp 2 ssrc
+convsbw ssrc, src
+convswl lsrc, ssrc
+convlf flsrc, lsrc
+mulf dst, flsrc, scalar