From b9f5a0d2bf480ea96e8cf78470151f45e7031a32 Mon Sep 17 00:00:00 2001 From: Yang Lin Date: Wed, 30 May 2012 18:43:16 +0800 Subject: [PATCH 1/1] Initial commit to Gerrit --- COPYING | 62 + Makefile.am | 23 + Makefile.in | 811 + README | 108 + TODO | 33 + aclocal.m4 | 1032 ++ autogen.sh | 9 + compile | 143 + config.guess | 1533 ++ config.h.in | 182 + config.sub | 1693 ++ configure | 16116 +++++++++++++++++ configure.ac | 201 + depcomp | 630 + doc/Makefile.am | 106 + doc/Makefile.in | 686 + doc/building.xml | 84 + doc/concepts.xml | 250 + doc/html/ch01.html | 47 + doc/html/ch02.html | 49 + doc/html/ch03.html | 44 + doc/html/ch04.html | 47 + doc/html/ch05.html | 33 + doc/html/home.png | Bin 0 -> 654 bytes doc/html/index.html | 107 + doc/html/index.sgml | 322 + doc/html/left.png | Bin 0 -> 459 bytes doc/html/orc-ARM.html | 660 + doc/html/orc-MMX.html | 651 + doc/html/orc-Orc.html | 63 + doc/html/orc-OrcCompiler.html | 258 + doc/html/orc-OrcDebug.html | 398 + doc/html/orc-OrcExecutor.html | 369 + doc/html/orc-OrcOpcode.html | 500 + doc/html/orc-OrcProgram.html | 987 + doc/html/orc-OrcRule.html | 91 + doc/html/orc-PowerPC.html | 752 + doc/html/orc-SSE.html | 698 + doc/html/orc-Utility-functions.html | 245 + doc/html/orc-building.html | 94 + doc/html/orc-concepts.html | 236 + doc/html/orc-misc.html | 505 + doc/html/orc-opcodes.html | 3358 ++++ doc/html/orc-tutorial.html | 531 + doc/html/orc-x86.html | 1727 ++ doc/html/orc.devhelp | 292 + doc/html/orc.devhelp2 | 298 + doc/html/right.png | Bin 0 -> 472 bytes doc/html/style.css | 257 + doc/html/up.png | Bin 0 -> 406 bytes doc/opcode_table.xml | 1529 ++ doc/opcodes.xml | 101 + doc/orc-docs.sgml | 51 + doc/orc-overrides.txt | 0 doc/orc-sections.txt | 324 + doc/orc.types | 0 doc/table.xml | 1719 ++ doc/tmpl/misc.sgml | 242 + doc/tmpl/mmx.sgml | 187 + doc/tmpl/orc-unused.sgml | 791 + doc/tmpl/orc.sgml | 30 + doc/tmpl/orcarm.sgml | 256 + doc/tmpl/orccompiler.sgml | 105 + doc/tmpl/orcdebug.sgml | 141 + doc/tmpl/orcexecutor.sgml | 139 + doc/tmpl/orcmmx.sgml | 222 + doc/tmpl/orcopcode.sgml | 229 + doc/tmpl/orcpowerpc.sgml | 232 + doc/tmpl/orcprogram.sgml | 318 + doc/tmpl/orcrule.sgml | 33 + doc/tmpl/orcsse.sgml | 241 + doc/tmpl/orcutils.sgml | 117 + doc/tmpl/orcx86.sgml | 531 + doc/tmpl/sse.sgml | 198 + doc/tmpl/x86.sgml | 519 + doc/tutorial.xml | 510 + doc/version.entities.in | 2 + examples/Makefile.am | 61 + examples/Makefile.in | 587 + examples/example1.c | 31 + examples/example1orc.orc | 8 + examples/example2.c | 34 + examples/example2orc.orc | 16 + examples/example3.c | 24 + examples/example3orc.orc | 23 + examples/mt19937ar.c | 315 + examples/mt19937arorc.orc | 85 + examples/volscale.c | 269 + gtk-doc.make | 225 + install-sh | 520 + ltmain.sh | 8413 +++++++++ m4/ac_libtool_tags.m4 | 57 + m4/as-compiler-flag.m4 | 33 + m4/as-host-defines.m4 | 52 + m4/as-nano.m4 | 27 + m4/ax_create_stdint_h.m4 | 734 + m4/gtk-doc.m4 | 61 + m4/libtool.m4 | 7377 ++++++++ m4/ltoptions.m4 | 368 + m4/ltsugar.m4 | 123 + m4/ltversion.m4 | 23 + m4/lt~obsolete.m4 | 92 + m4/pkg.m4 | 135 + missing | 376 + orc-test/Makefile.am | 24 + orc-test/Makefile.in | 622 + orc-test/orcarray.c | 301 + orc-test/orcarray.h | 43 + orc-test/orcprofile.c | 219 + orc-test/orcprofile.h | 94 + orc-test/orcrandom.c | 47 + orc-test/orcrandom.h | 22 + orc-test/orctest.c | 1039 ++ orc-test/orctest.h | 40 + orc-uninstalled.pc.in | 12 + orc.pc.in | 16 + orc/Makefile.am | 106 + orc/Makefile.in | 1019 ++ orc/generate-emulation.c | 343 + orc/opcodes.h | 160 + orc/orc.c | 62 + orc/orc.h | 20 + orc/orcarm.c | 741 + orc/orcarm.h | 322 + orc/orccode.c | 41 + orc/orccodemem.c | 295 + orc/orccompiler.c | 1171 ++ orc/orccpu-arm.c | 221 + orc/orccpu-powerpc.c | 207 + orc/orccpu-x86.c | 557 + orc/orcdebug.c | 141 + orc/orcdebug.h | 159 + orc/orcemulateopcodes.c | 5320 ++++++ orc/orcemulateopcodes.h | 203 + orc/orcexecutor.c | 371 + orc/orcfunctions.c | 276 + orc/orcfunctions.h | 67 + orc/orcmmx.c | 264 + orc/orcmmx.h | 211 + orc/orcneon.h | 36 + orc/orconce.c | 114 + orc/orconce.h | 19 + orc/orcopcodes.c | 511 + orc/orcparse.c | 429 + orc/orcparse.h | 16 + orc/orcpowerpc.c | 632 + orc/orcpowerpc.h | 173 + orc/orcprogram-altivec.c | 400 + orc/orcprogram-arm.c | 491 + orc/orcprogram-c.c | 1403 ++ orc/orcprogram-c64x-c.c | 1086 ++ orc/orcprogram-mmx.c | 1097 ++ orc/orcprogram-neon.c | 939 + orc/orcprogram-sse.c | 1097 ++ orc/orcprogram.c | 961 + orc/orcprogram.h | 778 + orc/orcrule.c | 37 + orc/orcrules-altivec.c | 1199 ++ orc/orcrules-arm.c | 1718 ++ orc/orcrules-mmx.c | 2949 +++ orc/orcrules-neon.c | 2811 +++ orc/orcrules-sse.c | 2949 +++ orc/orcsse.c | 458 + orc/orcsse.h | 221 + orc/orcutils.c | 174 + orc/orcutils.h | 173 + orc/orcx86.c | 1149 ++ orc/orcx86.h | 107 + packaging/add-armv7l-to-as-host-defines.patch | 13 + packaging/orc-0.4.11.tar.bz2 | Bin 0 -> 523920 bytes packaging/orc-0.4.5-arm-build-failure.patch | 12 + packaging/orc.changes | 16 + packaging/orc.spec | 158 + packaging/orc.yaml | 53 + testsuite/Makefile.am | 38 + testsuite/Makefile.in | 911 + testsuite/abi.c | 33 + testsuite/benchmorc/Makefile.am | 6 + testsuite/benchmorc/Makefile.in | 491 + testsuite/benchmorc/benchmorc.c | 693 + testsuite/compile_opcodes_sys.c | 113 + testsuite/compile_opcodes_sys_c.c | 124 + testsuite/compile_opcodes_sys_neon.c | 113 + testsuite/compile_parse.c | 96 + testsuite/compile_parse_c.c | 90 + testsuite/compile_parse_neon.c | 96 + testsuite/exec_opcodes_sys.c | 444 + testsuite/exec_parse.c | 92 + testsuite/generate_opcodes_sys.c | 102 + testsuite/generate_xml_table.c | 113 + testsuite/generate_xml_table2.c | 288 + testsuite/memcpy_speed.c | 174 + testsuite/orcc/Makefile.am | 30 + testsuite/orcc/Makefile.in | 656 + testsuite/orcc/orc_test.c | 16341 +++++++++++++++++ testsuite/orcc/test2.c | 12 + testsuite/orcc/test3.c | 12 + testsuite/orcc/testorc.c | 22743 ++++++++++++++++++++++++ testsuite/perf_opcodes_sys.c | 46 + testsuite/perf_opcodes_sys_compare.c | 81 + testsuite/perf_parse.c | 91 + testsuite/perf_parse_compare.c | 94 + testsuite/show_parse.c | 394 + testsuite/test-schro.c | 246 + testsuite/test.orc | 2299 +++ testsuite/test_accsadubl.c | 91 + tools/Makefile.am | 9 + tools/Makefile.in | 542 + tools/orc-bugreport.c | 557 + tools/orcc.c | 1183 ++ tools/test.orc | 196 + 211 files changed, 154932 insertions(+) create mode 100644 COPYING create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 README create mode 100644 TODO create mode 100644 aclocal.m4 create mode 100755 autogen.sh create mode 100755 compile create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100755 depcomp create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/building.xml create mode 100644 doc/concepts.xml create mode 100644 doc/html/ch01.html create mode 100644 doc/html/ch02.html create mode 100644 doc/html/ch03.html create mode 100644 doc/html/ch04.html create mode 100644 doc/html/ch05.html create mode 100644 doc/html/home.png create mode 100644 doc/html/index.html create mode 100644 doc/html/index.sgml create mode 100644 doc/html/left.png create mode 100644 doc/html/orc-ARM.html create mode 100644 doc/html/orc-MMX.html create mode 100644 doc/html/orc-Orc.html create mode 100644 doc/html/orc-OrcCompiler.html create mode 100644 doc/html/orc-OrcDebug.html create mode 100644 doc/html/orc-OrcExecutor.html create mode 100644 doc/html/orc-OrcOpcode.html create mode 100644 doc/html/orc-OrcProgram.html create mode 100644 doc/html/orc-OrcRule.html create mode 100644 doc/html/orc-PowerPC.html create mode 100644 doc/html/orc-SSE.html create mode 100644 doc/html/orc-Utility-functions.html create mode 100644 doc/html/orc-building.html create mode 100644 doc/html/orc-concepts.html create mode 100644 doc/html/orc-misc.html create mode 100644 doc/html/orc-opcodes.html create mode 100644 doc/html/orc-tutorial.html create mode 100644 doc/html/orc-x86.html create mode 100644 doc/html/orc.devhelp create mode 100644 doc/html/orc.devhelp2 create mode 100644 doc/html/right.png create mode 100644 doc/html/style.css create mode 100644 doc/html/up.png create mode 100644 doc/opcode_table.xml create mode 100644 doc/opcodes.xml create mode 100644 doc/orc-docs.sgml create mode 100644 doc/orc-overrides.txt create mode 100644 doc/orc-sections.txt create mode 100644 doc/orc.types create mode 100644 doc/table.xml create mode 100644 doc/tmpl/misc.sgml create mode 100644 doc/tmpl/mmx.sgml create mode 100644 doc/tmpl/orc-unused.sgml create mode 100644 doc/tmpl/orc.sgml create mode 100644 doc/tmpl/orcarm.sgml create mode 100644 doc/tmpl/orccompiler.sgml create mode 100644 doc/tmpl/orcdebug.sgml create mode 100644 doc/tmpl/orcexecutor.sgml create mode 100644 doc/tmpl/orcmmx.sgml create mode 100644 doc/tmpl/orcopcode.sgml create mode 100644 doc/tmpl/orcpowerpc.sgml create mode 100644 doc/tmpl/orcprogram.sgml create mode 100644 doc/tmpl/orcrule.sgml create mode 100644 doc/tmpl/orcsse.sgml create mode 100644 doc/tmpl/orcutils.sgml create mode 100644 doc/tmpl/orcx86.sgml create mode 100644 doc/tmpl/sse.sgml create mode 100644 doc/tmpl/x86.sgml create mode 100644 doc/tutorial.xml create mode 100644 doc/version.entities.in create mode 100644 examples/Makefile.am create mode 100644 examples/Makefile.in create mode 100644 examples/example1.c create mode 100644 examples/example1orc.orc create mode 100644 examples/example2.c create mode 100644 examples/example2orc.orc create mode 100644 examples/example3.c create mode 100644 examples/example3orc.orc create mode 100644 examples/mt19937ar.c create mode 100644 examples/mt19937arorc.orc create mode 100644 examples/volscale.c create mode 100644 gtk-doc.make create mode 100755 install-sh create mode 100755 ltmain.sh create mode 100644 m4/ac_libtool_tags.m4 create mode 100644 m4/as-compiler-flag.m4 create mode 100644 m4/as-host-defines.m4 create mode 100644 m4/as-nano.m4 create mode 100644 m4/ax_create_stdint_h.m4 create mode 100644 m4/gtk-doc.m4 create mode 100644 m4/libtool.m4 create mode 100644 m4/ltoptions.m4 create mode 100644 m4/ltsugar.m4 create mode 100644 m4/ltversion.m4 create mode 100644 m4/lt~obsolete.m4 create mode 100644 m4/pkg.m4 create mode 100755 missing create mode 100644 orc-test/Makefile.am create mode 100644 orc-test/Makefile.in create mode 100644 orc-test/orcarray.c create mode 100644 orc-test/orcarray.h create mode 100644 orc-test/orcprofile.c create mode 100644 orc-test/orcprofile.h create mode 100644 orc-test/orcrandom.c create mode 100644 orc-test/orcrandom.h create mode 100644 orc-test/orctest.c create mode 100644 orc-test/orctest.h create mode 100644 orc-uninstalled.pc.in create mode 100644 orc.pc.in create mode 100644 orc/Makefile.am create mode 100644 orc/Makefile.in create mode 100644 orc/generate-emulation.c create mode 100644 orc/opcodes.h create mode 100644 orc/orc.c create mode 100644 orc/orc.h create mode 100644 orc/orcarm.c create mode 100644 orc/orcarm.h create mode 100644 orc/orccode.c create mode 100644 orc/orccodemem.c create mode 100644 orc/orccompiler.c create mode 100644 orc/orccpu-arm.c create mode 100644 orc/orccpu-powerpc.c create mode 100644 orc/orccpu-x86.c create mode 100644 orc/orcdebug.c create mode 100644 orc/orcdebug.h create mode 100644 orc/orcemulateopcodes.c create mode 100644 orc/orcemulateopcodes.h create mode 100644 orc/orcexecutor.c create mode 100644 orc/orcfunctions.c create mode 100644 orc/orcfunctions.h create mode 100644 orc/orcmmx.c create mode 100644 orc/orcmmx.h create mode 100644 orc/orcneon.h create mode 100644 orc/orconce.c create mode 100644 orc/orconce.h create mode 100644 orc/orcopcodes.c create mode 100644 orc/orcparse.c create mode 100644 orc/orcparse.h create mode 100644 orc/orcpowerpc.c create mode 100644 orc/orcpowerpc.h create mode 100644 orc/orcprogram-altivec.c create mode 100644 orc/orcprogram-arm.c create mode 100644 orc/orcprogram-c.c create mode 100644 orc/orcprogram-c64x-c.c create mode 100644 orc/orcprogram-mmx.c create mode 100644 orc/orcprogram-neon.c create mode 100644 orc/orcprogram-sse.c create mode 100644 orc/orcprogram.c create mode 100644 orc/orcprogram.h create mode 100644 orc/orcrule.c create mode 100644 orc/orcrules-altivec.c create mode 100644 orc/orcrules-arm.c create mode 100644 orc/orcrules-mmx.c create mode 100644 orc/orcrules-neon.c create mode 100644 orc/orcrules-sse.c create mode 100644 orc/orcsse.c create mode 100644 orc/orcsse.h create mode 100644 orc/orcutils.c create mode 100644 orc/orcutils.h create mode 100644 orc/orcx86.c create mode 100644 orc/orcx86.h create mode 100644 packaging/add-armv7l-to-as-host-defines.patch create mode 100644 packaging/orc-0.4.11.tar.bz2 create mode 100644 packaging/orc-0.4.5-arm-build-failure.patch create mode 100644 packaging/orc.changes create mode 100644 packaging/orc.spec create mode 100644 packaging/orc.yaml create mode 100644 testsuite/Makefile.am create mode 100644 testsuite/Makefile.in create mode 100644 testsuite/abi.c create mode 100644 testsuite/benchmorc/Makefile.am create mode 100644 testsuite/benchmorc/Makefile.in create mode 100644 testsuite/benchmorc/benchmorc.c create mode 100644 testsuite/compile_opcodes_sys.c create mode 100644 testsuite/compile_opcodes_sys_c.c create mode 100644 testsuite/compile_opcodes_sys_neon.c create mode 100644 testsuite/compile_parse.c create mode 100644 testsuite/compile_parse_c.c create mode 100644 testsuite/compile_parse_neon.c create mode 100644 testsuite/exec_opcodes_sys.c create mode 100644 testsuite/exec_parse.c create mode 100644 testsuite/generate_opcodes_sys.c create mode 100644 testsuite/generate_xml_table.c create mode 100644 testsuite/generate_xml_table2.c create mode 100644 testsuite/memcpy_speed.c create mode 100644 testsuite/orcc/Makefile.am create mode 100644 testsuite/orcc/Makefile.in create mode 100644 testsuite/orcc/orc_test.c create mode 100644 testsuite/orcc/test2.c create mode 100644 testsuite/orcc/test3.c create mode 100644 testsuite/orcc/testorc.c create mode 100644 testsuite/perf_opcodes_sys.c create mode 100644 testsuite/perf_opcodes_sys_compare.c create mode 100644 testsuite/perf_parse.c create mode 100644 testsuite/perf_parse_compare.c create mode 100644 testsuite/show_parse.c create mode 100644 testsuite/test-schro.c create mode 100644 testsuite/test.orc create mode 100644 testsuite/test_accsadubl.c create mode 100644 tools/Makefile.am create mode 100644 tools/Makefile.in create mode 100644 tools/orc-bugreport.c create mode 100644 tools/orcc.c create mode 100644 tools/test.orc diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..2a43304 --- /dev/null +++ b/COPYING @@ -0,0 +1,62 @@ + +The majority of the source code and the collective work is subject +to the following license: + + Copyright 2002 - 2009 David A. Schleef + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + +The source code implementing the Mersenne Twister algorithm is +subject to the following license: + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..fa8938c --- /dev/null +++ b/Makefile.am @@ -0,0 +1,23 @@ + +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = orc orc-test tools examples doc testsuite + +EXTRA_DIST = COPYING autogen.sh gtk-doc.make + +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc + +pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc + +orc-$(ORC_MAJORMINOR).pc: orc.pc + cp orc.pc orc-$(ORC_MAJORMINOR).pc + +orc-$(ORC_MAJORMINOR)-uninstalled.pc: orc-uninstalled.pc + cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc + +BUILT_SOURCES=orc-$(ORC_MAJORMINOR)-uninstalled.pc + +CLEANFILES = orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc + +ACLOCAL_FLAGS = -I m4 + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..1917f0e --- /dev/null +++ b/Makefile.in @@ -0,0 +1,811 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/orc-uninstalled.pc.in $(srcdir)/orc.pc.in \ + $(top_srcdir)/configure COPYING TODO compile config.guess \ + config.sub depcomp install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = orc-uninstalled.pc orc.pc +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +SUBDIRS = orc orc-test tools examples doc testsuite +EXTRA_DIST = COPYING autogen.sh gtk-doc.make +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc +BUILT_SOURCES = orc-$(ORC_MAJORMINOR)-uninstalled.pc +CLEANFILES = orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc +ACLOCAL_FLAGS = -I m4 +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +orc-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/orc-uninstalled.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +orc.pc: $(top_builddir)/config.status $(srcdir)/orc.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-pkgconfigDATA + + +orc-$(ORC_MAJORMINOR).pc: orc.pc + cp orc.pc orc-$(ORC_MAJORMINOR).pc + +orc-$(ORC_MAJORMINOR)-uninstalled.pc: orc-uninstalled.pc + cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/README b/README new file mode 100644 index 0000000..4e53ce9 --- /dev/null +++ b/README @@ -0,0 +1,108 @@ + +ORC - The Oil Runtime Compiler +============================== + +(and OIL stands for Optimized Inner Loops) + +Entropy Wave Inc (http://entropywave.com/) presents Orc, the sucessor +to Liboil - The Library of Optimized Inner Loops. + +Orc is a library and set of tools for compiling and executing +very simple programs that operate on arrays of data. The "language" +is a generic assembly language that represents many of the features +available in SIMD architectures, including saturated addition and +subtraction, and many arithmetic operations. + +At this point, developers interested in using Orc should look at the +examples and try out a few Orc programs in an experimental branch +of their own projects. And provide feedback on how it works. There +will likely be some major changes in ease of use from a developer's +perspective over the next few releases. + +The 0.4 series of Orc releases will be API and ABI compatible, and +will be incompatible with the 0.5 series when it comes out. The first +release of the 0.5 series is anticipated to coincide with the release +of GStreamer 1.0. + + +Features: + + - Users can create, compile, and run simple programs that use the + vector extensions of the CPU, all directly from an application. + + - Users can compile Orc programs to assembly source code to be + compiled and used without linking against the Orc library. + + - The generic assembly language can be extended by an application + by adding new opcodes. + + - An application can add rules for converting existing or new opcodes + to binary code for a specific target. + + - Current targets: SSE, MMX, ARM, Altivec, NEON, and TI C64x+. + (The c64x target only produces source code.) + + - Programs can optionally be emulated, which is useful for testing, or + if no rules are available to convert Orc opcodes to executable code. + + +More information: + + Web: http://code.entropywave.com/projects/orc/ + Download: http://code.entropywave.com/download/orc/ + + +Questions and Answers: + + - Q: Why not let gcc vectorize my code? + + A: Two reasons: first, since Orc's assembly language is much more + restrictive than C, Orc can generate better code than gcc, and + second, Orc can generate code for functions you define at runtime. + Many algorithms require gluing together several stages of operations, + and if each stage has several options, the total amount of code to + cover all combinations could be inconveniently large. + + - Q: Why not use compiler intrinsics for SIMD code? + + A: Compiler intrinsics only work for one target, and need to be + hand written. Plus, some compilers are very picky about source + code that uses intrinsics, and will silently produce slow code. + And, of course, you can't compile intrinsics at runtime. + + - Q: How big is the Orc library? + + A: For embedded users, the --enable-backend configure option can + be used to disable irrelvant targets. Compiled with only one target + (SSE), the library size is about 150 kB uncompressed, or 48 kB + compressed. The goal was to keep the uncompressed size under + about 100 kB (but that failed!). A typical build with all targets + and the full ABI is around 350 kB. + + +Caveats (Known Bugs): + + - ? + + +Future directions: + + - Addition of more complex loop control and array structures. + + - Addition of an option to compile the Orc library with only the + runtime features for a single target, e.g., for embedded systems. + + - Addition of rewrite rules, which convert an instruction that cannot + be converted to binary code into a series of instructions that can. + This is necessary since assembly instructions on most targets do + not cover all the features of the Orc assembly language. + + +About Entropy Wave: + +Entropy Wave creates tools that allow content producers and distributors +use open video technology. Through use of open source software like +GStreamer and Dirac, Entropy Wave's customers save money on licensing +costs for encoding and streaming video on the web. Entropy Wave was +founded in 2008 by long-time open source developer David Schleef. + diff --git a/TODO b/TODO new file mode 100644 index 0000000..dbc522c --- /dev/null +++ b/TODO @@ -0,0 +1,33 @@ + + +sse: Handle cache information and small n + +neon: constant n + +aligned source checks + +new opcodes: + - sampling: video scaling, fir filtering, fir filtering with + downsampling, upsampling/downsampling + - composite opcodes + +float parameters + +compiler: inline orc calls + +compiler: initialization function + +instruction scheduler + +improve emulation + + + +0.5 +=== + +Remove orc-stdint.h. + +Remove lots of stuff from the public API. + + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..771091b --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1032 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ac_libtool_tags.m4]) +m4_include([m4/as-compiler-flag.m4]) +m4_include([m4/as-host-defines.m4]) +m4_include([m4/as-nano.m4]) +m4_include([m4/ax_create_stdint_h.m4]) +m4_include([m4/gtk-doc.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/pkg.m4]) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..e43e0df --- /dev/null +++ b/autogen.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ `whoami` = ds ] ; then + confargs="$confargs --enable-gtk-doc" +fi + +autoreconf -i -f && +./configure --disable-static $confargs $@ + diff --git a/compile b/compile new file mode 100755 index 0000000..c0096a7 --- /dev/null +++ b/compile @@ -0,0 +1,143 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2009-10-06.20; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software +# Foundation, Inc. +# Written by Tom Tromey . +# +# This program 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 2, or (at your option) +# any later version. +# +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..e3a2116 --- /dev/null +++ b/config.guess @@ -0,0 +1,1533 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-06-10' + +# This file 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 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd | genuineintel) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..267a01e --- /dev/null +++ b/config.h.in @@ -0,0 +1,182 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Enable Altivec backend */ +#undef ENABLE_BACKEND_ALTIVEC + +/* Enable Arm backend */ +#undef ENABLE_BACKEND_ARM + +/* Enable c64x backend */ +#undef ENABLE_BACKEND_C64X + +/* Enable MMX backend */ +#undef ENABLE_BACKEND_MMX + +/* Enable NEON backend */ +#undef ENABLE_BACKEND_NEON + +/* Enable SSE backend */ +#undef ENABLE_BACKEND_SSE + +/* Defined if host is amd64 */ +#undef HAVE_AMD64 + +/* Defined if host is arm */ +#undef HAVE_ARM + +/* Defined if we have clock_gettime() */ +#undef HAVE_CLOCK_GETTIME + +/* Use malloc to allocate code for execution */ +#undef HAVE_CODEMEM_MALLOC + +/* Use mmap to allocate code for execution */ +#undef HAVE_CODEMEM_MMAP + +/* Use VirtualAlloc to allocate code for execution */ +#undef HAVE_CODEMEM_VIRTUALALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Defined if host is i386 */ +#undef HAVE_I386 + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Defined if we have a monotonic clock */ +#undef HAVE_MONOTONIC_CLOCK + +/* Defined if host OS is linux */ +#undef HAVE_OS_LINUX + +/* Defined if host OS is MS Windows */ +#undef HAVE_OS_WIN32 + +/* Define to 1 if you have the `posix_memalign' function. */ +#undef HAVE_POSIX_MEMALIGN + +/* Defined if host is powerpc */ +#undef HAVE_POWERPC + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `sigsetjmp' function. */ +#undef HAVE_SIGSETJMP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Use pthread thread code */ +#undef HAVE_THREAD_PTHREAD + +/* Use Windows thread code */ +#undef HAVE_THREAD_WIN32 + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_VALGRIND_VALGRIND_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Defined for compiling internal code */ +#undef ORC_EXPORTS + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `char', as computed by sizeof. */ +#undef SIZEOF_CHAR + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* The size of `void*', as computed by sizeof. */ +#undef SIZEOF_VOIDP + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..eb0389a --- /dev/null +++ b/config.sub @@ -0,0 +1,1693 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-06-11' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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 2 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..fb97e41 --- /dev/null +++ b/configure @@ -0,0 +1,16116 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.65 for orc 0.4.11. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='orc' +PACKAGE_TARNAME='orc' +PACKAGE_VERSION='0.4.11' +PACKAGE_STRING='orc 0.4.11' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_unique_file="orc/orc.h" +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +pkgconfigdir +ORC_LIBS +ORC_CFLAGS +ENABLE_BACKEND_C64X_FALSE +ENABLE_BACKEND_C64X_TRUE +ENABLE_BACKEND_ARM_FALSE +ENABLE_BACKEND_ARM_TRUE +ENABLE_BACKEND_NEON_FALSE +ENABLE_BACKEND_NEON_TRUE +ENABLE_BACKEND_ALTIVEC_FALSE +ENABLE_BACKEND_ALTIVEC_TRUE +ENABLE_BACKEND_MMX_FALSE +ENABLE_BACKEND_MMX_TRUE +ENABLE_BACKEND_SSE_FALSE +ENABLE_BACKEND_SSE_TRUE +LIBRT +LIBM +HAVE_OS_LINUX_FALSE +HAVE_OS_LINUX_TRUE +HAVE_OS_WIN32_FALSE +HAVE_OS_WIN32_TRUE +HAVE_ARM_FALSE +HAVE_ARM_TRUE +HAVE_POWERPC_FALSE +HAVE_POWERPC_TRUE +HAVE_AMD64_FALSE +HAVE_AMD64_TRUE +HAVE_I386_FALSE +HAVE_I386_TRUE +GTK_DOC_USE_REBASE_FALSE +GTK_DOC_USE_REBASE_TRUE +GTK_DOC_USE_LIBTOOL_FALSE +GTK_DOC_USE_LIBTOOL_TRUE +GTK_DOC_BUILD_PDF_FALSE +GTK_DOC_BUILD_PDF_TRUE +GTK_DOC_BUILD_HTML_FALSE +GTK_DOC_BUILD_HTML_TRUE +ENABLE_GTK_DOC_FALSE +ENABLE_GTK_DOC_TRUE +PKG_CONFIG +HTML_DIR +GTKDOC_MKPDF +GTKDOC_REBASE +GTKDOC_CHECK +CROSS_COMPILING_FALSE +CROSS_COMPILING_TRUE +ACLOCAL_AMFLAGS +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +LIBTOOL +OBJDUMP +DLLTOOL +AS +ORC_LIBVERSION +ORC_MAJORMINOR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +NANO +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_shared +enable_static +with_pic +enable_fast_install +enable_dependency_tracking +with_gnu_ld +enable_libtool_lock +with_html_dir +enable_gtk_doc +enable_gtk_doc_html +enable_gtk_doc_pdf +enable_backend +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CCAS +CCASFLAGS +PKG_CONFIG' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures orc 0.4.11 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/orc] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of orc 0.4.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-gtk-doc use gtk-doc to build documentation [[default=no]] + --enable-gtk-doc-html build documentation in html format [[default=yes]] + --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] + --enable-backend sse,mmx,neon,arm,all (default all) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-html-dir=PATH path to installed docs + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +orc configure 0.4.11 +generated by GNU Autoconf 2.65 + +Copyright (C) 2009 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by orc $as_me 0.4.11, which was +generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 +$as_echo_n "checking nano version... " >&6; } + + NANO=$(echo 0.4.11 | sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//') + + + if test x"$NANO" = x || test "x$NANO" = "x0" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 +$as_echo "0 (release)" >&6; } + NANO=0 + ORC_CVS=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NANO" >&5 +$as_echo "$NANO" >&6; } + ORC_CVS=yes + fi + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='orc' + VERSION='0.4.11' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +ORC_MAJORMINOR=0.4 + + +ac_config_headers="$ac_config_headers config.h" + + +ORC_LIBVERSION="11:0:11" + +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6b' +macro_revision='1.3017' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:5098: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:5101: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:5104: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 6307 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7835: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7839: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8174: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8178: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8279: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8283: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8334: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8338: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + link_all_deplibs=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo(void) {} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10718 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10814 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + + + + + +ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS" + + + if test "x$cross_compiling" = "xyes"; then + CROSS_COMPILING_TRUE= + CROSS_COMPILING_FALSE='#' +else + CROSS_COMPILING_TRUE='#' + CROSS_COMPILING_FALSE= +fi + +for ac_func in posix_memalign +do : + ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" +if test "x$ac_cv_func_posix_memalign" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POSIX_MEMALIGN 1 +_ACEOF + +fi +done + + +################################################## +# Check for gtk-doc. +################################################## + +if test "x$cross_compiling" = "xyes" ; then + enable_gtk_doc=no +fi + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_CHECK in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + for ac_prog in gtkdoc-rebase +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GTKDOC_REBASE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_REBASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE +if test -n "$GTKDOC_REBASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 +$as_echo "$GTKDOC_REBASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GTKDOC_REBASE" && break +done +test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" + + # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. +set dummy gtkdoc-mkpdf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GTKDOC_MKPDF+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_MKPDF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF +if test -n "$GTKDOC_MKPDF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 +$as_echo "$GTKDOC_MKPDF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Check whether --with-html-dir was given. +if test "${with_html_dir+set}" = set; then : + withval=$with_html_dir; +else + with_html_dir='${datadir}/gtk-doc/html' +fi + + HTML_DIR="$with_html_dir" + + + # Check whether --enable-gtk-doc was given. +if test "${enable_gtk_doc+set}" = set; then : + enableval=$enable_gtk_doc; +else + enable_gtk_doc=no +fi + + + if test x$enable_gtk_doc = xyes; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + : +else + as_fn_error "You need to have gtk-doc >= 1.0 installed to build $PACKAGE_NAME" "$LINENO" 5 +fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + # Check whether --enable-gtk-doc-html was given. +if test "${enable_gtk_doc_html+set}" = set; then : + enableval=$enable_gtk_doc_html; +else + enable_gtk_doc_html=yes +fi + + # Check whether --enable-gtk-doc-pdf was given. +if test "${enable_gtk_doc_pdf+set}" = set; then : + enableval=$enable_gtk_doc_pdf; +else + enable_gtk_doc_pdf=no +fi + + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + + if test x$enable_gtk_doc = xyes; then + ENABLE_GTK_DOC_TRUE= + ENABLE_GTK_DOC_FALSE='#' +else + ENABLE_GTK_DOC_TRUE='#' + ENABLE_GTK_DOC_FALSE= +fi + + if test x$enable_gtk_doc_html = xyes; then + GTK_DOC_BUILD_HTML_TRUE= + GTK_DOC_BUILD_HTML_FALSE='#' +else + GTK_DOC_BUILD_HTML_TRUE='#' + GTK_DOC_BUILD_HTML_FALSE= +fi + + if test x$enable_gtk_doc_pdf = xyes; then + GTK_DOC_BUILD_PDF_TRUE= + GTK_DOC_BUILD_PDF_FALSE='#' +else + GTK_DOC_BUILD_PDF_TRUE='#' + GTK_DOC_BUILD_PDF_FALSE= +fi + + if test -n "$LIBTOOL"; then + GTK_DOC_USE_LIBTOOL_TRUE= + GTK_DOC_USE_LIBTOOL_FALSE='#' +else + GTK_DOC_USE_LIBTOOL_TRUE='#' + GTK_DOC_USE_LIBTOOL_FALSE= +fi + + if test -n "$GTKDOC_REBASE"; then + GTK_DOC_USE_REBASE_TRUE= + GTK_DOC_USE_REBASE_FALSE='#' +else + GTK_DOC_USE_REBASE_TRUE='#' + GTK_DOC_USE_REBASE_FALSE= +fi + + + + + + case "x${host_cpu}" in + xi?86 | k?) + HAVE_I386=yes + +$as_echo "#define HAVE_I386 1" >>confdefs.h + + ;; + xx86_64|xamd64) + HAVE_AMD64=yes + +$as_echo "#define HAVE_AMD64 1" >>confdefs.h + + ;; + xpowerpc|xppc|xpowerpc64|xppc64) + HAVE_POWERPC=yes + +$as_echo "#define HAVE_POWERPC 1" >>confdefs.h + + ;; + xarm) + HAVE_ARM=yes + +$as_echo "#define HAVE_ARM 1" >>confdefs.h + + ;; + esac + + if test "x$HAVE_I386" = "xyes"; then + HAVE_I386_TRUE= + HAVE_I386_FALSE='#' +else + HAVE_I386_TRUE='#' + HAVE_I386_FALSE= +fi + + if test "x$HAVE_AMD64" = "xyes"; then + HAVE_AMD64_TRUE= + HAVE_AMD64_FALSE='#' +else + HAVE_AMD64_TRUE='#' + HAVE_AMD64_FALSE= +fi + + if test "x$HAVE_POWERPC" = "xyes"; then + HAVE_POWERPC_TRUE= + HAVE_POWERPC_FALSE='#' +else + HAVE_POWERPC_TRUE='#' + HAVE_POWERPC_FALSE= +fi + + if test "x$HAVE_ARM" = "xyes"; then + HAVE_ARM_TRUE= + HAVE_ARM_FALSE='#' +else + HAVE_ARM_TRUE='#' + HAVE_ARM_FALSE= +fi + + + case "${host_os}" in + mingw*) + HAVE_OS_WIN32=yes + +$as_echo "#define HAVE_OS_WIN32 1" >>confdefs.h + + ;; + linux*) + HAVE_OS_LINUX=yes + +$as_echo "#define HAVE_OS_LINUX 1" >>confdefs.h + + ;; + esac + + if test "$HAVE_OS_WIN32" = "yes"; then + HAVE_OS_WIN32_TRUE= + HAVE_OS_WIN32_FALSE='#' +else + HAVE_OS_WIN32_TRUE='#' + HAVE_OS_WIN32_FALSE= +fi + + if test "$HAVE_OS_LINUX" = "yes"; then + HAVE_OS_LINUX_TRUE= + HAVE_OS_LINUX_FALSE='#' +else + HAVE_OS_LINUX_TRUE='#' + HAVE_OS_LINUX_FALSE= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + +# ------ AX CREATE STDINT H ------------------------------------- +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5 +$as_echo_n "checking for stdint types... " >&6; } +ac_stdint_h=`echo orc/orc-stdint.h` +# try to shortcircuit - if the default include path of the compiler +# can find a "stdint.h" header then we assume that all compilers can. +if test "${ac_cv_header_stdint_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + +old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" +old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" +old_CFLAGS="$CFLAGS" ; CFLAGS="" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int_least32_t v = 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_stdint_result="(assuming C99 compatible system)" + ac_cv_header_stdint_t="stdint.h"; +else + ac_cv_header_stdint_t="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then +CFLAGS="-std=c99" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int_least32_t v = 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&5 +$as_echo "$as_me: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&2;} +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +CXXFLAGS="$old_CXXFLAGS" +CPPFLAGS="$old_CPPFLAGS" +CFLAGS="$old_CFLAGS" +fi + + +v="... $ac_cv_header_stdint_h" +if test "$ac_stdint_h" = "stdint.h" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5 +$as_echo "(are you sure you want them in ./stdint.h?)" >&6; } +elif test "$ac_stdint_h" = "inttypes.h" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5 +$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; } +elif test "_$ac_cv_header_stdint_t" = "_" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5 +$as_echo "(putting them into $ac_stdint_h)$v" >&6; } +else + ac_cv_header_stdint="$ac_cv_header_stdint_t" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5 +$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; } +fi + +if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. + + +inttype_headers=`echo | sed -e 's/,/ /g'` + +ac_cv_stdint_result="(no helpful system typedefs seen)" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 +$as_echo_n "checking for stdint uintptr_t... " >&6; } +if test "${ac_cv_header_stdint_x+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 +$as_echo "(..)" >&6; } + for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers + do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uint64_t + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i> +" +if test "x$ac_cv_type_uintptr_t" = x""yes; then : + ac_cv_header_stdint_x=$i +else + continue +fi + + ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> +" +if test "x$ac_cv_type_uint64_t" = x""yes; then : + and64="/uint64_t" +else + and64="" +fi + + ac_cv_stdint_result="(seen uintptr_t$and64 in $i)" + break + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 +$as_echo_n "checking for stdint uintptr_t... " >&6; } + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5 +$as_echo "$ac_cv_header_stdint_x" >&6; } + + +if test "_$ac_cv_header_stdint_x" = "_" ; then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 +$as_echo_n "checking for stdint uint32_t... " >&6; } +if test "${ac_cv_header_stdint_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 +$as_echo "(..)" >&6; } + for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers + do + unset ac_cv_type_uint32_t + unset ac_cv_type_uint64_t + ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i> +" +if test "x$ac_cv_type_uint32_t" = x""yes; then : + ac_cv_header_stdint_o=$i +else + continue +fi + + ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> +" +if test "x$ac_cv_type_uint64_t" = x""yes; then : + and64="/uint64_t" +else + and64="" +fi + + ac_cv_stdint_result="(seen uint32_t$and64 in $i)" + break + break; + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 +$as_echo_n "checking for stdint uint32_t... " >&6; } + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5 +$as_echo "$ac_cv_header_stdint_o" >&6; } + +fi + +if test "_$ac_cv_header_stdint_x" = "_" ; then +if test "_$ac_cv_header_stdint_o" = "_" ; then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 +$as_echo_n "checking for stdint u_int32_t... " >&6; } +if test "${ac_cv_header_stdint_u+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 +$as_echo "(..)" >&6; } + for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do + unset ac_cv_type_u_int32_t + unset ac_cv_type_u_int64_t + ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i> +" +if test "x$ac_cv_type_u_int32_t" = x""yes; then : + ac_cv_header_stdint_u=$i +else + continue +fi + + ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i> +" +if test "x$ac_cv_type_u_int64_t" = x""yes; then : + and64="/u_int64_t" +else + and64="" +fi + + ac_cv_stdint_result="(seen u_int32_t$and64 in $i)" + break + break; + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 +$as_echo_n "checking for stdint u_int32_t... " >&6; } + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5 +$as_echo "$ac_cv_header_stdint_u" >&6; } + +fi fi + +if test "_$ac_cv_header_stdint_x" = "_" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5 +$as_echo_n "checking for stdint datatype model... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 +$as_echo "(..)" >&6; } + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if test "${ac_cv_sizeof_char+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (char) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_char=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CHAR $ac_cv_sizeof_char +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (short) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_short=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 +$as_echo_n "checking size of void*... " >&6; } +if test "${ac_cv_sizeof_voidp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_voidp" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (void*) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_voidp=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 +$as_echo "$ac_cv_sizeof_voidp" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOIDP $ac_cv_sizeof_voidp +_ACEOF + + + ac_cv_char_data_model="" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking data model" >&5 +$as_echo_n "checking data model... " >&6; } + case "$ac_cv_char_data_model/$ac_cv_long_data_model" in + 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; + 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; + 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; + 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; + 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; + 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; + 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; + 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; + 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; + 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; + 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; + 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; + 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; + 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; + 222/*|333/*|444/*|666/*|888/*) : + ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; + *) ac_cv_data_model="none" ; n="very unusual model" ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5 +$as_echo "$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6; } + +fi + +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_x" +elif test "_$ac_cv_header_stdint_o" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_o" +elif test "_$ac_cv_header_stdint_u" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_u" +else + ac_cv_header_stdint="stddef.h" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5 +$as_echo_n "checking for extra inttypes in chosen header... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5 +$as_echo "($ac_cv_header_stdint)" >&6; } +unset ac_cv_type_int_least32_t +unset ac_cv_type_int_fast32_t +ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint> +" +if test "x$ac_cv_type_int_least32_t" = x""yes; then : + +fi + +ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint> +" +if test "x$ac_cv_type_int_fast32_t" = x""yes; then : + +fi + +ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint> +" +if test "x$ac_cv_type_intmax_t" = x""yes; then : + +fi + + +fi # shortcircut to system "stdint.h" +# ------------------ PREPARE VARIABLES ------------------------------ +if test "$GCC" = "yes" ; then +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` +else +ac_cv_stdint_message="using $CC" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5 +$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; } + +# ----------------- DONE inttypes.h checks START header ------------- +ac_config_commands="$ac_config_commands $ac_stdint_h" + + + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + +for ac_header in inttypes.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIME_H 1 +_ACEOF + +fi + +done + +for ac_header in unistd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNISTD_H 1 +_ACEOF + +fi + +done + + +for ac_func in gettimeofday +do : + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETTIMEOFDAY 1 +_ACEOF + +fi +done + +for ac_func in sigaction +do : + ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGACTION 1 +_ACEOF + +fi +done + +for ac_func in sigsetjmp +do : + ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp" +if test "x$ac_cv_func_sigsetjmp" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGSETJMP 1 +_ACEOF + +fi +done + + +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if test "${ac_cv_lib_m_cos+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = x""yes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if test "${ac_cv_lib_m_cos+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = x""yes; then : + LIBM="-lm" +fi + + ;; +esac + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : + +$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + + LIBRT=-lrt + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clocks" >&5 +$as_echo_n "checking for monotonic clocks... " >&6; } +if test "${orc_cv_monotonic_clock+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int main() { +#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) + #error No monotonic clock +#endif + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + orc_cv_monotonic_clock=yes +else + orc_cv_monotonic_clock=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $orc_cv_monotonic_clock" >&5 +$as_echo "$orc_cv_monotonic_clock" >&6; } +if test "$orc_cv_monotonic_clock" = "yes"; then + +$as_echo "#define HAVE_MONOTONIC_CLOCK 1" >>confdefs.h + +fi + +for ac_header in valgrind/valgrind.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VALGRIND_VALGRIND_H 1 +_ACEOF + +fi + +done + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wall" >&5 +$as_echo_n "checking to see if compiler understands -Wall... " >&6; } + + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wall" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + flag_ok=yes +else + flag_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + + if test "X$flag_ok" = Xyes ; then + ORC_CFLAGS="$ORC_CFLAGS -Wall" + true + else + + true + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 +$as_echo "$flag_ok" >&6; } + +if test "x$ORC_CVS" = "xyes" +then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5 +$as_echo_n "checking to see if compiler understands -Werror... " >&6; } + + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + flag_ok=yes +else + flag_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + + if test "X$flag_ok" = Xyes ; then + ORC_CFLAGS="$ORC_CFLAGS -Werror" + true + else + + true + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 +$as_echo "$flag_ok" >&6; } + +fi + +case "${host_os}" in + nobody_is_using_this_currently) + +$as_echo "#define HAVE_CODEMEM_MALLOC 1" >>confdefs.h + + ;; + mingw*|pw32*|cygwin*) + +$as_echo "#define HAVE_CODEMEM_VIRTUALALLOC 1" >>confdefs.h + + ;; + linux*|darwin*|solaris*|netbsd*|freebsd*|openbsd*|kfreebsd*|dragonflybsd*|gnu*) + +$as_echo "#define HAVE_CODEMEM_MMAP 1" >>confdefs.h + + ;; + *) + as_fn_error "no code allocation backend" "$LINENO" 5 + ;; +esac + +case "${host_os}" in + mingw*|pw32*|cygwin*) + +$as_echo "#define HAVE_THREAD_WIN32 1" >>confdefs.h + + ;; + *) + +$as_echo "#define HAVE_THREAD_PTHREAD 1" >>confdefs.h + + ;; +esac + +# Check whether --enable-backend was given. +if test "${enable_backend+set}" = set; then : + enableval=$enable_backend; +else + enable_backend=all +fi + +case "${enable_backend}" in + sse) + ENABLE_BACKEND_SSE=yes + +$as_echo "#define ENABLE_BACKEND_SSE 1" >>confdefs.h + + ;; + mmx) + ENABLE_BACKEND_MMX=yes + +$as_echo "#define ENABLE_BACKEND_MMX 1" >>confdefs.h + + ;; + altivec) + ENABLE_BACKEND_ALTIVEC=yes + +$as_echo "#define ENABLE_BACKEND_ALTIVEC 1" >>confdefs.h + + ;; + neon) + ENABLE_BACKEND_NEON=yes + +$as_echo "#define ENABLE_BACKEND_NEON 1" >>confdefs.h + + ;; + arm) + ENABLE_BACKEND_ARM=yes + +$as_echo "#define ENABLE_BACKEND_ARM 1" >>confdefs.h + + ;; + c64x) + ENABLE_BACKEND_C64X=yes + +$as_echo "#define ENABLE_BACKEND_C64X 1" >>confdefs.h + + ;; + all|auto) + ENABLE_BACKEND_SSE=yes + +$as_echo "#define ENABLE_BACKEND_SSE 1" >>confdefs.h + + ENABLE_BACKEND_MMX=yes + +$as_echo "#define ENABLE_BACKEND_MMX 1" >>confdefs.h + + ENABLE_BACKEND_ALTIVEC=yes + +$as_echo "#define ENABLE_BACKEND_ALTIVEC 1" >>confdefs.h + + ENABLE_BACKEND_NEON=yes + +$as_echo "#define ENABLE_BACKEND_NEON 1" >>confdefs.h + + ENABLE_BACKEND_ARM=yes + +$as_echo "#define ENABLE_BACKEND_ARM 1" >>confdefs.h + + ENABLE_BACKEND_C64X=yes + +$as_echo "#define ENABLE_BACKEND_C64X 1" >>confdefs.h + + ;; +esac + if test "x$ENABLE_BACKEND_SSE" = "xyes"; then + ENABLE_BACKEND_SSE_TRUE= + ENABLE_BACKEND_SSE_FALSE='#' +else + ENABLE_BACKEND_SSE_TRUE='#' + ENABLE_BACKEND_SSE_FALSE= +fi + + if test "x$ENABLE_BACKEND_MMX" = "xyes"; then + ENABLE_BACKEND_MMX_TRUE= + ENABLE_BACKEND_MMX_FALSE='#' +else + ENABLE_BACKEND_MMX_TRUE='#' + ENABLE_BACKEND_MMX_FALSE= +fi + + if test "x$ENABLE_BACKEND_ALTIVEC" = "xyes"; then + ENABLE_BACKEND_ALTIVEC_TRUE= + ENABLE_BACKEND_ALTIVEC_FALSE='#' +else + ENABLE_BACKEND_ALTIVEC_TRUE='#' + ENABLE_BACKEND_ALTIVEC_FALSE= +fi + + if test "x$ENABLE_BACKEND_NEON" = "xyes"; then + ENABLE_BACKEND_NEON_TRUE= + ENABLE_BACKEND_NEON_FALSE='#' +else + ENABLE_BACKEND_NEON_TRUE='#' + ENABLE_BACKEND_NEON_FALSE= +fi + + if test "x$ENABLE_BACKEND_ARM" = "xyes"; then + ENABLE_BACKEND_ARM_TRUE= + ENABLE_BACKEND_ARM_FALSE='#' +else + ENABLE_BACKEND_ARM_TRUE='#' + ENABLE_BACKEND_ARM_FALSE= +fi + + if test "x$ENABLE_BACKEND_C64X" = "xyes"; then + ENABLE_BACKEND_C64X_TRUE= + ENABLE_BACKEND_C64X_FALSE='#' +else + ENABLE_BACKEND_C64X_TRUE='#' + ENABLE_BACKEND_C64X_FALSE= +fi + + + + +$as_echo "#define ORC_EXPORTS 1" >>confdefs.h + + +ORC_CFLAGS="$ORC_CFLAGS -I\$(top_srcdir)" + + +ORC_LIBS="\$(top_builddir)/orc/liborc-$ORC_MAJORMINOR.la $LIBM $LIBRT" + + +#CFLAGS=`echo $CFLAGS | sed s/O2/O0/` + +pkgconfigdir="\$(libdir)/pkgconfig" + + + +ac_config_files="$ac_config_files Makefile doc/Makefile doc/version.entities orc/Makefile orc-test/Makefile testsuite/Makefile testsuite/orcc/Makefile testsuite/benchmorc/Makefile examples/Makefile tools/Makefile orc-uninstalled.pc orc.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then + as_fn_error "conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then + as_fn_error "conditional \"ENABLE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then + as_fn_error "conditional \"GTK_DOC_BUILD_HTML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then + as_fn_error "conditional \"GTK_DOC_BUILD_PDF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then + as_fn_error "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then + as_fn_error "conditional \"GTK_DOC_USE_REBASE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_I386_TRUE}" && test -z "${HAVE_I386_FALSE}"; then + as_fn_error "conditional \"HAVE_I386\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_AMD64_TRUE}" && test -z "${HAVE_AMD64_FALSE}"; then + as_fn_error "conditional \"HAVE_AMD64\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_POWERPC_TRUE}" && test -z "${HAVE_POWERPC_FALSE}"; then + as_fn_error "conditional \"HAVE_POWERPC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ARM_TRUE}" && test -z "${HAVE_ARM_FALSE}"; then + as_fn_error "conditional \"HAVE_ARM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OS_WIN32_TRUE}" && test -z "${HAVE_OS_WIN32_FALSE}"; then + as_fn_error "conditional \"HAVE_OS_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OS_LINUX_TRUE}" && test -z "${HAVE_OS_LINUX_FALSE}"; then + as_fn_error "conditional \"HAVE_OS_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${ENABLE_BACKEND_SSE_TRUE}" && test -z "${ENABLE_BACKEND_SSE_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_SSE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_BACKEND_MMX_TRUE}" && test -z "${ENABLE_BACKEND_MMX_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_MMX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_BACKEND_ALTIVEC_TRUE}" && test -z "${ENABLE_BACKEND_ALTIVEC_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_BACKEND_NEON_TRUE}" && test -z "${ENABLE_BACKEND_NEON_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_NEON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_BACKEND_ARM_TRUE}" && test -z "${ENABLE_BACKEND_ARM_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_ARM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_BACKEND_C64X_TRUE}" && test -z "${ENABLE_BACKEND_C64X_FALSE}"; then + as_fn_error "conditional \"ENABLE_BACKEND_C64X\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by orc $as_me 0.4.11, which was +generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +orc config.status 0.4.11 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2009 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + +# variables for create stdint.h replacement +PACKAGE="$PACKAGE" +VERSION="$VERSION" +ac_stdint_h="$ac_stdint_h" +_ac_stdint_h=`$as_echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp` +ac_cv_stdint_message="$ac_cv_stdint_message" +ac_cv_header_stdint_t="$ac_cv_header_stdint_t" +ac_cv_header_stdint_x="$ac_cv_header_stdint_x" +ac_cv_header_stdint_o="$ac_cv_header_stdint_o" +ac_cv_header_stdint_u="$ac_cv_header_stdint_u" +ac_cv_type_uint64_t="$ac_cv_type_uint64_t" +ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" +ac_cv_char_data_model="$ac_cv_char_data_model" +ac_cv_long_data_model="$ac_cv_long_data_model" +ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" +ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" +ac_cv_type_intmax_t="$ac_cv_type_intmax_t" + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/version.entities") CONFIG_FILES="$CONFIG_FILES doc/version.entities" ;; + "orc/Makefile") CONFIG_FILES="$CONFIG_FILES orc/Makefile" ;; + "orc-test/Makefile") CONFIG_FILES="$CONFIG_FILES orc-test/Makefile" ;; + "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; + "testsuite/orcc/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/orcc/Makefile" ;; + "testsuite/benchmorc/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/benchmorc/Makefile" ;; + "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "orc-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES orc-uninstalled.pc" ;; + "orc.pc") CONFIG_FILES="$CONFIG_FILES orc.pc" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Assembler program. +AS=$AS + +# DLL creation program. +DLLTOOL=$DLLTOOL + +# Object dumper program. +OBJDUMP=$OBJDUMP + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "$ac_stdint_h":C) +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5 +$as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;} +ac_stdint=$tmp/_stdint.h + +echo "#ifndef" $_ac_stdint_h >$ac_stdint +echo "#define" $_ac_stdint_h "1" >>$ac_stdint +echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint +echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint +echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint +if test "_$ac_cv_header_stdint_t" != "_" ; then +echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint +echo "#include " >>$ac_stdint +echo "#endif" >>$ac_stdint +echo "#endif" >>$ac_stdint +else + +cat >>$ac_stdint < +#else +#include + +/* .................... configured part ............................ */ + +STDINT_EOF + +echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_header="$ac_cv_header_stdint_x" + echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint +fi + +echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_o" != "_" ; then + ac_header="$ac_cv_header_stdint_o" + echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint +fi + +echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint +if test "_$ac_cv_header_stdint_u" != "_" ; then + ac_header="$ac_cv_header_stdint_u" + echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint +fi + +echo "" >>$ac_stdint + +if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then + echo "#include <$ac_header>" >>$ac_stdint + echo "" >>$ac_stdint +fi fi + +echo "/* which 64bit typedef has been found */" >>$ac_stdint +if test "$ac_cv_type_uint64_t" = "yes" ; then +echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint +fi +if test "$ac_cv_type_u_int64_t" = "yes" ; then +echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* which type model has been detected */" >>$ac_stdint +if test "_$ac_cv_char_data_model" != "_" ; then +echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint +echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint +else +echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint +echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* whether int_least types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_least32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint +fi +echo "/* whether int_fast types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_fast32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint +fi +echo "/* whether intmax_t type was detected */" >>$ac_stdint +if test "$ac_cv_type_intmax_t" = "yes"; then +echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + + cat >>$ac_stdint <= 199901L +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; + +#elif !defined __STRICT_ANSI__ +#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ +#define _HAVE_UINT64_T +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ +/* note: all ELF-systems seem to have loff-support which needs 64-bit */ +#if !defined _NO_LONGLONG +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif + +#elif defined __alpha || (defined __mips && defined _ABIN32) +#if !defined _NO_LONGLONG +typedef long int64_t; +typedef unsigned long uint64_t; +#endif + /* compiler/cpu type to define int64_t */ +#endif +#endif +#endif + +#if defined _STDINT_HAVE_U_INT_TYPES +/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ +typedef u_int8_t uint8_t; +typedef u_int16_t uint16_t; +typedef u_int32_t uint32_t; + +/* glibc compatibility */ +#ifndef __int8_t_defined +#define __int8_t_defined +#endif +#endif + +#ifdef _STDINT_NEED_INT_MODEL_T +/* we must guess all the basic types. Apart from byte-adressable system, */ +/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ +/* (btw, those nibble-addressable systems are way off, or so we assume) */ + + +#if defined _STDINT_BYTE_MODEL +#if _STDINT_LONG_MODEL+0 == 242 +/* 2:4:2 = IP16 = a normal 16-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef long int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 +/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ +/* 4:4:4 = ILP32 = a normal 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 +/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ +/* 4:8:8 = LP64 = a normal 64-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* this system has a "long" of 64bit */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +typedef unsigned long uint64_t; +typedef long int64_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 448 +/* LLP64 a 64-bit system derived from a 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* assuming the system has a "long long" */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif +#else +#define _STDINT_NO_INT32_T +#endif +#else +#define _STDINT_NO_INT8_T +#define _STDINT_NO_INT32_T +#endif +#endif + +/* + * quote from SunOS-5.8 sys/inttypes.h: + * Use at your own risk. As of February 1996, the committee is squarely + * behind the fixed sized types; the "least" and "fast" types are still being + * discussed. The probability that the "fast" types may be removed before + * the standard is finalized is high enough that they are not currently + * implemented. + */ + +#if defined _STDINT_NEED_INT_LEAST_T +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_least64_t; +#endif + +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_least64_t; +#endif + /* least types */ +#endif + +#if defined _STDINT_NEED_INT_FAST_T +typedef int8_t int_fast8_t; +typedef int int_fast16_t; +typedef int32_t int_fast32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_fast64_t; +#endif + +typedef uint8_t uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef uint32_t uint_fast32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_fast64_t; +#endif + /* fast types */ +#endif + +#ifdef _STDINT_NEED_INTMAX_T +#ifdef _HAVE_UINT64_T +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; +#else +typedef long intmax_t; +typedef unsigned long uintmax_t; +#endif +#endif + +#ifdef _STDINT_NEED_INTPTR_T +#ifndef __intptr_t_defined +#define __intptr_t_defined +/* we encourage using "long" to store pointer values, never use "int" ! */ +#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 +typedef unsigned int uintptr_t; +typedef int intptr_t; +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 +typedef unsigned long uintptr_t; +typedef long intptr_t; +#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T +typedef uint64_t uintptr_t; +typedef int64_t intptr_t; +#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ +typedef unsigned long uintptr_t; +typedef long intptr_t; +#endif +#endif +#endif + +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS +#ifndef UINT32_C + +/* Signed. */ +# define INT8_C(c) c +# define INT16_C(c) c +# define INT32_C(c) c +# ifdef _HAVE_LONGLONG_UINT64_T +# define INT64_C(c) c ## L +# else +# define INT64_C(c) c ## LL +# endif + +/* Unsigned. */ +# define UINT8_C(c) c ## U +# define UINT16_C(c) c ## U +# define UINT32_C(c) c ## U +# ifdef _HAVE_LONGLONG_UINT64_T +# define UINT64_C(c) c ## UL +# else +# define UINT64_C(c) c ## ULL +# endif + +/* Maximal type. */ +# ifdef _HAVE_LONGLONG_UINT64_T +# define INTMAX_C(c) c ## L +# define UINTMAX_C(c) c ## UL +# else +# define INTMAX_C(c) c ## LL +# define UINTMAX_C(c) c ## ULL +# endif + + /* literalnumbers */ +#endif +#endif + +/* These limits are merily those of a two complement byte-oriented system */ + +/* Minimum of signed integral types. */ +# define INT8_MIN (-128) +# define INT16_MIN (-32767-1) +# define INT32_MIN (-2147483647-1) +# define INT64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of signed integral types. */ +# define INT8_MAX (127) +# define INT16_MAX (32767) +# define INT32_MAX (2147483647) +# define INT64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of unsigned integral types. */ +# define UINT8_MAX (255) +# define UINT16_MAX (65535) +# define UINT32_MAX (4294967295U) +# define UINT64_MAX (__UINT64_C(18446744073709551615)) + +/* Minimum of signed integral types having a minimum size. */ +# define INT_LEAST8_MIN INT8_MIN +# define INT_LEAST16_MIN INT16_MIN +# define INT_LEAST32_MIN INT32_MIN +# define INT_LEAST64_MIN INT64_MIN +/* Maximum of signed integral types having a minimum size. */ +# define INT_LEAST8_MAX INT8_MAX +# define INT_LEAST16_MAX INT16_MAX +# define INT_LEAST32_MAX INT32_MAX +# define INT_LEAST64_MAX INT64_MAX + +/* Maximum of unsigned integral types having a minimum size. */ +# define UINT_LEAST8_MAX UINT8_MAX +# define UINT_LEAST16_MAX UINT16_MAX +# define UINT_LEAST32_MAX UINT32_MAX +# define UINT_LEAST64_MAX UINT64_MAX + + /* shortcircuit*/ +#endif + /* once */ +#endif +#endif +STDINT_EOF +fi + if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_stdint_h is unchanged" >&5 +$as_echo "$as_me: $ac_stdint_h is unchanged" >&6;} + else + ac_dir=`$as_dirname -- "$ac_stdint_h" || +$as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_stdint_h" : 'X\(//\)[^/]' \| \ + X"$ac_stdint_h" : 'X\(//\)$' \| \ + X"$ac_stdint_h" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_stdint_h" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + rm -f $ac_stdint_h + mv $ac_stdint $ac_stdint_h + fi + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + + + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f7d46bf --- /dev/null +++ b/configure.ac @@ -0,0 +1,201 @@ +AC_PREREQ([2.58]) +AC_INIT(orc,0.4.11) +dnl don't forget to update libversion + +AS_NANO(ORC_CVS=no,ORC_CVS=yes) + +AC_CANONICAL_HOST([]) +AM_INIT_AUTOMAKE(1.6) + +ORC_MAJORMINOR=0.4 +AC_SUBST(ORC_MAJORMINOR) + +AM_CONFIG_HEADER(config.h) + +dnl CURRENT, REVISION, AGE +dnl - library source changed -> increment REVISION +dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0 +dnl - interfaces added -> increment AGE +dnl - interfaces removed -> AGE = 0 +ORC_LIBVERSION="11:0:11" +AC_SUBST(ORC_LIBVERSION) +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_TAGS([]) +AC_PROG_LIBTOOL +AM_PROG_CC_C_O +AM_PROG_AS +AC_CONFIG_MACRO_DIR([m4]) + +AC_CONFIG_SRCDIR([orc/orc.h]) + +ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS" +AC_SUBST(ACLOCAL_AMFLAGS) + +AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes") +AC_CHECK_FUNCS([posix_memalign]) + +################################################## +# Check for gtk-doc. +################################################## + +if test "x$cross_compiling" = "xyes" ; then + enable_gtk_doc=no +fi +GTK_DOC_CHECK([1.0]) + + +AS_HOST_DEFINES() + +AC_C_BIGENDIAN + +AX_CREATE_STDINT_H([orc/orc-stdint.h]) + +AC_FUNC_MMAP() + +AC_CHECK_HEADERS([inttypes.h]) +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([unistd.h]) + +AC_CHECK_FUNCS([gettimeofday]) +AC_CHECK_FUNCS([sigaction]) +AC_CHECK_FUNCS([sigsetjmp]) + +AC_CHECK_LIBM +AC_SUBST(LIBM) + +AC_CHECK_LIB(rt, clock_gettime, + AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()]) + LIBRT=-lrt + ) +AC_SUBST(LIBRT) + +AC_CACHE_CHECK(for monotonic clocks, + orc_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include +#include +int main() { +#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) + #error No monotonic clock +#endif + return 0; +} +]])],orc_cv_monotonic_clock=yes,orc_cv_monotonic_clock=no)) +if test "$orc_cv_monotonic_clock" = "yes"; then + AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock]) +fi + +AC_CHECK_HEADERS([valgrind/valgrind.h]) + +AS_COMPILER_FLAG(-Wall, ORC_CFLAGS="$ORC_CFLAGS -Wall") +if test "x$ORC_CVS" = "xyes" +then + AS_COMPILER_FLAG(-Werror, ORC_CFLAGS="$ORC_CFLAGS -Werror") +fi + +case "${host_os}" in + nobody_is_using_this_currently) + AC_DEFINE(HAVE_CODEMEM_MALLOC, 1, [Use malloc to allocate code for execution]) + ;; + mingw*|pw32*|cygwin*) + AC_DEFINE(HAVE_CODEMEM_VIRTUALALLOC, 1, [Use VirtualAlloc to allocate code for execution]) + ;; + linux*|darwin*|solaris*|netbsd*|freebsd*|openbsd*|kfreebsd*|dragonflybsd*|gnu*) + AC_DEFINE(HAVE_CODEMEM_MMAP, 1, [Use mmap to allocate code for execution]) + ;; + *) + AC_ERROR([no code allocation backend]) + ;; +esac + +case "${host_os}" in + mingw*|pw32*|cygwin*) + AC_DEFINE(HAVE_THREAD_WIN32, 1, [Use Windows thread code]) + ;; + *) + AC_DEFINE(HAVE_THREAD_PTHREAD, 1, [Use pthread thread code]) + ;; +esac + +AC_ARG_ENABLE(backend, + AC_HELP_STRING([--enable-backend],[sse,mmx,neon,arm,all (default all)]), + [], [enable_backend=all]) +case "${enable_backend}" in + sse) + ENABLE_BACKEND_SSE=yes + AC_DEFINE(ENABLE_BACKEND_SSE, 1, [Enable SSE backend]) + ;; + mmx) + ENABLE_BACKEND_MMX=yes + AC_DEFINE(ENABLE_BACKEND_MMX, 1, [Enable MMX backend]) + ;; + altivec) + ENABLE_BACKEND_ALTIVEC=yes + AC_DEFINE(ENABLE_BACKEND_ALTIVEC, 1, [Enable Altivec backend]) + ;; + neon) + ENABLE_BACKEND_NEON=yes + AC_DEFINE(ENABLE_BACKEND_NEON, 1, [Enable NEON backend]) + ;; + arm) + ENABLE_BACKEND_ARM=yes + AC_DEFINE(ENABLE_BACKEND_ARM, 1, [Enable Arm backend]) + ;; + c64x) + ENABLE_BACKEND_C64X=yes + AC_DEFINE(ENABLE_BACKEND_C64X, 1, [Enable c64x backend]) + ;; + all|auto) + ENABLE_BACKEND_SSE=yes + AC_DEFINE(ENABLE_BACKEND_SSE, 1, [Enable SSE backend]) + ENABLE_BACKEND_MMX=yes + AC_DEFINE(ENABLE_BACKEND_MMX, 1, [Enable MMX backend]) + ENABLE_BACKEND_ALTIVEC=yes + AC_DEFINE(ENABLE_BACKEND_ALTIVEC, 1, [Enable Altivec backend]) + ENABLE_BACKEND_NEON=yes + AC_DEFINE(ENABLE_BACKEND_NEON, 1, [Enable NEON backend]) + ENABLE_BACKEND_ARM=yes + AC_DEFINE(ENABLE_BACKEND_ARM, 1, [Enable Arm backend]) + ENABLE_BACKEND_C64X=yes + AC_DEFINE(ENABLE_BACKEND_C64X, 1, [Enable c64x backend]) + ;; +esac +AM_CONDITIONAL(ENABLE_BACKEND_SSE, test "x$ENABLE_BACKEND_SSE" = "xyes") +AM_CONDITIONAL(ENABLE_BACKEND_MMX, test "x$ENABLE_BACKEND_MMX" = "xyes") +AM_CONDITIONAL(ENABLE_BACKEND_ALTIVEC, test "x$ENABLE_BACKEND_ALTIVEC" = "xyes") +AM_CONDITIONAL(ENABLE_BACKEND_NEON, test "x$ENABLE_BACKEND_NEON" = "xyes") +AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes") +AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes") + + +AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code]) + +ORC_CFLAGS="$ORC_CFLAGS -I\$(top_srcdir)" +AC_SUBST(ORC_CFLAGS) + +ORC_LIBS="\$(top_builddir)/orc/liborc-$ORC_MAJORMINOR.la $LIBM $LIBRT" +AC_SUBST(ORC_LIBS) + +#CFLAGS=`echo $CFLAGS | sed s/O2/O0/` + +pkgconfigdir="\$(libdir)/pkgconfig" +AC_SUBST(pkgconfigdir) + + +AC_CONFIG_FILES([ +Makefile +doc/Makefile +doc/version.entities +orc/Makefile +orc-test/Makefile +testsuite/Makefile +testsuite/orcc/Makefile +testsuite/benchmorc/Makefile +examples/Makefile +tools/Makefile +orc-uninstalled.pc +orc.pc +]) +AC_OUTPUT + + + diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..df8eea7 --- /dev/null +++ b/depcomp @@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program 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 2, or (at your option) +# any later version. + +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..1de8cd8 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,106 @@ +## Process this file with automake to produce Makefile.in + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE=orc + +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml + +# The directory containing the source code. Relative to $(srcdir). +# gtk-doc will search all .c & .h files beneath here for inline comments +# documenting the functions and macros. +# e.g. DOC_SOURCE_DIR=../../../gtk +DOC_SOURCE_DIR=../orc + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS= + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS= + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml +MKDB_OPTIONS=--sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS= + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS= + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS= + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB=$(top_srcdir)/orc/*.h +CFILE_GLOB=$(top_srcdir)/orc/*.c + +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES= + +# Header files to ignore when scanning. Use base file name, no paths +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +IGNORE_HFILES=orc-stdint.h + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES= + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files=building.xml concepts.xml opcode_table.xml opcodes.xml tutorial.xml table.xml + +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files= + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS= +GTKDOC_LIBS= + +# This includes the standard gtk-doc make rules, copied by gtkdocize. +include $(top_srcdir)/gtk-doc.make + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST += + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want your docs-status tested during 'make check' +if ENABLE_GTK_DOC +#TESTS_ENVIRONMENT = cd $(srcsrc) && +#TESTS = $(GTKDOC_CHECK) +endif + +-include $(top_srcdir)/git.mk + +update-www: + rsync -a html/* cooker.entropywave.com:/srv/code.entropywave.com/www/documentation/orc + diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..d4d2ae5 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,686 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/version.entities.in $(top_srcdir)/gtk-doc.make +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = version.entities +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE = orc + +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml + +# The directory containing the source code. Relative to $(srcdir). +# gtk-doc will search all .c & .h files beneath here for inline comments +# documenting the functions and macros. +# e.g. DOC_SOURCE_DIR=../../../gtk +DOC_SOURCE_DIR = ../orc + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS = + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS = + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml +MKDB_OPTIONS = --sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS = + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS = + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS = + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB = $(top_srcdir)/orc/*.h +CFILE_GLOB = $(top_srcdir)/orc/*.c + +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES = + +# Header files to ignore when scanning. Use base file name, no paths +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +IGNORE_HFILES = orc-stdint.h + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES = + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files = building.xml concepts.xml opcode_table.xml opcodes.xml tutorial.xml table.xml + +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files = + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS = +GTKDOC_LIBS = +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) +TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) + +# This includes the standard gtk-doc make rules, copied by gtkdocize. + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt +DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + pdf-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ + $(srcdir)/pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +version.entities: $(top_builddir)/config.status $(srcdir)/version.entities.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool clean-local dist-hook distclean \ + distclean-generic distclean-libtool distclean-local distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-local mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-local + + +@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +@ENABLE_GTK_DOC_FALSE@all-local: + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + @touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + @touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + @cp version.entities $(srcdir)/xml/ + @touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/html + @mkdir $(srcdir)/html + @mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options=--path="$(srcdir)"; \ + fi; \ + cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + @touch html-build.stamp + +#### pdf #### + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building PDF' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/$(DOC_MODULE).pdf + @mkpdf_imgdirs=""; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + @touch pdf-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html + +install-data-local: + @installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + mv -f $${installdir}/$(DOC_MODULE).devhelp \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" +@ENABLE_GTK_DOC_FALSE@ @false + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + cp $(srcdir)/html/* $(distdir)/html + -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ + cd $(distdir) && rm -f $(DISTCLEANFILES) + $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want your docs-status tested during 'make check' +#TESTS_ENVIRONMENT = cd $(srcsrc) && +#TESTS = $(GTKDOC_CHECK) + +-include $(top_srcdir)/git.mk + +update-www: + rsync -a html/* cooker.entropywave.com:/srv/code.entropywave.com/www/documentation/orc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/building.xml b/doc/building.xml new file mode 100644 index 0000000..8c989a2 --- /dev/null +++ b/doc/building.xml @@ -0,0 +1,84 @@ + + +%version-entities; + +]> + + +Building Orc and Applications That Use Orc +3 +Orc + + + +Building Orc and Applications that use Orc + +How to build Orc and applications using it. + + + + +Building Orc on UNIX + + + + On UNIX, Orc uses the standard GNU build system, + using autoconf for package + configuration and resolving portability issues, + automake for building makefiles + that comply with the GNU Coding Standards, and + libtool for building shared + libraries on multiple platforms. The normal sequence for + compiling and installing the Orc library is thus: + + + ./configure + make + make install + + + + + The standard options provided by GNU + autoconf may be passed to the + configure script. Please see the + autoconf documentation or run + ./configure --help for information about + the standard options. + + + + By default, code generators for all targets are built into the + library. Embedded system developers may wish to use the + --enable-backed option, which will disable all other code + generators, saving about 200 kB in binary size. Outside of + embedded systems, using --enable-backend is not recommended. + + + + + +Building Orc Applications + + +Applications and libraries can use pkg-config to get all the +needed compiler and linker flags to build against Orc. The following +commands will provide the necessary compiler and linker flags: + + + pkg-config --cflags orc-&ORC_MAJORMINOR; + pkg-config --libs orc-&ORC_MAJORMINOR; + + + + +When compiling from source, the default installation directory is not +in the default path for the pkg-config, so you may +need to set the PKG_CONFIG_DIR environment variable. + + + + + diff --git a/doc/concepts.xml b/doc/concepts.xml new file mode 100644 index 0000000..10ae505 --- /dev/null +++ b/doc/concepts.xml @@ -0,0 +1,250 @@ + + +%version-entities; + +]> + + +Orc Concepts +3 +Orc + + + +Orc Concepts + +High-level view of what Orc does. + + + + +Orc Concepts + + + Orc is a compiler for a simple assembly-like language. Unlike + most compilers, Orc is primarily a library, which means that + all its features can be controlled from any application that + uses it. Also unlike most compilers, Orc creates code that + can be immediately exectued by the application. + + + + Orc is mainly useful for generating code that performs simple + mathematical operations on continguous arrays. An example Orc + function, translated to C, might look like: + + + void function (int *dest, int *src1, int *src2, int n) + { + int i; + for (i = 0; i < n; i++) { + dest[i] = (src1[i] + src2[i] + 1) >> 1; + } + } + + + + + + Orc is primarily targetted toward generating code for vector + CPU extensions such as SSE, Altivec, and NEON. + + + + Possible usage patterns: + + + + The application generates Orc code programmatically. + Generate Orc programs programmatically at runtime, compile at + runtime, and execute. This is what many of the Orc test programs + do, and is the most flexible and well-developed method at this + time. This requires depending on the Orc library at runtime. + + + + The application developer uses Orc to produce assembly source + code that is then compiled into the application. This requires + the developer to have Orc installed at build time. The advantage + of this method is no Orc dependency at runtime. Disadvantages + are a more complex build process, potential for compiler + incompatibilities with generated assembly source code, and any + Orc improvements require the application to be recompiled. + + + + The application developer writes Orc source files, and compiles + them into Orc bytecode to be included in the application. At + runtime, Orc compiles the bytecode into executable code. This + has the advantage of being easily editable. This method is + still somewhat experimental. + + + + A wide variety of additional workflows are possible, although + tools are not yet available to make it convenient. + + + + + + + + + + + +Concepts + + + The OrcProgram is the primary object that applications use when + using Orc to create code. It contains all the information related to + what is essentially a function definition in C. Orc programs can + be compiled into assembly source code, or directly into binary code + that can be executed as part of the running process. On CPUs that + are not supported, programs can also be executed via emulation. Orc + programs can also be compiled into C source code. + + + + A program contains one or more instructions and operates on one or + more source and destination arrays, and may use scalar parameters. + When compiled and executed, or emulated, the instructions define + the operations performed on each source array member, and the results + are placed in the destination array. Another way of thinking about + it is that the compiler generates code that iterates over the + destination array, calculating the value of each members based on + the program instructions and the corresponding values in the source + arrays and scalar parameters. + + + + The form of programs is strictly limited so that they may be compiled + into vector instructions effectively. It is anticipated that future + versions of Orc will allow more complex programs. + + + + The arrays that Orc programs operate on must be contiguous. + + + + Some example operations are "addw" which adds two 16-bit integers, + "convsbw" which converts a signed byte to a signed 16-bit integer, + and "minul" which selects the lesser of two 32-bit unsigned + integers. Orc only checks that the size of the operand matches + the size of the variable. Thus, the compiler will not warn against + using "minul" with signed 32-bit integers, because it does not know + that the variables are signed or unsigned. + + + + Orc has a main set of opcodes, that is, an OrcOpcodeSet, with the + name "sys". These opcodes are always available. They cover most + common arithmetic and conversion instructions for 8, 16, and 32-bit + integers. There are two auxiliary libraries that provide additional + opcode sets, the liborc-float library that contains the "float" + opcode set for 32 and 64-bit floating point operations, and the + liborc-pixel library containing the "pixel" opcode set for operations + on 32-bit RGBA pixels. + + + + Orc programs are compiled using the function orc_program_compile(). + The compiled code will be targetted for the current processor, which + is useful for compiling code that will be immediately executed. + Compiling for other processor families or processor family variants, + in order to produce assembly source code, can be accomplished using + one of the orc_program_compile variants. + + + + Once an Orc program is compiled, it can be executed by creating + an OrcExecutor structure, linking it to the program to be executed, + setting the arrays and parameters, and setting the iteration count. + Orc executors are the equivalent of stack frames in a called function + in normal C code. However, all Orc programs use the same OrcExecutor + structure, which makes code that manipulates executors simpler in + respect to those that manipulate stack frames. Executors can be + reused. + + + + An OrcTarget represents a particular instruction set or CPU family + for which code can be generated. Current targets include MMX, SSE, + Altivec, NEON, and ARM. There is also a special target that generates C + source code, but is not capable of producing executable code at + runtime. In most cases, the default target is the most appropriate + target for the current CPU. + + + + Individual Orc targets may have various options that control code + generation for that target. For example, the various CPUs handled + by the SSE target have different subsets of SSE instructions that + are supported. The target flags for SSE enable generation of the + different subsets of SSE instructions. + + + + In order to produce target code, the Orc compiler finds an appropriate + OrcRule to translate the instruction to target code. An OrcRuleSet + is an array of rules that all have the required target flags, and + a target may have one or more rule sets that can be enabled or + disabled based on the target flags. In many cases, Orc instructions + can be translated into one or two target instructions, which generates + fast code. In other cases, the CPU indicated by the target and target + flags does not have a fast method of performing the Orc instruction, + and a slower method is chosen. This is indicated in the value returned + by the compiling function call. In yet other cases, there is no + implemented rule to translate an Orc instruction to target code, so + compilation fails. + + + + Compilation can fail for one of two main reasons. One reason is that + the compiler was unable to parse the correct meaning, such as an + unknown opcode, undeclared variable, or a size mismatch. These are + uncorrectible errors, and the program cannot be executed or emulated. + The other reason for a compilation failure is that target code could + not be generated for a variety of reasons, including missing rules + or unimplemented features. In this case, the program can be emulated. + This process occurs automatically. + + + + Emulation is generally slower than corresponding C code. Since the + Orc compiler can produce C source code, it is possible to generate + and compile backup C code for programs. This process is not yet + automatic. + + + + + +Extending Orc + + + Developers can extend Orc primarily by adding new opcode sets, adding + new targets, and by adding new target rules. + + + + Additional opcode sets can be created and registered in a manner + similar to how the liborc-float and liborc-pixel libraries. In order + to make full use of new opcode sets, one must also define rules for + translating these opcodes into target code. The example libraries + do this by registering rule sets for various targets (mainly SSE) + for their opcode sets. Orc provides low-level API for generating + target code. Not all possible target instructions can be generated + with the target API, so developers may need to modify and add + functions to the main Orc library as necessary to generate target + code. + + + + + + diff --git a/doc/html/ch01.html b/doc/html/ch01.html new file mode 100644 index 0000000..5181320 --- /dev/null +++ b/doc/html/ch01.html @@ -0,0 +1,47 @@ + + + + +Overview + + + + + + + + + + + + + + + + +
+

+Overview

+
+
+Building Orc and Applications That Use Orc — +How to build Orc and applications using it. + +
+
+Orc Concepts — +High-level view of what Orc does. + +
+
+Orc Tutorial — +Getting started writing Orc code. + +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/ch02.html b/doc/html/ch02.html new file mode 100644 index 0000000..05b96b8 --- /dev/null +++ b/doc/html/ch02.html @@ -0,0 +1,49 @@ + + + + +Application API + + + + + + + + + + + + + + + + +
+

+Application API

+
+
+Orc — Library Initialization +
+
+OrcProgram — Creating and manipulating Orc programs +
+
+OrcCompiler — Compile Orc programs +
+
+OrcExecutor — Running Orc programs +
+
+Orc Opcodes — +Description of Opcodes + +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/ch03.html b/doc/html/ch03.html new file mode 100644 index 0000000..1732a15 --- /dev/null +++ b/doc/html/ch03.html @@ -0,0 +1,44 @@ + + + + +Extension API + + + + + + + + + + + + + + + + +
+

+Extension API

+
+
+OrcDebug — Printing and formatting debug information +
+
+OrcOpcode — Operations +
+
+Utility functions — Orc utility functions +
+
+OrcRule — Creating rules for code generation +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/ch04.html b/doc/html/ch04.html new file mode 100644 index 0000000..96c07cb --- /dev/null +++ b/doc/html/ch04.html @@ -0,0 +1,47 @@ + + + + +Code Generation + + + + + + + + + + + + + + + + +
+

+Code Generation

+
+
+ARM — code generation for ARM +
+
+MMX — code generation for MMX +
+
+PowerPC — code generation for PowerPC +
+
+SSE — code generation for SSE +
+
+x86 — code generation for x86 +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/ch05.html b/doc/html/ch05.html new file mode 100644 index 0000000..6d3f6d4 --- /dev/null +++ b/doc/html/ch05.html @@ -0,0 +1,33 @@ + + + + +Herein lie dragons + + + + + + + + + + + + + + + + +
+

+Herein lie dragons

+
+misc +
+
+ + + \ No newline at end of file diff --git a/doc/html/home.png b/doc/html/home.png new file mode 100644 index 0000000000000000000000000000000000000000..17003611d9df2b066afc682cbde962f3a575002d GIT binary patch literal 654 zcmV;90&)F`P)~yY zO1cF+0vxb!W?!x?K+*#62Jq)nA4q`)5S6sgX4ao{=)(Mgq+YMr)7sjak|a^9)zS!j zlk{-n29mabXYF=7SYBQx&vO8xC}MYams+hxqtO7sImhPaCf@rq;I^3!#u*2aUP)55 zT2&N90xmEJ0s&fGT~(T<3d2xYmK9C>IP*x-M@ib*+0pFm>>uW37N2Wzaq-fCnIZE9 zpb8}0+uN+KuQM2oZVHfP8U6kQdo3?>Wo2dT)WeM9So8DqhLi#T0 z-i(>mfjhvbsYV`;4sgfJ-p>G-SqJ!fjR6BQYs1h*y9xaN0l{VB;o%`08yiy@)$8@~ z2PD1gcDuiy;j1tR0v#V8OH%W)25-YKyx(j#IXO9*YWf0mb8}QG6@b@;cHxh9{t7+@ o!Yd`f8L$sLH?yBt^q3C6015TtIu@BS5dZ)H07*qoM6N<$f*igdr~m)} literal 0 HcmV?d00001 diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 0000000..2cafe83 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,107 @@ + + + + +Orc Reference Manual + + + + + + + +
+
+
+
+

+ for Orc-0.4.11. + The latest version of this documentation can be found on-line at + http://code.entropywave.com/documentation/orc/. +

+
+
+
+
+
Overview
+
+
+Building Orc and Applications That Use Orc — +How to build Orc and applications using it. + +
+
+Orc Concepts — +High-level view of what Orc does. + +
+
+Orc Tutorial — +Getting started writing Orc code. + +
+
+
Application API
+
+
+Orc — Library Initialization +
+
+OrcProgram — Creating and manipulating Orc programs +
+
+OrcCompiler — Compile Orc programs +
+
+OrcExecutor — Running Orc programs +
+
+Orc Opcodes — +Description of Opcodes + +
+
+
Extension API
+
+
+OrcDebug — Printing and formatting debug information +
+
+OrcOpcode — Operations +
+
+Utility functions — Orc utility functions +
+
+OrcRule — Creating rules for code generation +
+
+
Code Generation
+
+
+ARM — code generation for ARM +
+
+MMX — code generation for MMX +
+
+PowerPC — code generation for PowerPC +
+
+SSE — code generation for SSE +
+
+x86 — code generation for x86 +
+
+
Herein lie dragons
+
+misc +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/index.sgml b/doc/html/index.sgml new file mode 100644 index 0000000..25c1b38 --- /dev/null +++ b/doc/html/index.sgml @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/left.png b/doc/html/left.png new file mode 100644 index 0000000000000000000000000000000000000000..2d05b3d5b4aeec9384bbfe404bfc4ed0897051c4 GIT binary patch literal 459 zcmV;+0W|)JP)40xL?wO*>WZ(J#ML5j2<9jD6A%Q&kC}jOeEc;X{s;`zcnxLeZR6?6h#^ihmNF6NpGdilO$m<82oD9WQ|6nVv1`? z>KufRi{?QPXg;4;wroQu4?mN1Ydd@|kaQ|ZyWLK!)yi7Wb%=0{}lD)tfliHAUyWRQ+fD_;aV6j->y6!O_8bENg + + + +ARM + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

ARM

+

ARM — code generation for ARM

+
+
+

Synopsis

+
enum                OrcArmCond;
+enum                OrcArmDP;
+enum                OrcArmRegister;
+void                orc_arm_do_fixups                   (OrcCompiler *compiler);
+void                orc_arm_emit                        (OrcCompiler *compiler,
+                                                         orc_uint32 insn);
+void                orc_arm_emit_add                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int src2);
+void                orc_arm_emit_add_imm                (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int value);
+void                orc_arm_emit_branch                 (OrcCompiler *compiler,
+                                                         int cond,
+                                                         int label);
+void                orc_arm_emit_bx_lr                  (OrcCompiler *compiler);
+void                orc_arm_emit_cmp_imm                (OrcCompiler *compiler,
+                                                         int src1,
+                                                         int value);
+void                orc_arm_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+void                orc_arm_emit_load_reg               (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int offset);
+void                orc_arm_emit_mov                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src);
+void                orc_arm_emit_pop                    (OrcCompiler *compiler,
+                                                         int regs);
+void                orc_arm_emit_push                   (OrcCompiler *compiler,
+                                                         int regs);
+void                orc_arm_emit_sub                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int src2);
+void                orc_arm_emit_sub_imm                (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int value,
+                                                         int record);
+void                orc_arm_loadw                       (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int offset);
+const char *        orc_arm_reg_name                    (int reg);
+void                orc_arm_storew                      (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int offset,
+                                                         int src1);
+
+
+
+

Description

+
+
+

Details

+
+

enum OrcArmCond

+
typedef enum {
+  ORC_ARM_COND_EQ = 0,
+  ORC_ARM_COND_NE,
+  ORC_ARM_COND_CS,
+  ORC_ARM_COND_CC,
+  ORC_ARM_COND_MI,
+  ORC_ARM_COND_PL,
+  ORC_ARM_COND_VS,
+  ORC_ARM_COND_VC,
+  ORC_ARM_COND_HI,
+  ORC_ARM_COND_LS,
+  ORC_ARM_COND_GE,
+  ORC_ARM_COND_LT,
+  ORC_ARM_COND_GT,
+  ORC_ARM_COND_LE,
+  ORC_ARM_COND_AL,
+} OrcArmCond;
+
+

+

+
+
+
+

enum OrcArmDP

+
typedef enum {
+  ORC_ARM_DP_AND = 0,
+  ORC_ARM_DP_EOR,
+  ORC_ARM_DP_SUB,
+  ORC_ARM_DP_RSB,
+  ORC_ARM_DP_ADD,
+  ORC_ARM_DP_ADC,
+  ORC_ARM_DP_SBC,
+  ORC_ARM_DP_RSC,
+  ORC_ARM_DP_TST,
+  ORC_ARM_DP_TEQ,
+  ORC_ARM_DP_CMP,
+  ORC_ARM_DP_CMN,
+  ORC_ARM_DP_ORR,
+  ORC_ARM_DP_MOV,
+  ORC_ARM_DP_BIC,
+  ORC_ARM_DP_MVN
+} OrcArmDP;
+
+

+

+
+
+
+

enum OrcArmRegister

+
typedef enum {
+  ORC_ARM_A1 = ORC_GP_REG_BASE+0,
+  ORC_ARM_A2,
+  ORC_ARM_A3,
+  ORC_ARM_A4,
+  ORC_ARM_V1,
+  ORC_ARM_V2,
+  ORC_ARM_V3,
+  ORC_ARM_V4,
+  ORC_ARM_V5,
+  ORC_ARM_V6,
+  ORC_ARM_V7,
+  ORC_ARM_V8,
+  ORC_ARM_IP,
+  ORC_ARM_SP,
+  ORC_ARM_LR,
+  ORC_ARM_PC
+} OrcArmRegister;
+
+

+

+
+
+
+

orc_arm_do_fixups ()

+
void                orc_arm_do_fixups                   (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_arm_emit ()

+
void                orc_arm_emit                        (OrcCompiler *compiler,
+                                                         orc_uint32 insn);
+

+

+
++ + + + + + + + + + +

compiler :

+

insn :

+
+
+
+
+

orc_arm_emit_add ()

+
void                orc_arm_emit_add                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int src2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

src2 :

+
+
+
+
+

orc_arm_emit_add_imm ()

+
void                orc_arm_emit_add_imm                (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

value :

+
+
+
+
+

orc_arm_emit_branch ()

+
void                orc_arm_emit_branch                 (OrcCompiler *compiler,
+                                                         int cond,
+                                                         int label);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

cond :

+

label :

+
+
+
+
+

orc_arm_emit_bx_lr ()

+
void                orc_arm_emit_bx_lr                  (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_arm_emit_cmp_imm ()

+
void                orc_arm_emit_cmp_imm                (OrcCompiler *compiler,
+                                                         int src1,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

src1 :

+

value :

+
+
+
+
+

orc_arm_emit_label ()

+
void                orc_arm_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_arm_emit_load_reg ()

+
void                orc_arm_emit_load_reg               (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int offset);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

offset :

+
+
+
+
+

orc_arm_emit_mov ()

+
void                orc_arm_emit_mov                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

dest :

+

src :

+
+
+
+
+

orc_arm_emit_pop ()

+
void                orc_arm_emit_pop                    (OrcCompiler *compiler,
+                                                         int regs);
+

+

+
++ + + + + + + + + + +

compiler :

+

regs :

+
+
+
+
+

orc_arm_emit_push ()

+
void                orc_arm_emit_push                   (OrcCompiler *compiler,
+                                                         int regs);
+

+

+
++ + + + + + + + + + +

compiler :

+

regs :

+
+
+
+
+

orc_arm_emit_sub ()

+
void                orc_arm_emit_sub                    (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int src2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

src2 :

+
+
+
+
+

orc_arm_emit_sub_imm ()

+
void                orc_arm_emit_sub_imm                (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int value,
+                                                         int record);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

value :

+

record :

+
+
+
+
+

orc_arm_loadw ()

+
void                orc_arm_loadw                       (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int src1,
+                                                         int offset);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

src1 :

+

offset :

+
+
+
+
+

orc_arm_reg_name ()

+
const char *        orc_arm_reg_name                    (int reg);
+

+

+
++ + + + + + + + + + +

reg :

+

Returns :

+
+
+
+
+

orc_arm_storew ()

+
void                orc_arm_storew                      (OrcCompiler *compiler,
+                                                         int dest,
+                                                         int offset,
+                                                         int src1);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

dest :

+

offset :

+

src1 :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-MMX.html b/doc/html/orc-MMX.html new file mode 100644 index 0000000..897f5fa --- /dev/null +++ b/doc/html/orc-MMX.html @@ -0,0 +1,651 @@ + + + + +MMX + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

MMX

+

MMX — code generation for MMX

+
+
+

Synopsis

+
enum                OrcMMXRegister;
+enum                OrcTargetMMXFlags;
+#define             ORC_MMX_SHUF                        (a,
+                                                         b,
+                                                         c,
+                                                         d)
+void                orc_mmx_emit_0f                     (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_mmx_emit_660f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_mmx_emit_f20f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_mmx_emit_f30f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_mmx_emit_loadib                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadil                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadiw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadpb                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadpl                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadpq                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_loadpw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_mmx_emit_pshufw                 (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+void                orc_mmx_emit_shiftimm               (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int modrm_code,
+                                                         int shift,
+                                                         int reg);
+unsigned int        orc_mmx_get_cpu_flags               (void);
+void                orc_mmx_init                        (void);
+
+
+
+

Description

+
+
+

Details

+
+

enum OrcMMXRegister

+
typedef enum {
+  X86_MM0 = ORC_VEC_REG_BASE,
+  X86_MM1,
+  X86_MM2,
+  X86_MM3,
+  X86_MM4,
+  X86_MM5,
+  X86_MM6,
+  X86_MM7
+} OrcMMXRegister;
+
+

+

+
+
+
+

enum OrcTargetMMXFlags

+
typedef enum {
+  ORC_TARGET_MMX_MMX = (1<<0),
+  ORC_TARGET_MMX_MMXEXT = (1<<1),
+  ORC_TARGET_MMX_3DNOW = (1<<2),
+  ORC_TARGET_MMX_3DNOWEXT = (1<<3),
+  ORC_TARGET_MMX_SSSE3 = (1<<4),
+  ORC_TARGET_MMX_SSE4_1 = (1<<5),
+  ORC_TARGET_MMX_SSE4_2 = (1<<6),
+  ORC_TARGET_MMX_FRAME_POINTER = (1<<7),
+  ORC_TARGET_MMX_SHORT_JUMPS = (1<<8),
+  ORC_TARGET_MMX_64BIT = (1<<9)
+} OrcTargetMMXFlags;
+
+

+

+
+
+
+

ORC_MMX_SHUF()

+
#define ORC_MMX_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0))
+
+

+

+
++ + + + + + + + + + + + + + + + + + +

a :

+

b :

+

c :

+

d :

+
+
+
+
+

orc_mmx_emit_0f ()

+
void                orc_mmx_emit_0f                     (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_mmx_emit_660f ()

+
void                orc_mmx_emit_660f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_mmx_emit_f20f ()

+
void                orc_mmx_emit_f20f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_mmx_emit_f30f ()

+
void                orc_mmx_emit_f30f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_mmx_emit_loadib ()

+
void                orc_mmx_emit_loadib                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadil ()

+
void                orc_mmx_emit_loadil                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadiw ()

+
void                orc_mmx_emit_loadiw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadpb ()

+
void                orc_mmx_emit_loadpb                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadpl ()

+
void                orc_mmx_emit_loadpl                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadpq ()

+
void                orc_mmx_emit_loadpq                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_loadpw ()

+
void                orc_mmx_emit_loadpw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_mmx_emit_pshufw ()

+
void                orc_mmx_emit_pshufw                 (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + +

p :

+

shuf :

+

src :

+

dest :

+
+
+
+
+

orc_mmx_emit_shiftimm ()

+
void                orc_mmx_emit_shiftimm               (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int modrm_code,
+                                                         int shift,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

modrm_code :

+

shift :

+

reg :

+
+
+
+
+

orc_mmx_get_cpu_flags ()

+
unsigned int        orc_mmx_get_cpu_flags               (void);
+

+

+
++ + + + +

Returns :

+
+
+
+
+

orc_mmx_init ()

+
void                orc_mmx_init                        (void);
+

+

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-Orc.html b/doc/html/orc-Orc.html new file mode 100644 index 0000000..7863de2 --- /dev/null +++ b/doc/html/orc-Orc.html @@ -0,0 +1,63 @@ + + + + +Orc + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Orc

+

Orc — Library Initialization

+
+
+

Synopsis

+
void                orc_init                            (void);
+
+
+
+

Description

+
+
+

Details

+
+

orc_init ()

+
void                orc_init                            (void);
+

+This function initializes the Orc library, and +should be called before using any other Orc function. +Subsequent calls to this function have no effect. +

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcCompiler.html b/doc/html/orc-OrcCompiler.html new file mode 100644 index 0000000..4ed6645 --- /dev/null +++ b/doc/html/orc-OrcCompiler.html @@ -0,0 +1,258 @@ + + + + +OrcCompiler + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcCompiler

+

OrcCompiler — Compile Orc programs

+
+
+

Synopsis

+
enum                OrcCompileResult;
+                    OrcCompiler;
+                    OrcConstant;
+#define             ORC_COMPILER_ERROR                  (compiler,
+                                                         ...)
+#define             ORC_COMPILE_RESULT_IS_FATAL         (x)
+#define             ORC_COMPILE_RESULT_IS_SUCCESSFUL    (x)
+#define             ORC_ASM_CODE                        (compiler,
+                                                         ...)
+#define             ORC_ENABLE_ASM_CODE
+void                orc_compiler_append_code            (OrcCompiler *p,
+                                                         const char *fmt);
+int                 orc_compiler_label_new              (OrcCompiler *compiler);
+
+
+
+

Description

+

+OrcCompiler is the object used to convert Orc programs contained +in an OrcProgram object into assembly code and object code. +

+

+The OrcCompileResult enum is used to indicate whether or not +a compilation attempt was successful or not. The macros +ORC_COMPILE_RESULT_IS_SUCCESSFUL() and ORC_COMPILE_RESULT_IS_FATAL() +should be used instead of checking values directly. +

+

+When a program is compiled, the compiler calls the functions +contained in various OrcRule structures. These functions generate +assembly and object instructions by calling ORC_ASM_CODE() +or functions that use ORC_ASM_CODE() internally. +

+
+
+

Details

+
+

enum OrcCompileResult

+
typedef enum {
+  ORC_COMPILE_RESULT_OK = 0,
+
+  ORC_COMPILE_RESULT_UNKNOWN_COMPILE = 0x100,
+  ORC_COMPILE_RESULT_MISSING_RULE = 0x101,
+
+  ORC_COMPILE_RESULT_UNKNOWN_PARSE = 0x200,
+  ORC_COMPILE_RESULT_PARSE = 0x201,
+  ORC_COMPILE_RESULT_VARIABLE = 0x202
+
+} OrcCompileResult;
+
+

+

+
+
+
+

OrcCompiler

+
typedef struct {
+} OrcCompiler;
+
+

+The OrcCompiler structure has no public members +

+
+
+
+

OrcConstant

+
typedef struct {
+} OrcConstant;
+
+

+The OrcConstant structure has no public members +

+
+
+
+

ORC_COMPILER_ERROR()

+
#define             ORC_COMPILER_ERROR(compiler, ...)
+

+

+
++ + + + + + + + + + +

compiler :

+

... :

+
+
+
+
+

ORC_COMPILE_RESULT_IS_FATAL()

+
#define ORC_COMPILE_RESULT_IS_FATAL(x) ((x) >= 0x200)
+
+

+

+
++ + + + +

x :

+
+
+
+
+

ORC_COMPILE_RESULT_IS_SUCCESSFUL()

+
#define ORC_COMPILE_RESULT_IS_SUCCESSFUL(x) ((x) < 0x100)
+
+

+

+
++ + + + +

x :

+
+
+
+
+

ORC_ASM_CODE()

+
#define             ORC_ASM_CODE(compiler,...)
+

+

+
++ + + + + + + + + + +

compiler :

+

... :

+
+
+
+
+

ORC_ENABLE_ASM_CODE

+
#define ORC_ENABLE_ASM_CODE
+
+

+

+
+
+
+

orc_compiler_append_code ()

+
void                orc_compiler_append_code            (OrcCompiler *p,
+                                                         const char *fmt);
+

+Generates a string using sprintf() on the given format and +arguments, and appends that string to the generated assembly +code for the compiler. +

+

+This function is used by the ORC_ASM_CODE() macro. +

+

+This function is useful in a function implementing an OrcRule +or implementing a target. +

+
++ + + + + + + + + + +

p :

an OrcCompiler object +

fmt :

a printf-style format string +
+
+
+
+

orc_compiler_label_new ()

+
int                 orc_compiler_label_new              (OrcCompiler *compiler);
+

+

+
++ + + + + + + + + + +

compiler :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcDebug.html b/doc/html/orc-OrcDebug.html new file mode 100644 index 0000000..9b05ebb --- /dev/null +++ b/doc/html/orc-OrcDebug.html @@ -0,0 +1,398 @@ + + + + +OrcDebug + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcDebug

+

OrcDebug — Printing and formatting debug information

+
+
+

Synopsis

+
enum                OrcDebugLevel;
+void                (*OrcDebugPrintFunc)                (int level,
+                                                         const char *file,
+                                                         const char *func,
+                                                         int line,
+                                                         const char *format,
+                                                         va_list varargs);
+#define             ORC_DEBUG_PRINT                     (level,
+                                                         ...)
+#define             ORC_ERROR                           (...)
+#define             ORC_WARNING                         (...)
+#define             ORC_INFO                            (...)
+#define             ORC_DEBUG                           (...)
+#define             ORC_LOG                             (...)
+#define             ORC_FUNCTION
+int                 orc_debug_get_level                 (void);
+void                orc_debug_print                     (int level,
+                                                         const char *file,
+                                                         const char *func,
+                                                         int line,
+                                                         const char *format,
+                                                         ...);
+void                orc_debug_set_level                 (int level);
+void                orc_debug_set_print_function        (OrcDebugPrintFunc func);
+
+
+
+

Description

+
+
+

Details

+
+

enum OrcDebugLevel

+
typedef enum {
+  ORC_DEBUG_NONE = 0,
+  ORC_DEBUG_ERROR,
+  ORC_DEBUG_WARNING,
+  ORC_DEBUG_INFO,
+  ORC_DEBUG_DEBUG,
+  ORC_DEBUG_LOG
+} OrcDebugLevel;
+
+

+Enumeration describing debug levels in Orc. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

ORC_DEBUG_NONE

No debugging. Used to disable debugging output. +

ORC_DEBUG_ERROR

The level for messages indicating that an error + has occurred that causes Orc to produce incorrect results. Also + used temporarily by developers for testing code. +

ORC_DEBUG_WARNING

Messages at this level indicate something has + occurred that a developer looking into an application problem may + want to know. +

ORC_DEBUG_INFO

Messages at this level provide high-level + information about Orc internals. +

ORC_DEBUG_DEBUG

The default level for logging messages. +

ORC_DEBUG_LOG

The level for messages that probably don't need to + be logged at all. +
+
+
+
+

OrcDebugPrintFunc ()

+
void                (*OrcDebugPrintFunc)                (int level,
+                                                         const char *file,
+                                                         const char *func,
+                                                         int line,
+                                                         const char *format,
+                                                         va_list varargs);
+

+Typedef describing functions that can be registered using +orc_debug_set_print_function() so that it is called to +print debugging messages. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

level :

the debug level +

file :

name of the file where the debug message occurs +

func :

name of the function where the debug message occurs +

line :

line in the file where the debug message occurs +

format :

a printf format +

varargs :

varargs for the printf format +
+
+
+
+

ORC_DEBUG_PRINT()

+
#define             ORC_DEBUG_PRINT(level, ...)
+

+Macro to call orc_debug_print() with the correct values for +the name of the source file, line of source file, and function. +

+
++ + + + + + + + + + +

level :

debug level of message +

... :

printf-style format and arguments +
+
+
+
+

ORC_ERROR()

+
#define ORC_ERROR(...) ORC_DEBUG_PRINT(ORC_DEBUG_ERROR, __VA_ARGS__)
+
+

+Macro to call ORC_DEBUG_PRINT() with a level of ORC_DEBUG_ERROR. +

+
++ + + + +

... :

printf-style format and arguments +
+
+
+
+

ORC_WARNING()

+
#define ORC_WARNING(...) ORC_DEBUG_PRINT(ORC_DEBUG_WARNING, __VA_ARGS__)
+
+

+Macro to call ORC_DEBUG_PRINT() with a level of ORC_DEBUG_WARNING. +

+
++ + + + +

... :

printf-style format and arguments +
+
+
+
+

ORC_INFO()

+
#define ORC_INFO(...) ORC_DEBUG_PRINT(ORC_DEBUG_INFO, __VA_ARGS__)
+
+

+Macro to call ORC_DEBUG_PRINT() with a level of ORC_DEBUG_INFO. +

+
++ + + + +

... :

printf-style format and arguments +
+
+
+
+

ORC_DEBUG()

+
#define ORC_DEBUG(...) ORC_DEBUG_PRINT(ORC_DEBUG_DEBUG, __VA_ARGS__)
+
+

+Macro to call ORC_DEBUG_PRINT() with a level of ORC_DEBUG_DEBUG. +

+
++ + + + +

... :

printf-style format and arguments +
+
+
+
+

ORC_LOG()

+
#define ORC_LOG(...) ORC_DEBUG_PRINT(ORC_DEBUG_LOG, __VA_ARGS__)
+
+

+Macro to call ORC_DEBUG_PRINT() with a level of ORC_DEBUG_LOG. +

+
++ + + + +

... :

printf-style format and arguments +
+
+
+
+

ORC_FUNCTION

+
#define             ORC_FUNCTION
+

+Internal macro that points to __PRETTY_FUNCTION__ or __func__ +if the former is not available. +

+
+
+
+

orc_debug_get_level ()

+
int                 orc_debug_get_level                 (void);
+

+Gets the current debug level. +

+
++ + + + +

Returns :

the current debug level +
+
+
+
+

orc_debug_print ()

+
void                orc_debug_print                     (int level,
+                                                         const char *file,
+                                                         const char *func,
+                                                         int line,
+                                                         const char *format,
+                                                         ...);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

level :

+

file :

+

func :

+

line :

+

format :

+

... :

+
+
+
+
+

orc_debug_set_level ()

+
void                orc_debug_set_level                 (int level);
+

+Sets the current debug level. +

+
++ + + + +

level :

the new debug level +
+
+
+
+

orc_debug_set_print_function ()

+
void                orc_debug_set_print_function        (OrcDebugPrintFunc func);
+

+Sets the function to call when outputting debugging information. +A value of NULL for func will restore the default handler, +which prints debugging information to stderr. +

+
++ + + + +

func :

the function to call +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcExecutor.html b/doc/html/orc-OrcExecutor.html new file mode 100644 index 0000000..84fe854 --- /dev/null +++ b/doc/html/orc-OrcExecutor.html @@ -0,0 +1,369 @@ + + + + +OrcExecutor + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcExecutor

+

OrcExecutor — Running Orc programs

+
+
+

Synopsis

+
                    OrcExecutor;
+OrcExecutor *       orc_executor_new                    (OrcProgram *program);
+void                orc_executor_free                   (OrcExecutor *ex);
+void                orc_executor_set_array              (OrcExecutor *ex,
+                                                         int var,
+                                                         void *ptr);
+void                orc_executor_set_array_str          (OrcExecutor *ex,
+                                                         const char *name,
+                                                         void *ptr);
+void                orc_executor_set_n                  (OrcExecutor *ex,
+                                                         int n);
+void                orc_executor_emulate                (OrcExecutor *ex);
+void                orc_executor_run                    (OrcExecutor *ex);
+int                 orc_executor_get_accumulator        (OrcExecutor *ex,
+                                                         int var);
+int                 orc_executor_get_accumulator_str    (OrcExecutor *ex,
+                                                         const char *name);
+void                orc_executor_set_param              (OrcExecutor *ex,
+                                                         int var,
+                                                         int value);
+void                orc_executor_set_param_str          (OrcExecutor *ex,
+                                                         const char *name,
+                                                         int value);
+void                orc_executor_set_program            (OrcExecutor *ex,
+                                                         OrcProgram *program);
+
+
+
+

Description

+
+
+

Details

+
+

OrcExecutor

+
typedef struct {
+} OrcExecutor;
+
+
+
+
+

orc_executor_new ()

+
OrcExecutor *       orc_executor_new                    (OrcProgram *program);
+

+

+
++ + + + + + + + + + +

program :

+

Returns :

+
+
+
+
+

orc_executor_free ()

+
void                orc_executor_free                   (OrcExecutor *ex);
+

+

+
++ + + + +

ex :

+
+
+
+
+

orc_executor_set_array ()

+
void                orc_executor_set_array              (OrcExecutor *ex,
+                                                         int var,
+                                                         void *ptr);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

var :

+

ptr :

+
+
+
+
+

orc_executor_set_array_str ()

+
void                orc_executor_set_array_str          (OrcExecutor *ex,
+                                                         const char *name,
+                                                         void *ptr);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

name :

+

ptr :

+
+
+
+
+

orc_executor_set_n ()

+
void                orc_executor_set_n                  (OrcExecutor *ex,
+                                                         int n);
+

+

+
++ + + + + + + + + + +

ex :

+

n :

+
+
+
+
+

orc_executor_emulate ()

+
void                orc_executor_emulate                (OrcExecutor *ex);
+

+

+
++ + + + +

ex :

+
+
+
+
+

orc_executor_run ()

+
void                orc_executor_run                    (OrcExecutor *ex);
+

+

+
++ + + + +

ex :

+
+
+
+
+

orc_executor_get_accumulator ()

+
int                 orc_executor_get_accumulator        (OrcExecutor *ex,
+                                                         int var);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

var :

+

Returns :

+
+
+
+
+

orc_executor_get_accumulator_str ()

+
int                 orc_executor_get_accumulator_str    (OrcExecutor *ex,
+                                                         const char *name);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

name :

+

Returns :

+
+
+
+
+

orc_executor_set_param ()

+
void                orc_executor_set_param              (OrcExecutor *ex,
+                                                         int var,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

var :

+

value :

+
+
+
+
+

orc_executor_set_param_str ()

+
void                orc_executor_set_param_str          (OrcExecutor *ex,
+                                                         const char *name,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

ex :

+

name :

+

value :

+
+
+
+
+

orc_executor_set_program ()

+
void                orc_executor_set_program            (OrcExecutor *ex,
+                                                         OrcProgram *program);
+

+

+
++ + + + + + + + + + +

ex :

+

program :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcOpcode.html b/doc/html/orc-OrcOpcode.html new file mode 100644 index 0000000..11038b3 --- /dev/null +++ b/doc/html/orc-OrcOpcode.html @@ -0,0 +1,500 @@ + + + + +OrcOpcode + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcOpcode

+

OrcOpcode — Operations

+
+
+

Synopsis

+
void                (*OrcOpcodeEmulateFunc)             (OrcOpcodeExecutor *ex,
+                                                         void *user);
+                    OrcOpcodeExecutor;
+                    OrcOpcodeSet;
+                    OrcRuleSet;
+                    OrcStaticOpcode;
+                    OrcTarget;
+#define             ORC_OPCODE_N_ARGS
+#define             ORC_STATIC_OPCODE_ACCUMULATOR
+#define             ORC_STATIC_OPCODE_N_DEST
+#define             ORC_STATIC_OPCODE_N_SRC
+OrcStaticOpcode *   orc_opcode_find_by_name             (const char *name);
+void                orc_opcode_init                     (void);
+int                 orc_opcode_register_static          (OrcStaticOpcode *sopcode,
+                                                         char *prefix);
+int                 orc_opcode_set_find_by_name         (OrcOpcodeSet *opcode_set,
+                                                         const char *name);
+OrcOpcodeSet *      orc_opcode_set_get                  (const char *name);
+OrcRuleSet *        orc_rule_set_new                    (OrcOpcodeSet *opcode_set,
+                                                         OrcTarget *target,
+                                                         unsigned int required_flags);
+const char *        orc_target_get_asm_preamble         (const char *target);
+OrcTarget *         orc_target_get_by_name              (const char *target_name);
+OrcTarget *         orc_target_get_default              (void);
+unsigned int        orc_target_get_default_flags        (OrcTarget *target);
+const char *        orc_target_get_name                 (OrcTarget *target);
+OrcRule *           orc_target_get_rule                 (OrcTarget *target,
+                                                         OrcStaticOpcode *opcode,
+                                                         unsigned int target_flags);
+void                orc_target_register                 (OrcTarget *target);
+
+
+
+

Description

+
+
+

Details

+
+

OrcOpcodeEmulateFunc ()

+
void                (*OrcOpcodeEmulateFunc)             (OrcOpcodeExecutor *ex,
+                                                         void *user);
+

+

+
++ + + + + + + + + + +

ex :

+

user :

+
+
+
+
+

OrcOpcodeExecutor

+
typedef struct {
+} OrcOpcodeExecutor;
+
+

+The OrcOpcodeExecutor structure has no public members +

+
+
+
+

OrcOpcodeSet

+
typedef struct {
+} OrcOpcodeSet;
+
+

+The OrcOpcodeSet structure has no public members +

+
+
+
+

OrcRuleSet

+
typedef struct {
+} OrcRuleSet;
+
+

+The OrcRuleSet structure has no public members +

+
+
+
+

OrcStaticOpcode

+
typedef struct {
+  char name[16];
+  unsigned int flags;
+  int dest_size[ORC_STATIC_OPCODE_N_DEST];
+  int src_size[ORC_STATIC_OPCODE_N_SRC];
+  OrcOpcodeEmulateNFunc emulateN;
+} OrcStaticOpcode;
+
+

+

+
+
+
+

OrcTarget

+
typedef struct {
+  const char *name;
+  orc_bool executable;
+  int data_register_offset;
+
+  unsigned int (*get_default_flags)(void);
+  void (*compiler_init)(OrcCompiler *compiler);
+  void (*compile)(OrcCompiler *compiler);
+
+  OrcRuleSet rule_sets[ORC_N_RULE_SETS];
+  int n_rule_sets;
+
+  const char * (*get_asm_preamble)(void);
+  void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value);
+  const char * (*get_flag_name)(int shift);
+  void (*flush_cache) (OrcCode *code);
+  void (*load_constant_long)(OrcCompiler *compiler, int reg,
+      OrcConstant *constant);
+
+  void *_unused[5];
+} OrcTarget;
+
+
+
+
+

ORC_OPCODE_N_ARGS

+
#define ORC_OPCODE_N_ARGS 4
+
+

+

+
+
+
+

ORC_STATIC_OPCODE_ACCUMULATOR

+
#define ORC_STATIC_OPCODE_ACCUMULATOR (1<<0)
+
+

+

+
+
+
+

ORC_STATIC_OPCODE_N_DEST

+
#define ORC_STATIC_OPCODE_N_DEST 2
+
+

+

+
+
+
+

ORC_STATIC_OPCODE_N_SRC

+
#define ORC_STATIC_OPCODE_N_SRC 4
+
+

+

+
+
+
+

orc_opcode_find_by_name ()

+
OrcStaticOpcode *   orc_opcode_find_by_name             (const char *name);
+

+

+
++ + + + + + + + + + +

name :

+

Returns :

+
+
+
+
+

orc_opcode_init ()

+
void                orc_opcode_init                     (void);
+

+

+
+
+
+

orc_opcode_register_static ()

+
int                 orc_opcode_register_static          (OrcStaticOpcode *sopcode,
+                                                         char *prefix);
+

+

+
++ + + + + + + + + + + + + + +

sopcode :

+

prefix :

+

Returns :

+
+
+
+
+

orc_opcode_set_find_by_name ()

+
int                 orc_opcode_set_find_by_name         (OrcOpcodeSet *opcode_set,
+                                                         const char *name);
+

+

+
++ + + + + + + + + + + + + + +

opcode_set :

+

name :

+

Returns :

+
+
+
+
+

orc_opcode_set_get ()

+
OrcOpcodeSet *      orc_opcode_set_get                  (const char *name);
+

+

+
++ + + + + + + + + + +

name :

+

Returns :

+
+
+
+
+

orc_rule_set_new ()

+
OrcRuleSet *        orc_rule_set_new                    (OrcOpcodeSet *opcode_set,
+                                                         OrcTarget *target,
+                                                         unsigned int required_flags);
+

+

+
++ + + + + + + + + + + + + + + + + + +

opcode_set :

+

target :

+

required_flags :

+

Returns :

+
+
+
+
+

orc_target_get_asm_preamble ()

+
const char *        orc_target_get_asm_preamble         (const char *target);
+

+

+
++ + + + + + + + + + +

target :

+

Returns :

+
+
+
+
+

orc_target_get_by_name ()

+
OrcTarget *         orc_target_get_by_name              (const char *target_name);
+

+

+
++ + + + + + + + + + +

target_name :

+

Returns :

+
+
+
+
+

orc_target_get_default ()

+
OrcTarget *         orc_target_get_default              (void);
+

+

+
++ + + + +

Returns :

+
+
+
+
+

orc_target_get_default_flags ()

+
unsigned int        orc_target_get_default_flags        (OrcTarget *target);
+

+

+
++ + + + + + + + + + +

target :

+

Returns :

+
+
+
+
+

orc_target_get_name ()

+
const char *        orc_target_get_name                 (OrcTarget *target);
+

+

+
++ + + + + + + + + + +

target :

+

Returns :

+
+
+
+
+

orc_target_get_rule ()

+
OrcRule *           orc_target_get_rule                 (OrcTarget *target,
+                                                         OrcStaticOpcode *opcode,
+                                                         unsigned int target_flags);
+

+

+
++ + + + + + + + + + + + + + + + + + +

target :

+

opcode :

+

target_flags :

+

Returns :

+
+
+
+
+

orc_target_register ()

+
void                orc_target_register                 (OrcTarget *target);
+

+

+
++ + + + +

target :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcProgram.html b/doc/html/orc-OrcProgram.html new file mode 100644 index 0000000..a00cb3d --- /dev/null +++ b/doc/html/orc-OrcProgram.html @@ -0,0 +1,987 @@ + + + + +OrcProgram + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcProgram

+

OrcProgram — Creating and manipulating Orc programs

+
+
+

Synopsis

+
                    OrcProgram;
+#define             ORC_N_CONSTANTS
+#define             ORC_N_RULE_SETS
+#define             ORC_N_TARGETS
+#define             ORC_PROGRAM_ERROR                   (program,
+                                                         ...)
+OrcProgram *        orc_program_new                     (void);
+OrcProgram *        orc_program_new_dss                 (int size1,
+                                                         int size2,
+                                                         int size3);
+OrcProgram *        orc_program_new_as                  (int size1,
+                                                         int size2);
+OrcProgram *        orc_program_new_ass                 (int size1,
+                                                         int size2,
+                                                         int size3);
+OrcProgram *        orc_program_new_ds                  (int size1,
+                                                         int size2);
+void                orc_program_free                    (OrcProgram *program);
+const char *        orc_program_get_name                (OrcProgram *program);
+void                orc_program_set_name                (OrcProgram *program,
+                                                         const char *name);
+int                 orc_program_add_temporary           (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+int                 orc_program_add_source              (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+int                 orc_program_add_destination         (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+int                 orc_program_add_constant            (OrcProgram *program,
+                                                         int size,
+                                                         int value,
+                                                         const char *name);
+int                 orc_program_add_accumulator         (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+int                 orc_program_add_parameter           (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+void                orc_program_append                  (OrcProgram *p,
+                                                         const char *opcode,
+                                                         int arg0,
+                                                         int arg1,
+                                                         int arg2);
+void                orc_program_append_str              (OrcProgram *p,
+                                                         const char *opcode,
+                                                         const char *arg0,
+                                                         const char *arg1,
+                                                         const char *arg2);
+void                orc_program_append_ds               (OrcProgram *program,
+                                                         const char *opcode,
+                                                         int arg0,
+                                                         int arg1);
+void                orc_program_append_ds_str           (OrcProgram *p,
+                                                         const char *opcode,
+                                                         const char *arg0,
+                                                         const char *arg1);
+OrcCompileResult    orc_program_compile                 (OrcProgram *p);
+OrcCompileResult    orc_program_compile_for_target      (OrcProgram *p,
+                                                         OrcTarget *target);
+OrcCompileResult    orc_program_compile_full            (OrcProgram *p,
+                                                         OrcTarget *target,
+                                                         unsigned int flags);
+const char *        orc_program_get_asm_code            (OrcProgram *program);
+
+int                 orc_program_find_var_by_name        (OrcProgram *program,
+                                                         const char *name);
+int                 orc_program_allocate_register       (OrcProgram *program,
+                                                         int is_data);
+int                 orc_program_dup_temporary           (OrcProgram *program,
+                                                         int i,
+                                                         int j);
+
+
+
+

Description

+
+
+

Details

+
+

OrcProgram

+
typedef struct {
+} OrcProgram;
+
+

+The OrcProgram structure has no public members +

+
+
+
+

ORC_N_CONSTANTS

+
#define ORC_N_CONSTANTS 20
+
+

+

+
+
+
+

ORC_N_RULE_SETS

+
#define ORC_N_RULE_SETS 10
+
+

+

+
+
+
+

ORC_N_TARGETS

+
#define ORC_N_TARGETS 10
+
+

+

+
+
+
+

ORC_PROGRAM_ERROR()

+
#define             ORC_PROGRAM_ERROR(program, ...)
+

+

+
++ + + + + + + + + + +

program :

+

... :

+
+
+
+
+

orc_program_new ()

+
OrcProgram *        orc_program_new                     (void);
+

+Create a new OrcProgram. The program should be freed using +@orc_program_free(). +

+
++ + + + +

Returns :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_new_dss ()

+
OrcProgram *        orc_program_new_dss                 (int size1,
+                                                         int size2,
+                                                         int size3);
+

+Create a new OrcProgram, with a destination named "d1" and +two sources named "s1" and "s2". +

+
++ + + + + + + + + + + + + + + + + + +

size1 :

size of destination array members +

size2 :

size of first source array members +

size3 :

size of second source array members +

Returns :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_new_as ()

+
OrcProgram *        orc_program_new_as                  (int size1,
+                                                         int size2);
+

+Create a new OrcProgram, with an accumulator named "a1" and +one source named "s1". +

+
++ + + + + + + + + + + + + + +

size1 :

size of destination array members +

size2 :

size of source array members +

Returns :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_new_ass ()

+
OrcProgram *        orc_program_new_ass                 (int size1,
+                                                         int size2,
+                                                         int size3);
+

+Create a new OrcProgram, with an accumulator named "a1" and +two source named "s1" and "s2". +

+
++ + + + + + + + + + + + + + + + + + +

size1 :

size of destination array members +

size2 :

size of first source array members +

size3 :

size of second source array members +

Returns :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_new_ds ()

+
OrcProgram *        orc_program_new_ds                  (int size1,
+                                                         int size2);
+

+Create a new OrcProgram, with a destination named "d1" and +one source named "s1". +

+
++ + + + + + + + + + + + + + +

size1 :

size of destination array members +

size2 :

size of source array members +

Returns :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_free ()

+
void                orc_program_free                    (OrcProgram *program);
+

+Frees an OrcProgram. +

+
++ + + + +

program :

a pointer to an OrcProgram structure +
+
+
+
+

orc_program_get_name ()

+
const char *        orc_program_get_name                (OrcProgram *program);
+

+Gets the name of the program. The string is valid until the name +is changed or the program is freed. +

+
++ + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

Returns :

a character string +
+
+
+
+

orc_program_set_name ()

+
void                orc_program_set_name                (OrcProgram *program,
+                                                         const char *name);
+

+Sets the name of the program. The string is copied. +

+
++ + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

name :

string to set the name to +
+
+
+
+

orc_program_add_temporary ()

+
int                 orc_program_add_temporary           (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+

+Creates a new variable holding temporary values. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data values +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_add_source ()

+
int                 orc_program_add_source              (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+

+Creates a new variable representing a source array. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data values +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_add_destination ()

+
int                 orc_program_add_destination         (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+

+Creates a new variable representing a destination array. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data values +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_add_constant ()

+
int                 orc_program_add_constant            (OrcProgram *program,
+                                                         int size,
+                                                         int value,
+                                                         const char *name);
+

+Creates a new variable representing a constant value. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data value +

value :

the value +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_add_accumulator ()

+
int                 orc_program_add_accumulator         (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+

+Creates a new variable representing an accumulator. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data value +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_add_parameter ()

+
int                 orc_program_add_parameter           (OrcProgram *program,
+                                                         int size,
+                                                         const char *name);
+

+Creates a new variable representing a scalar parameter. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

size :

size of data value +

name :

name of variable +

Returns :

the index of the new variable +
+
+
+
+

orc_program_append ()

+
void                orc_program_append                  (OrcProgram *p,
+                                                         const char *opcode,
+                                                         int arg0,
+                                                         int arg1,
+                                                         int arg2);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

opcode :

+

arg0 :

+

arg1 :

+

arg2 :

+
+
+
+
+

orc_program_append_str ()

+
void                orc_program_append_str              (OrcProgram *p,
+                                                         const char *opcode,
+                                                         const char *arg0,
+                                                         const char *arg1,
+                                                         const char *arg2);
+

+Appends an instruction to the program, with arguments arg0, +arg1, and arg2. The instruction must take 3 operands. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

opcode :

+

arg0 :

name of first variable +

arg1 :

name of second variable +

arg2 :

name of third variable +
+
+
+
+

orc_program_append_ds ()

+
void                orc_program_append_ds               (OrcProgram *program,
+                                                         const char *opcode,
+                                                         int arg0,
+                                                         int arg1);
+

+Appends an instruction to the program, with arguments arg0, +arg1, and arg2. The instruction must take 3 operands. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

opcode :

+

arg0 :

index of first variable +

arg1 :

index of second variable +
+
+
+
+

orc_program_append_ds_str ()

+
void                orc_program_append_ds_str           (OrcProgram *p,
+                                                         const char *opcode,
+                                                         const char *arg0,
+                                                         const char *arg1);
+

+Appends an instruction to the program, with arguments arg0 and +arg2. The instruction must take 2 operands. +

+
++ + + + + + + + + + + + + + + + + + +

p :

+

opcode :

+

arg0 :

name of first variable +

arg1 :

name of second variable +
+
+
+
+

orc_program_compile ()

+
OrcCompileResult    orc_program_compile                 (OrcProgram *p);
+

+Compiles an Orc program for the current CPU. If successful, +executable code for the program was generated and can be +executed. +

+

+The return value indicates various levels of success or failure. +Success can be determined by checking for a true value of the +macro ORC_COMPILE_RESULT_IS_SUCCESSFUL() on the return value. This +indicates that executable code was generated. If the macro +ORC_COMPILE_RESULT_IS_FATAL() on the return value evaluates to +true, then there was a syntactical error in the program. If the +result is neither successful nor fatal, the program can still be +emulated. +

+
++ + + + + + + + + + +

p :

+

Returns :

an OrcCompileResult +
+
+
+
+

orc_program_compile_for_target ()

+
OrcCompileResult    orc_program_compile_for_target      (OrcProgram *p,
+                                                         OrcTarget *target);
+

+Compiles an Orc program for the given target, using the +default target flags for that target. +

+
++ + + + + + + + + + + + + + +

p :

+

target :

+

Returns :

an OrcCompileResult +
+
+
+
+

orc_program_compile_full ()

+
OrcCompileResult    orc_program_compile_full            (OrcProgram *p,
+                                                         OrcTarget *target,
+                                                         unsigned int flags);
+

+Compiles an Orc program for the given target, using the +given target flags. +

+
++ + + + + + + + + + + + + + + + + + +

p :

+

target :

+

flags :

+

Returns :

an OrcCompileResult +
+
+
+
+

orc_program_get_asm_code ()

+
const char *        orc_program_get_asm_code            (OrcProgram *program);
+

+Returns a character string containing the assembly code created +by compiling the program. This string is valid until the program +is compiled again or the program is freed. +

+
++ + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

Returns :

a character string +
+
+
+
+

orc_program_find_var_by_name ()

+
int                 orc_program_find_var_by_name        (OrcProgram *program,
+                                                         const char *name);
+

+Finds the variable with the name name. If no variable with the +given name exists in the program, -1 is returned. +

+
++ + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

name :

name of instruction +

Returns :

the index of the variable +
+
+
+
+

orc_program_allocate_register ()

+
int                 orc_program_allocate_register       (OrcProgram *program,
+                                                         int is_data);
+

+

+
++ + + + + + + + + + + + + + +

program :

+

is_data :

+

Returns :

+
+
+
+
+

orc_program_dup_temporary ()

+
int                 orc_program_dup_temporary           (OrcProgram *program,
+                                                         int i,
+                                                         int j);
+

+Internal function. +

+
++ + + + + + + + + + + + + + + + + + +

program :

a pointer to an OrcProgram structure +

i :

+

j :

index +

Returns :

the index of the new variable +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-OrcRule.html b/doc/html/orc-OrcRule.html new file mode 100644 index 0000000..68668da --- /dev/null +++ b/doc/html/orc-OrcRule.html @@ -0,0 +1,91 @@ + + + + +OrcRule + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OrcRule

+

OrcRule — Creating rules for code generation

+
+
+

Synopsis

+
void                orc_rule_register                   (OrcRuleSet *rule_set,
+                                                         const char *opcode_name,
+                                                         OrcRuleEmitFunc emit,
+                                                         void *emit_user);
+
+
+
+

Description

+
+
+

Details

+
+

orc_rule_register ()

+
void                orc_rule_register                   (OrcRuleSet *rule_set,
+                                                         const char *opcode_name,
+                                                         OrcRuleEmitFunc emit,
+                                                         void *emit_user);
+

+

+
++ + + + + + + + + + + + + + + + + + +

rule_set :

+

opcode_name :

+

emit :

+

emit_user :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-PowerPC.html b/doc/html/orc-PowerPC.html new file mode 100644 index 0000000..a9f69af --- /dev/null +++ b/doc/html/orc-PowerPC.html @@ -0,0 +1,752 @@ + + + + +PowerPC + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

PowerPC

+

PowerPC — code generation for PowerPC

+
+
+

Synopsis

+
const char *        powerpc_get_regname                 (int i);
+int                 powerpc_regnum                      (int i);
+void                powerpc_add_fixup                   (OrcCompiler *compiler,
+                                                         int type,
+                                                         unsigned char *ptr,
+                                                         int label);
+void                powerpc_do_fixups                   (OrcCompiler *compiler);
+void                powerpc_emit                        (OrcCompiler *compiler,
+                                                         unsigned int insn);
+void                powerpc_emit_655510                 (OrcCompiler *compiler,
+                                                         int major,
+                                                         int d,
+                                                         int a,
+                                                         int b,
+                                                         int minor);
+void                powerpc_emit_VA                     (OrcCompiler *compiler,
+                                                         const char *name,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b,
+                                                         int c);
+void                powerpc_emit_VX                     (OrcCompiler *compiler,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+void                powerpc_emit_VX_2                   (OrcCompiler *p,
+                                                         const char *name,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+void                powerpc_emit_X                      (OrcCompiler *compiler,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+void                powerpc_emit_addi                   (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int imm);
+void                powerpc_emit_b                      (OrcCompiler *compiler,
+                                                         int label);
+void                powerpc_emit_beq                    (OrcCompiler *compiler,
+                                                         int label);
+void                powerpc_emit_bne                    (OrcCompiler *compiler,
+                                                         int label);
+void                powerpc_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+void                powerpc_emit_lwz                    (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int imm);
+void                powerpc_emit_ret                    (OrcCompiler *compiler);
+void                powerpc_emit_srawi                  (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int shift,
+                                                         int record);
+void                powerpc_emit_stwu                   (OrcCompiler *compiler,
+                                                         int regs,
+                                                         int rega,
+                                                         int offset);
+int                 powerpc_get_constant                (OrcCompiler *p,
+                                                         int type,
+                                                         int value);
+
+
+
+

Description

+
+
+

Details

+
+

powerpc_get_regname ()

+
const char *        powerpc_get_regname                 (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

powerpc_regnum ()

+
int                 powerpc_regnum                      (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

powerpc_add_fixup ()

+
void                powerpc_add_fixup                   (OrcCompiler *compiler,
+                                                         int type,
+                                                         unsigned char *ptr,
+                                                         int label);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

type :

+

ptr :

+

label :

+
+
+
+
+

powerpc_do_fixups ()

+
void                powerpc_do_fixups                   (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

powerpc_emit ()

+
void                powerpc_emit                        (OrcCompiler *compiler,
+                                                         unsigned int insn);
+

+

+
++ + + + + + + + + + +

compiler :

+

insn :

+
+
+
+
+

powerpc_emit_655510 ()

+
void                powerpc_emit_655510                 (OrcCompiler *compiler,
+                                                         int major,
+                                                         int d,
+                                                         int a,
+                                                         int b,
+                                                         int minor);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

major :

+

d :

+

a :

+

b :

+

minor :

+
+
+
+
+

powerpc_emit_VA ()

+
void                powerpc_emit_VA                     (OrcCompiler *compiler,
+                                                         const char *name,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b,
+                                                         int c);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

name :

+

insn :

+

d :

+

a :

+

b :

+

c :

+
+
+
+
+

powerpc_emit_VX ()

+
void                powerpc_emit_VX                     (OrcCompiler *compiler,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

insn :

+

d :

+

a :

+

b :

+
+
+
+
+

powerpc_emit_VX_2 ()

+
void                powerpc_emit_VX_2                   (OrcCompiler *p,
+                                                         const char *name,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

p :

+

name :

+

insn :

+

d :

+

a :

+

b :

+
+
+
+
+

powerpc_emit_X ()

+
void                powerpc_emit_X                      (OrcCompiler *compiler,
+                                                         unsigned int insn,
+                                                         int d,
+                                                         int a,
+                                                         int b);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

insn :

+

d :

+

a :

+

b :

+
+
+
+
+

powerpc_emit_addi ()

+
void                powerpc_emit_addi                   (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int imm);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

regd :

+

rega :

+

imm :

+
+
+
+
+

powerpc_emit_b ()

+
void                powerpc_emit_b                      (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

powerpc_emit_beq ()

+
void                powerpc_emit_beq                    (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

powerpc_emit_bne ()

+
void                powerpc_emit_bne                    (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

powerpc_emit_label ()

+
void                powerpc_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

powerpc_emit_lwz ()

+
void                powerpc_emit_lwz                    (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int imm);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

regd :

+

rega :

+

imm :

+
+
+
+
+

powerpc_emit_ret ()

+
void                powerpc_emit_ret                    (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

powerpc_emit_srawi ()

+
void                powerpc_emit_srawi                  (OrcCompiler *compiler,
+                                                         int regd,
+                                                         int rega,
+                                                         int shift,
+                                                         int record);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

regd :

+

rega :

+

shift :

+

record :

+
+
+
+
+

powerpc_emit_stwu ()

+
void                powerpc_emit_stwu                   (OrcCompiler *compiler,
+                                                         int regs,
+                                                         int rega,
+                                                         int offset);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

regs :

+

rega :

+

offset :

+
+
+
+
+

powerpc_get_constant ()

+
int                 powerpc_get_constant                (OrcCompiler *p,
+                                                         int type,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + + + + + +

p :

+

type :

+

value :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-SSE.html b/doc/html/orc-SSE.html new file mode 100644 index 0000000..d496771 --- /dev/null +++ b/doc/html/orc-SSE.html @@ -0,0 +1,698 @@ + + + + +SSE + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

SSE

+

SSE — code generation for SSE

+
+
+

Synopsis

+
enum                OrcSSERegister;
+enum                OrcTargetSSEFlags;
+#define             ORC_SSE_SHUF                        (a,
+                                                         b,
+                                                         c,
+                                                         d)
+void                orc_sse_emit_0f                     (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_660f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_f20f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_f30f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_loadib                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadil                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadiw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadpb                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadpl                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadpq                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_loadpw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+void                orc_sse_emit_pshufd                 (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_pshuflw                (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+void                orc_sse_emit_shiftimm               (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int modrm_code,
+                                                         int shift,
+                                                         int reg);
+unsigned int        orc_sse_get_cpu_flags               (void);
+void                orc_sse_init                        (void);
+
+
+
+

Description

+
+
+

Details

+
+

enum OrcSSERegister

+
typedef enum {
+  X86_XMM0 = ORC_VEC_REG_BASE,
+  X86_XMM1,
+  X86_XMM2,
+  X86_XMM3,
+  X86_XMM4,
+  X86_XMM5,
+  X86_XMM6,
+  X86_XMM7,
+  X86_XMM8,
+  X86_XMM9,
+  X86_XMM10,
+  X86_XMM11,
+  X86_XMM12,
+  X86_XMM13,
+  X86_XMM14,
+  X86_XMM15
+}OrcSSERegister;
+
+

+

+
+
+
+

enum OrcTargetSSEFlags

+
typedef enum {
+  ORC_TARGET_SSE_SSE2 = (1<<0),
+  ORC_TARGET_SSE_SSE3 = (1<<1),
+  ORC_TARGET_SSE_SSSE3 = (1<<2),
+  ORC_TARGET_SSE_SSE4_1 = (1<<3),
+  ORC_TARGET_SSE_SSE4_2 = (1<<4),
+  ORC_TARGET_SSE_SSE4A = (1<<5),
+  ORC_TARGET_SSE_SSE5 = (1<<6),
+  ORC_TARGET_SSE_FRAME_POINTER = (1<<7),
+  ORC_TARGET_SSE_SHORT_JUMPS = (1<<8),
+  ORC_TARGET_SSE_64BIT = (1<<9)
+}OrcTargetSSEFlags;
+
+

+

+
+
+
+

ORC_SSE_SHUF()

+
#define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0))
+
+

+

+
++ + + + + + + + + + + + + + + + + + +

a :

+

b :

+

c :

+

d :

+
+
+
+
+

orc_sse_emit_0f ()

+
void                orc_sse_emit_0f                     (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_660f ()

+
void                orc_sse_emit_660f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_f20f ()

+
void                orc_sse_emit_f20f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_f30f ()

+
void                orc_sse_emit_f30f                   (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_loadib ()

+
void                orc_sse_emit_loadib                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadil ()

+
void                orc_sse_emit_loadil                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadiw ()

+
void                orc_sse_emit_loadiw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadpb ()

+
void                orc_sse_emit_loadpb                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadpl ()

+
void                orc_sse_emit_loadpl                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadpq ()

+
void                orc_sse_emit_loadpq                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_loadpw ()

+
void                orc_sse_emit_loadpw                 (OrcCompiler *p,
+                                                         int reg,
+                                                         int value);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

reg :

+

value :

+
+
+
+
+

orc_sse_emit_pshufd ()

+
void                orc_sse_emit_pshufd                 (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + +

p :

+

shuf :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_pshuflw ()

+
void                orc_sse_emit_pshuflw                (OrcCompiler *p,
+                                                         int shuf,
+                                                         int src,
+                                                         int dest);
+

+

+
++ + + + + + + + + + + + + + + + + + +

p :

+

shuf :

+

src :

+

dest :

+
+
+
+
+

orc_sse_emit_shiftimm ()

+
void                orc_sse_emit_shiftimm               (OrcCompiler *p,
+                                                         const char *insn_name,
+                                                         int code,
+                                                         int modrm_code,
+                                                         int shift,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

p :

+

insn_name :

+

code :

+

modrm_code :

+

shift :

+

reg :

+
+
+
+
+

orc_sse_get_cpu_flags ()

+
unsigned int        orc_sse_get_cpu_flags               (void);
+

+

+
++ + + + +

Returns :

+
+
+
+
+

orc_sse_init ()

+
void                orc_sse_init                        (void);
+

+

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-Utility-functions.html b/doc/html/orc-Utility-functions.html new file mode 100644 index 0000000..2992557 --- /dev/null +++ b/doc/html/orc-Utility-functions.html @@ -0,0 +1,245 @@ + + + + +Utility functions + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Utility functions

+

Utility functions — Orc utility functions

+
+
+

Synopsis

+
typedef             orc_bool;
+#define             ORC_ASSERT                          (test)
+#define             ORC_BEGIN_DECLS
+#define             ORC_CLAMP                           (x,
+                                                         a,
+                                                         b)
+#define             ORC_END_DECLS
+#define             ORC_EXPORT
+#define             ORC_GNUC_PREREQ                     (maj,
+                                                         min)
+#define             ORC_GNU_PRINTF                      (a,
+                                                         b)
+#define             ORC_INTERNAL
+#define             ORC_PTR_TO_INT                      (x)
+#define             ORC_READ_UINT32_LE                  (ptr)
+#define             ORC_WRITE_UINT32_LE                 (ptr,
+                                                         val)
+
+
+
+

Description

+
+
+

Details

+
+

orc_bool

+
typedef unsigned int orc_bool;
+
+

+

+
+
+
+

ORC_ASSERT()

+
#define             ORC_ASSERT(test)
+

+

+
++ + + + +

test :

+
+
+
+
+

ORC_BEGIN_DECLS

+
#define             ORC_BEGIN_DECLS
+

+

+
+
+
+

ORC_CLAMP()

+
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
+
+

+

+
++ + + + + + + + + + + + + + +

x :

+

a :

+

b :

+
+
+
+
+

ORC_END_DECLS

+
#define             ORC_END_DECLS
+

+

+
+
+
+

ORC_EXPORT

+
#define             ORC_EXPORT
+

+

+
+
+
+

ORC_GNUC_PREREQ()

+
#define             ORC_GNUC_PREREQ(maj, min)
+

+

+
++ + + + + + + + + + +

maj :

+

min :

+
+
+
+
+

ORC_GNU_PRINTF()

+
#define             ORC_GNU_PRINTF(a,b)
+

+

+
++ + + + + + + + + + +

a :

+

b :

+
+
+
+
+

ORC_INTERNAL

+
#define             ORC_INTERNAL
+

+

+
+
+
+

ORC_PTR_TO_INT()

+
#define ORC_PTR_TO_INT(x) ((int)(long)(x))
+
+

+

+
++ + + + +

x :

+
+
+
+
+

ORC_READ_UINT32_LE()

+
#define             ORC_READ_UINT32_LE(ptr)
+

+

+
++ + + + +

ptr :

+
+
+
+
+

ORC_WRITE_UINT32_LE()

+
#define             ORC_WRITE_UINT32_LE(ptr,val)
+

+

+
++ + + + + + + + + + +

ptr :

+

val :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-building.html b/doc/html/orc-building.html new file mode 100644 index 0000000..0d68b55 --- /dev/null +++ b/doc/html/orc-building.html @@ -0,0 +1,94 @@ + + + + +Building Orc and Applications That Use Orc + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Building Orc and Applications That Use Orc

+

Building Orc and Applications that use Orc — +How to build Orc and applications using it. +

+
+
+

Building Orc on UNIX

+

+ On UNIX, Orc uses the standard GNU build system, + using autoconf for package + configuration and resolving portability issues, + automake for building makefiles + that comply with the GNU Coding Standards, and + libtool for building shared + libraries on multiple platforms. The normal sequence for + compiling and installing the Orc library is thus: + +

+


+      ./configure
+      make
+      make install
+    

+

+

+

+ The standard options provided by GNU + autoconf may be passed to the + configure script. Please see the + autoconf documentation or run + ./configure --help for information about + the standard options. +

+

+ By default, code generators for all targets are built into the + library. Embedded system developers may wish to use the + --enable-backed option, which will disable all other code + generators, saving about 200 kB in binary size. Outside of + embedded systems, using --enable-backend is not recommended. +

+
+
+

Building Orc Applications

+

+Applications and libraries can use pkg-config to get all the +needed compiler and linker flags to build against Orc. The following +commands will provide the necessary compiler and linker flags: + +

+


+  pkg-config --cflags orc-0.4
+  pkg-config --libs orc-0.4
+

+

+

+

+When compiling from source, the default installation directory is not +in the default path for the pkg-config, so you may +need to set the PKG_CONFIG_DIR environment variable. +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-concepts.html b/doc/html/orc-concepts.html new file mode 100644 index 0000000..d11760f --- /dev/null +++ b/doc/html/orc-concepts.html @@ -0,0 +1,236 @@ + + + + +Orc Concepts + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Orc Concepts

+

Orc Concepts — +High-level view of what Orc does. +

+
+
+

Orc Concepts

+

+ Orc is a compiler for a simple assembly-like language. Unlike + most compilers, Orc is primarily a library, which means that + all its features can be controlled from any application that + uses it. Also unlike most compilers, Orc creates code that + can be immediately exectued by the application. +

+

+ Orc is mainly useful for generating code that performs simple + mathematical operations on continguous arrays. An example Orc + function, translated to C, might look like: + +

+
+      void function (int *dest, int *src1, int *src2, int n)
+      {
+        int i;
+	for (i = 0; i < n; i++) {
+	  dest[i] = (src1[i] + src2[i] + 1) >> 1;
+	}
+      }
+    
+

+ +

+

+ Orc is primarily targetted toward generating code for vector + CPU extensions such as SSE, Altivec, and NEON. +

+

+ Possible usage patterns: +

+

+ The application generates Orc code programmatically. + Generate Orc programs programmatically at runtime, compile at + runtime, and execute. This is what many of the Orc test programs + do, and is the most flexible and well-developed method at this + time. This requires depending on the Orc library at runtime. +

+

+ The application developer uses Orc to produce assembly source + code that is then compiled into the application. This requires + the developer to have Orc installed at build time. The advantage + of this method is no Orc dependency at runtime. Disadvantages + are a more complex build process, potential for compiler + incompatibilities with generated assembly source code, and any + Orc improvements require the application to be recompiled. +

+

+ The application developer writes Orc source files, and compiles + them into Orc bytecode to be included in the application. At + runtime, Orc compiles the bytecode into executable code. This + has the advantage of being easily editable. This method is + still somewhat experimental. +

+

+ A wide variety of additional workflows are possible, although + tools are not yet available to make it convenient. +

+

+

+

+

+
+
+

Concepts

+

+ The OrcProgram is the primary object that applications use when + using Orc to create code. It contains all the information related to + what is essentially a function definition in C. Orc programs can + be compiled into assembly source code, or directly into binary code + that can be executed as part of the running process. On CPUs that + are not supported, programs can also be executed via emulation. Orc + programs can also be compiled into C source code. +

+

+ A program contains one or more instructions and operates on one or + more source and destination arrays, and may use scalar parameters. + When compiled and executed, or emulated, the instructions define + the operations performed on each source array member, and the results + are placed in the destination array. Another way of thinking about + it is that the compiler generates code that iterates over the + destination array, calculating the value of each members based on + the program instructions and the corresponding values in the source + arrays and scalar parameters. +

+

+ The form of programs is strictly limited so that they may be compiled + into vector instructions effectively. It is anticipated that future + versions of Orc will allow more complex programs. +

+

+ The arrays that Orc programs operate on must be contiguous. +

+

+ Some example operations are "addw" which adds two 16-bit integers, + "convsbw" which converts a signed byte to a signed 16-bit integer, + and "minul" which selects the lesser of two 32-bit unsigned + integers. Orc only checks that the size of the operand matches + the size of the variable. Thus, the compiler will not warn against + using "minul" with signed 32-bit integers, because it does not know + that the variables are signed or unsigned. +

+

+ Orc has a main set of opcodes, that is, an OrcOpcodeSet, with the + name "sys". These opcodes are always available. They cover most + common arithmetic and conversion instructions for 8, 16, and 32-bit + integers. There are two auxiliary libraries that provide additional + opcode sets, the liborc-float library that contains the "float" + opcode set for 32 and 64-bit floating point operations, and the + liborc-pixel library containing the "pixel" opcode set for operations + on 32-bit RGBA pixels. +

+

+ Orc programs are compiled using the function orc_program_compile(). + The compiled code will be targetted for the current processor, which + is useful for compiling code that will be immediately executed. + Compiling for other processor families or processor family variants, + in order to produce assembly source code, can be accomplished using + one of the orc_program_compile variants. +

+

+ Once an Orc program is compiled, it can be executed by creating + an OrcExecutor structure, linking it to the program to be executed, + setting the arrays and parameters, and setting the iteration count. + Orc executors are the equivalent of stack frames in a called function + in normal C code. However, all Orc programs use the same OrcExecutor + structure, which makes code that manipulates executors simpler in + respect to those that manipulate stack frames. Executors can be + reused. +

+

+ An OrcTarget represents a particular instruction set or CPU family + for which code can be generated. Current targets include MMX, SSE, + Altivec, NEON, and ARM. There is also a special target that generates C + source code, but is not capable of producing executable code at + runtime. In most cases, the default target is the most appropriate + target for the current CPU. +

+

+ Individual Orc targets may have various options that control code + generation for that target. For example, the various CPUs handled + by the SSE target have different subsets of SSE instructions that + are supported. The target flags for SSE enable generation of the + different subsets of SSE instructions. +

+

+ In order to produce target code, the Orc compiler finds an appropriate + OrcRule to translate the instruction to target code. An OrcRuleSet + is an array of rules that all have the required target flags, and + a target may have one or more rule sets that can be enabled or + disabled based on the target flags. In many cases, Orc instructions + can be translated into one or two target instructions, which generates + fast code. In other cases, the CPU indicated by the target and target + flags does not have a fast method of performing the Orc instruction, + and a slower method is chosen. This is indicated in the value returned + by the compiling function call. In yet other cases, there is no + implemented rule to translate an Orc instruction to target code, so + compilation fails. +

+

+ Compilation can fail for one of two main reasons. One reason is that + the compiler was unable to parse the correct meaning, such as an + unknown opcode, undeclared variable, or a size mismatch. These are + uncorrectible errors, and the program cannot be executed or emulated. + The other reason for a compilation failure is that target code could + not be generated for a variety of reasons, including missing rules + or unimplemented features. In this case, the program can be emulated. + This process occurs automatically. +

+

+ Emulation is generally slower than corresponding C code. Since the + Orc compiler can produce C source code, it is possible to generate + and compile backup C code for programs. This process is not yet + automatic. +

+
+
+

Extending Orc

+

+ Developers can extend Orc primarily by adding new opcode sets, adding + new targets, and by adding new target rules. +

+

+ Additional opcode sets can be created and registered in a manner + similar to how the liborc-float and liborc-pixel libraries. In order + to make full use of new opcode sets, one must also define rules for + translating these opcodes into target code. The example libraries + do this by registering rule sets for various targets (mainly SSE) + for their opcode sets. Orc provides low-level API for generating + target code. Not all possible target instructions can be generated + with the target API, so developers may need to modify and add + functions to the main Orc library as necessary to generate target + code. +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-misc.html b/doc/html/orc-misc.html new file mode 100644 index 0000000..d25c018 --- /dev/null +++ b/doc/html/orc-misc.html @@ -0,0 +1,505 @@ + + + + +misc + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

misc

+

misc

+
+
+

Synopsis

+
                    OrcVariable;
+                    OrcInstruction;
+                    OrcRule;
+                    OrcFixup;
+void                (*OrcRuleEmitFunc)                  (OrcCompiler *p,
+                                                         void *user,
+                                                         OrcInstruction *insn);
+#define             ORC_N_REGS
+#define             ORC_N_INSNS
+#define             ORC_N_VARIABLES
+#define             ORC_N_REGISTERS
+#define             ORC_N_FIXUPS
+#define             ORC_N_LABELS
+#define             ORC_GP_REG_BASE
+#define             ORC_VEC_REG_BASE
+#define             ORC_STRUCT_OFFSET                   (struct_type,
+                                                         member)
+enum                OrcVarType;
+void                orc_powerpc_init                    (void);
+void                orc_arm_init                        (void);
+void                orc_c_init                          (void);
+int                 orc_parse                           (const char *code,
+                                                         OrcProgram ***programs);
+#define             ARRAY_SIZE                          (x)
+#define             MAX                                 (a,
+                                                         b)
+#define             MIN                                 (a,
+                                                         b)
+char *              get_cpuinfo_line                    (char *cpuinfo,
+                                                         const char *tag);
+char *              get_file                            (const char *file);
+int                 get_file_int                        (const char *file,
+                                                         int *value);
+char *              get_tag_value                       (char *s,
+                                                         const char *tag);
+char **             strsplit                            (const char *s,
+                                                         char delimiter);
+
+
+
+

Description

+

+

+
+
+

Details

+
+

OrcVariable

+
typedef struct {
+} OrcVariable;
+
+

+The OrcVariable structure has no public members +

+
+
+
+

OrcInstruction

+
typedef struct {
+} OrcInstruction;
+
+

+The OrcInstruction structure has no public members +

+
+
+
+

OrcRule

+
typedef struct {
+} OrcRule;
+
+

+The OrcRule structure has no public members +

+
+
+
+

OrcFixup

+
typedef struct {
+} OrcFixup;
+
+

+The OrcFixup structure has no public members +

+
+
+
+

OrcRuleEmitFunc ()

+
void                (*OrcRuleEmitFunc)                  (OrcCompiler *p,
+                                                         void *user,
+                                                         OrcInstruction *insn);
+

+

+
++ + + + + + + + + + + + + + +

p :

+

user :

+

insn :

+
+
+
+
+

ORC_N_REGS

+
#define ORC_N_REGS (32*4)
+
+

+

+
+
+
+

ORC_N_INSNS

+
#define ORC_N_INSNS 100
+
+

+

+
+
+
+

ORC_N_VARIABLES

+
#define ORC_N_VARIABLES 64
+
+

+

+
+
+
+

ORC_N_REGISTERS

+
#define ORC_N_REGISTERS 20
+
+

+

+
+
+
+

ORC_N_FIXUPS

+
#define ORC_N_FIXUPS 100
+
+

+

+
+
+
+

ORC_N_LABELS

+
#define ORC_N_LABELS 40
+
+

+

+
+
+
+

ORC_GP_REG_BASE

+
#define ORC_GP_REG_BASE 32
+
+

+

+
+
+
+

ORC_VEC_REG_BASE

+
#define ORC_VEC_REG_BASE 64
+
+

+

+
+
+
+

ORC_STRUCT_OFFSET()

+
#define             ORC_STRUCT_OFFSET(struct_type, member)
+

+

+
++ + + + + + + + + + +

struct_type :

+

member :

+
+
+
+
+

enum OrcVarType

+
typedef enum {
+  ORC_VAR_TYPE_TEMP,
+  ORC_VAR_TYPE_SRC,
+  ORC_VAR_TYPE_DEST,
+  ORC_VAR_TYPE_CONST,
+  ORC_VAR_TYPE_PARAM,
+  ORC_VAR_TYPE_ACCUMULATOR
+} OrcVarType;
+
+

+

+
+
+
+

orc_powerpc_init ()

+
void                orc_powerpc_init                    (void);
+

+

+
+
+
+

orc_arm_init ()

+
void                orc_arm_init                        (void);
+

+

+
+
+
+

orc_c_init ()

+
void                orc_c_init                          (void);
+

+

+
+
+
+

orc_parse ()

+
int                 orc_parse                           (const char *code,
+                                                         OrcProgram ***programs);
+

+

+
++ + + + + + + + + + + + + + +

code :

+

programs :

+

Returns :

+
+
+
+
+

ARRAY_SIZE()

+
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+
+

+

+
++ + + + +

x :

+
+
+
+
+

MAX()

+
#define MAX(a,b) ((a)>(b) ? (a) : (b))
+
+

+

+
++ + + + + + + + + + +

a :

+

b :

+
+
+
+
+

MIN()

+
#define MIN(a,b) ((a)<(b) ? (a) : (b))
+
+

+

+
++ + + + + + + + + + +

a :

+

b :

+
+
+
+
+

get_cpuinfo_line ()

+
char *              get_cpuinfo_line                    (char *cpuinfo,
+                                                         const char *tag);
+

+

+
++ + + + + + + + + + + + + + +

cpuinfo :

+

tag :

+

Returns :

+
+
+
+
+

get_file ()

+
char *              get_file                            (const char *file);
+

+

+
++ + + + + + + + + + +

file :

+

Returns :

+
+
+
+
+

get_file_int ()

+
int                 get_file_int                        (const char *file,
+                                                         int *value);
+

+

+
++ + + + + + + + + + + + + + +

file :

+

value :

+

Returns :

+
+
+
+
+

get_tag_value ()

+
char *              get_tag_value                       (char *s,
+                                                         const char *tag);
+

+

+
++ + + + + + + + + + + + + + +

s :

+

tag :

+

Returns :

+
+
+
+
+

strsplit ()

+
char **             strsplit                            (const char *s,
+                                                         char delimiter);
+

+

+
++ + + + + + + + + + + + + + +

s :

+

delimiter :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-opcodes.html b/doc/html/orc-opcodes.html new file mode 100644 index 0000000..afa619f --- /dev/null +++ b/doc/html/orc-opcodes.html @@ -0,0 +1,3358 @@ + + + + +Orc Opcodes + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Orc Opcodes

+

Orc Opcodes — +Description of Opcodes +

+
+
+

Orc Opcodes

+

+ Opcodes only work with variables of a particular size. In the + table below, destination and source indicate the size of the + destination and source operands, in bytes. In general, opcodes + have a suffix indicating the sizes, "b" for 1-byte operations, + "w" for 2-byte operations, and "l" for 4-byte operations. If + the source and destination have different sizes, the source + size suffix is listed first, then the destination suffix. For + example, converting a 1-byte variable to 2-byte can be performed + using the "convsbw" opcode. +

+

+ Signed, unsigned, and saturating operations are indicated by + the letters "s", "u", and "s". If signed or unsigned is not + indicated, it generally means that the signedness is not + relevant to the definition of the opcode, and that the operation + on signed or unsigned values will give the same result. +

+

+ The "select" opcodes divide the bits in the source value into + two halves. For "select0", the half that is first in memory + order is selected, and the latter half for "select1". In other + words, "convwb" is the same as "select0wb" on little-endian + systems, and "select1wb" on big-endian systems. +

+

+ The "merge" opcodes take two values and put them together in + memory order. +

+

+ Accumulating opcodes require an accumulator variable as the + destination. Accumulating opcodes start with "acc". These + opcodes sum the source values over the entire array, and can + be read from the OrcExecutor structure after an execution + of an Orc program. +

+

+ Shift opcodes only work with constants or parameters as the + second source value. +

+

+ For more precise understanding of operations, it is recommended + to compile a program for the C target and examine the resulting C + source code. +

+
+

Table 1. Table of Opcodes

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
opcodedestination sizesource 1 sizesource 2 sizedescriptionpseudo code
absb11 absolute value(a < 0) ? -a : a
addb111adda + b
addssb111add with signed saturateclamp(a + b)
addusb111add with unsigned saturateclamp(a + b)
andb111bitwise ANDa & b
andnb111bitwise AND NOTa & (~b)
avgsb111signed average(a + b + 1)>>1
avgub111unsigned average(a + b + 1)>>1
cmpeqb111compare equal(a == b) ? (~0) : 0
cmpgtsb111compare greater than(a > b) ? (~0) : 0
copyb11 copya
loadb11 load from memoryarray[i]
loadoffb114Sload from memory with offsetarray[i+offset]
loadupdb11 load upsampled duplicatearray[i>>1]
loadupib11 load upsampled interpolate(array[i>>1] + array[(i+1)>>1] + 1)>>1
loadpb11 load parameter or constantscalar
ldresnearb114Sload, nearest neighbor resampledarray[(b+c*i)>>8]
ldresnearl444Sload, nearest neighbor resampledarray[(b+c*i)>>8]
ldreslinb114Sload, bilinear resampledspecial
ldreslinl444Sload, bilinear resampledspecial
maxsb111signed maximum(a > b) ? a : b
maxub111unsigned maximum(a > b) ? a : b
minsb111signed minimum(a < b) ? a : b
minub111unsigned minimum(a < b) ? a : b
mullb111low bits of multiplya * b
mulhsb111high bits of signed multiply(a * b) >> 8
mulhub111high bits of unsigned multiply(a * b) >> 8
orb111bitwise ora | b
shlb111Sshift lefta << b
shrsb111Ssigned shift righta >> b
shrub111Sunsigned shift righta >> b
signb11 signsign(a)
storeb11 store to memoryspecial
subb111subtracta - b
subssb111subtract with signed saturateclamp(a - b)
subusb111subtract with unsigned saturateclamp(a - b)
xorb111bitwise XORa ^ b
absw22 absolute value(a < 0) ? -a : a
addw222adda + b
addssw222add with signed saturateclamp(a + b)
addusw222add with unsigned saturateclamp(a + b)
andw222bitwise ANDa & b
andnw222bitwise AND NOTa & (~b)
avgsw222signed average(a + b + 1)>>1
avguw222unsigned average(a + b + 1)>>1
cmpeqw222compare equal(a == b) ? (~0) : 0
cmpgtsw222compare greater than(a > b) ? (~0) : 0
copyw22 copya
div255w22 divide by 255a/255
divluw222saturated unsigned divide 16-bit by 8-bitclamp(a/(b & 255),0,255)
loadw22 load from memoryarray[i]
loadoffw224Sload from memory with offsetarray[i+offset]
loadpw22 load parameter or constantscalar
maxsw222signed maximum(a > b) ? a : b
maxuw222unsigned maximum(a > b) ? a : b
minsw222signed minimum(a < b) ? a : b
minuw222unsigned minimum(a < b) ? a : b
mullw222low bits of multiplya * b
mulhsw222high bits of signed multiply(a * b) >> 8
mulhuw222high bits of unsigned multiply(a * b) >> 8
orw222bitwise ora | b
shlw222Sshift lefta << b
shrsw222Ssigned shift righta >> b
shruw222Sunsigned shift righta >> b
signw22 signsign(a)
storew22 store to memoryspecial
subw222subtracta - b
subssw222subtract with signed saturateclamp(a - b)
subusw222subtract with unsigned saturateclamp(a - b)
xorw222bitwise XORa ^ b
absl44 absolute value(a < 0) ? -a : a
addl444adda + b
addssl444add with signed saturateclamp(a + b)
addusl444add with unsigned saturateclamp(a + b)
andl444bitwise ANDa & b
andnl444bitwise AND NOTa & (~b)
avgsl444signed average(a + b + 1)>>1
avgul444unsigned average(a + b + 1)>>1
cmpeql444compare equal(a == b) ? (~0) : 0
cmpgtsl444compare greater than(a > b) ? (~0) : 0
copyl44 copya
loadl44 load from memoryarray[i]
loadoffl444Sload from memory with offsetarray[i+offset]
loadpl44 load parameter or constantscalar
maxsl444signed maximum(a > b) ? a : b
maxul444unsigned maximum(a > b) ? a : b
minsl444signed minimum(a < b) ? a : b
minul444unsigned minimum(a < b) ? a : b
mulll444low bits of multiplya * b
mulhsl444high bits of signed multiply(a * b) >> 16
mulhul444high bits of unsigned multiply(a * b) >> 16
orl444bitwise ora | b
shll444Sshift lefta << b
shrsl444Ssigned shift righta >> b
shrul444Sunsigned shift righta >> b
signl44 signsign(a)
storel44 store to memoryspecial
subl444subtracta - b
subssl444subtract with signed saturateclamp(a - b)
subusl444subtract with unsigned saturateclamp(a - b)
xorl444bitwise XORa ^ b
loadq88 load from memoryarray[i]
loadpq88 load parameter or constantscalar
storeq88 store to memoryspecial
splatw3q88 duplicates high 16-bits to lower 48 bitsspecial
copyq88   
cmpeqq888  
cmpgtsq888  
andq888  
andnq888  
orq888  
xorq888  
addq888  
subq888  
shlq888S  
shrsq888S  
shruq888S  
convsbw21 convert signeda
convubw21 convert unsigneda
splatbw21 duplicates 8 bits to both halfs of 16 bitsspecial
splatbl41 duplicates 8 bits to all parts of 32 bitsspecial
convswl42 convert signeda
convuwl42 convert unsigneda
convslq84 signed converta
convulq84 unsigned converta
convwb12 converta
convhwb12 shift and converta>>8
convssswb12 convert signed to signed with saturationclamp(a)
convsuswb12 convert signed to unsigned with saturationclamp(a)
convusswb12 convert unsigned to signed with saturationclamp(a)
convuuswb12 convert unsigned to unsigned with saturationclamp(a)
convlw24 converta
convhlw24 shift and converta>>16
convssslw24 convert signed to signed with saturationclamp(a)
convsuslw24 convert signed to unsigned with saturationclamp(a)
convusslw24 convert unsigned to signed with saturationclamp(a)
convuuslw24 convert unsigned to unsigned with saturationclamp(a)
convql48 converta
convsssql48 convert signed to signed with saturationclamp(a)
convsusql48 convert signed to unsigned with saturationclamp(a)
convussql48 convert unsigned to signed with saturationclamp(a)
convuusql48 convert unsigned to unsigned with saturationclamp(a)
mulsbw211multiply signeda * b
mulubw211multiply unsigneda * b
mulswl422multiply signeda * b
muluwl422multiply unsigneda * b
accw22 accumulate+= a
accl44 accumulate+= a
accsadubl411accumulate absolute difference+= abs(a - b)
swapw22 endianness swapspecial
swapl44 endianness swapspecial
swapwl44   
swapq88   
swaplq88   
select0wb12 select first halfspecial
select1wb12 select second halfspecial
select0lw24 select first halfspecial
select1lw24 select second halfspecial
mergewl422merge halvesspecial
mergebw211merge halvesspecial
splitql48   
splitlw24 split first/second wordsspecial
splitwb12 split first/second bytesspecial
addf444adda + b
subf444subtracta - b
mulf444multiplya * b
divf444dividea / b
sqrtf44 square rootsqrt(a)
maxf444maximummax(a,b)
minf444minimummin(a,b)
cmpeqf444compare equal(a == b) ? (~0) : 0
cmpltf444compare less than(a == b) ? (~0) : 0
cmplef444compare less than or equal(a == b) ? (~0) : 0
convfl44 convert float point to integera
convlf44 convert integer to floating pointa
addd888  
subd888  
muld888  
divd888  
sqrtd88   
maxd888  
mind888  
cmpeqd888  
cmpltd888  
cmpled888  
convdl48   
convld84   
convfd84   
convdf48   
+
+

+ In the pseudo code of the above table, abs() indicates absolute + value, clamp() indicates that any values outside the destination + range are set to the nearest value in the destination range, and + sign() evaluates to -1 for values less than 0, 1 for values + greater than 0, and 0 for 0. +

+
+
+

Rule Coverage

+

+ The values for shift operations are not correct in this table. +

+
+

Table 2. Table of Opcode Rule Coverage

+
+++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
opcode namessemmxaltivecarmneonc64x-c
absbyesyesyesnoyesno
addbyesyesyesyesyesno
addssbyesyesyesyesyesno
addusbyesyesyesyesyesno
andbyesyesyesyesyesno
andnbyesyesyesyesyesno
avgsbyesyesyesyesyesno
avgubyesyesyesyesyesno
cmpeqbyesyesyesyesyesno
cmpgtsbyesyesyesyesyesno
copybyesyesyesyesyesno
loadbyesyesyesyesyesno
loadoffbyesyesnonoyesno
loadupdbyesyesnononono
loadupibyesyesnononono
loadpbyesyesyesyesyesno
ldresnearbnononononono
ldresnearlyesyesnononono
ldreslinbnononononono
ldreslinlyesyesnononono
maxsbyesyesyesnoyesno
maxubyesyesyesnoyesno
minsbyesyesyesnoyesno
minubyesyesyesnoyesno
mullbyesyesyesyesyesno
mulhsbyesyesyesyesyesno
mulhubyesyesyesnoyesno
orbyesyesyesyesyesno
shlbyesyesyesyesyesno
shrsbyesyesyesnoyesno
shrubyesyesyesnoyesno
signbyesyesyesnoyesno
storebyesyesyesyesyesno
subbyesyesyesyesyesno
subssbyesyesyesyesyesno
subusbyesyesyesyesyesno
xorbyesyesyesyesyesno
abswyesyesyesnoyesno
addwyesyesyesyesyesno
addsswyesyesyesyesyesno
adduswyesyesyesyesyesno
andwyesyesyesyesyesno
andnwyesyesyesyesyesno
avgswyesyesyesnoyesno
avguwyesyesyesyesyesno
cmpeqwyesyesyesyesyesno
cmpgtswyesyesyesyesyesno
copywyesyesyesyesyesno
div255wyesyesyesnoyesno
divluwyesyesnononono
loadwyesyesyesyesyesno
loadoffwyesyesnonoyesno
loadpwyesyesyesyesyesno
maxswyesyesyesnoyesno
maxuwyesyesyesnoyesno
minswyesyesyesnoyesno
minuwyesyesyesnoyesno
mullwyesyesyesyesyesno
mulhswyesyesyesyesyesno
mulhuwyesyesyesnoyesno
orwyesyesyesyesyesno
shlwyesyesyesyesyesno
shrswyesyesyesnoyesno
shruwyesyesyesyesyesno
signwyesyesyesnoyesno
storewyesyesyesyesyesno
subwyesyesyesyesyesno
subsswyesyesyesyesyesno
subuswyesyesyesyesyesno
xorwyesyesyesyesyesno
abslyesyesyesnoyesno
addlyesyesyesyesyesno
addsslyesyesyesyesyesno
adduslyesyesyesyesyesno
andlyesyesyesyesyesno
andnlyesyesyesyesyesno
avgslyesyesyesnoyesno
avgulyesyesyesnoyesno
cmpeqlyesyesyesyesyesno
cmpgtslyesyesyesyesyesno
copylyesyesyesyesyesno
loadlyesyesyesyesyesno
loadofflyesyesnonoyesno
loadplyesyesyesyesyesno
maxslyesyesyesyesyesno
maxulyesyesyesyesyesno
minslyesyesyesyesyesno
minulyesyesyesyesyesno
mulllyesnonoyesyesno
mulhslyesnonoyesyesno
mulhulyesnononoyesno
orlyesyesyesyesyesno
shllyesyesyesyesyesno
shrslyesyesyesyesyesno
shrulyesyesyesyesyesno
signlyesyesyesnoyesno
storelyesyesyesyesyesno
sublyesyesyesyesyesno
subsslyesyesyesnoyesno
subuslyesyesyesyesyesno
xorlyesyesyesyesyesno
loadqyesyesyesnoyesno
loadpqyesyesnononono
storeqyesyesyesnoyesno
splatw3qyesyesyesnoyesno
copyqyesyesnononono
cmpeqqnononononono
cmpgtsqnononononono
andqyesyesnononono
andnqyesyesnononono
orqyesyesnononono
xorqyesyesnononono
addqyesnonononono
subqyesnonononono
shlqyesyesnononono
shrsqyesyesnononono
shruqyesyesnononono
convsbwyesyesyesyesyesno
convubwyesyesyesnoyesno
splatbwyesyesyesnoyesno
splatblyesyesyesnoyesno
convswlyesyesyesnoyesno
convuwlyesyesyesnoyesno
convslqyesyesyesnoyesno
convulqyesyesyesnoyesno
convwbyesyesyesyesyesno
convhwbyesyesyesnoyesno
convssswbyesyesyesyesyesno
convsuswbyesyesyesyesyesno
convusswbnononononono
convuuswbyesyesyesnoyesno
convlwyesyesyesyesyesno
convhlwyesyesyesnoyesno
convssslwyesyesyesnoyesno
convsuslwnonoyesyesyesno
convusslwnononononono
convuuslwnonoyesnoyesno
convqlyesyesyesnoyesno
convsssqlnonononoyesno
convsusqlnonononoyesno
convussqlnononononono
convuusqlnonononoyesno
mulsbwyesyesyesyesyesno
mulubwyesyesyesnoyesno
mulswlyesyesyesnoyesno
muluwlyesyesyesnoyesno
accwyesyesnonoyesno
acclyesyesyesnoyesno
accsadublyesyesnonoyesno
swapwyesyesyesyesyesno
swaplyesyesyesyesyesno
swapwlyesyesnononono
swapqyesyesnononono
swaplqyesyesnononono
select0wbyesyesyesyesyesno
select1wbyesyesyesyesyesno
select0lwyesyesyesyesyesno
select1lwyesyesyesyesyesno
mergewlyesyesyesyesyesno
mergebwyesyesyesnoyesno
splitqlyesyesnononono
splitlwyesyesyesnoyesno
splitwbyesyesyesnoyesno
addfyesnoyesnoyesno
subfyesnoyesnoyesno
mulfyesnoyesnoyesno
divfyesnonononono
sqrtfyesnonononono
maxfyesnoyesnoyesno
minfyesnoyesnoyesno
cmpeqfyesnoyesnoyesno
cmpltfyesnoyesnonono
cmplefyesnoyesnonono
convflyesnoyesnoyesno
convlfyesnoyesnoyesno
adddyesnonononono
subdyesnonononono
muldyesnonononono
divdyesnonononono
sqrtdyesnonononono
maxdyesnonononono
mindyesnonononono
cmpeqdyesnonononono
cmpltdyesnonononono
cmpledyesnonononono
convdlyesnonononono
convldyesnonononono
convfdyesnonononono
convdfyesnonononono
+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-tutorial.html b/doc/html/orc-tutorial.html new file mode 100644 index 0000000..dc1a868 --- /dev/null +++ b/doc/html/orc-tutorial.html @@ -0,0 +1,531 @@ + + + + +Orc Tutorial + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Orc Tutorial

+

Orc Tutorial — +Getting started writing Orc code. +

+
+
+

Orc Tutorial

+

+ This section walks you through several examples of increasing + complexity to get you started working with Orc. Each of these + examples are available in the Orc source code, in the examples + directory. The first three examples use static Orc code that + is in a source file, and is compiled into intermediate C code + by the orcc tool. +

+

+ The first example demonstrates how to add two arrays of 16-bit + signed integers together. A possible use case for this is + combining two stereo audio streams together. +

+

+ The second example builds from the first, replacing one of the + stereo input streams with a mono stream, converting it to stereo + in the process, and also adjusting the volume of the stream. +

+

+ The third example shows how to convert a planar 4:2:0 video + image into a packed 4:4:4 video image with an alpha channel. +

+
+
+

Example 1

+

+ This example demonstrates combining two stereo audio streams + by adding. Uncompressed audio streams (i.e., PCM format) can + be in a variety of formats, but one of the most common is + interleaved signed 16-bit integers, and we will choose that + for the purposes of this example. Extending to other formats + is left as an exercise for the reader. Interleaved means that + left and right channel samples are consecutive: in memory, the + data look like LRLRLR... The sampling rate is unimportant, as + long as both streams are the same. +

+

+ One important feature/limitation of signed 16-bit audio samples + is that adding two together could cause an overflow. For example, + adding the value 25000 to 10000 gives 35000, but this overflows + 16 bits, so a standard addition would instead give the value + -30536 (35000-65536). Overflows handled this way sound like + crackling or worse, so we would like a better solution. One + solution is to use saturating addition: in this case, the addition + of 25000 and 10000 would be limited by the upper end of signed + 16-bit values to give 32767. Although this still causes + distortion in the output signal, it is much less audible and + annoying. +

+

+ In normal C code, 16-bit saturating addition is difficult to express + without using 32-bit intermediates. In Orc, saturating addition + is a basic operation with opcodes for each size, both signed and + unsigned. In this case, we want "addssw", for "add signed saturated + word". +

+

+ Also, we're going to make a one simplification: Adding two + interleaved stereo streams is the same as adding two mono streams + with twice as many samples. So we'll use 2*n_samples in the calling + code. +

+

+ To the code: + +

+
+.function audio_add_s16
+.dest 2 d1
+.source 2 s1
+.source 2 s2
+
+addssw d1, s1, s2
+
+

+

+

+ Line by line: + +

+
+.function audio_add_s16
+
+

+ + This starts a function. A function (represented internally by the + object OrcProgram) is equivalent to a C function. When you generate + C code from this Orc exmaple using the orcc tool, it generates a C + stub function called "audio_add_s16()", which at runtime will + generate an OrcProgram object corresponding to the above code, + compile it, and then run it. + +

+
+.dest 2 d1 short
+
+

+ + This specifies that you want a destination (output) array named "d1", + with the element size being 2. Orc does not differentiate between + signed and unsigned arrays (or even floating point), however, you + may optionally specify a type afterwards that will be used in any + autogenerated C code. + +

+
+.source 2 s1 short
+.source 2 s2 short
+
+

+ + This specifies that you want two source (input) arrays, "s1" and "s2", + similar to the destination array. + +

+
+addssw d1, s1, s2
+
+

+ + This specifies the (only) opcode that we want for this program: signed + saturated addition of each member of the two source arrays, and store + the result in the destination array. +

+

+ A few notes about the above program: The loop over the array members + is implied. Everything that Orc does is based on looping over each + array element and executing the opcodes in a program. +

+

+ When you generate C code from the above Orc code using + 'orcc --implementation example1.orc', + you get a bunch of boilerplate code, plus three C functions: + +

+
+/* audio_add_s16 */
+#ifdef DISABLE_ORC
+void
+audio_add_s16 (int16 * d1, const int16 * s1, const int16 * s2, int n)
+{
+  ...
+}
+
+

+ + This function is used if DISABLE_ORC is defined. As one might guess, + if you define DISABLE_ORC, no runtime Orc features are used, and all + calls to audio_add_s16() use this function. The interior of the function + is a for() loop that implements the Orc function. The generated code + may not necessarily be easy to read, but it is straightforward: all + the verbosity and use of unions is to avoid compiler warnings without + making the compiler too complex. But this is the place to go if you + are trying to understand what Orc is doing. + +

+
+#else
+static void
+_backup_audio_add_s16 (OrcExecutor * ORC_RESTRICT ex)
+{
+  ...
+}
+
+

+ + This function is used when runtime Orc is enabled, but Orc was unable + to generate code for the function at runtime. There are various + reasons why that might happen -- unimplemented rules for a target, or + more temporary variables used than available registers. + +

+
+void
+audio_add_s16 (short * d1, const short * s1, const short * s2, int n)
+{
+  ...
+}
+
+

+ + The third generated function is the important part: It is used when + Orc is enabled at runtime, and creates the OrcProgram corresponding + to the function you defined. Then it compiles the function and + calls it. +

+

+ After generating the C code, you should generate the header file, + using: 'orcc --header example1orc.orc -o example1orc.h'. + After similar boilerplate code, there is the expected declaration + of audio_add_s16(): + +

+
+void audio_add_s16 (short * d1, const short * s1, const short * s2, int n);
+
+

+ + +

+

+ Some C code to generate sample data, call the generated code, and + print out the results: + +

+
+#include <stdio.h>
+#include "example1orc.h"
+
+#define N 10
+
+short a[N];
+short b[N];
+short c[N];
+
+int
+main (int argc, char *argv[])
+{
+  int i;
+
+  /* Create some data in the source arrays */
+  for(i=0;i < N;i++){
+    a[i] = 100*i;
+    b[i] = 32000;
+  }
+
+  /* Call a function that uses Orc */
+  audio_add_s16 (c, a, b, N);
+
+  /* Print the results */
+  for(i=0;i < N;i++){
+    printf("%d: %d %d -> %d\n", i, a[i], b[i], c[i]);
+  }
+
+  return 0;
+}
+
+

+

+

+ The output of the program: + +

+
+0: 0 32000 -> 32000
+1: 100 32000 -> 32100
+2: 200 32000 -> 32200
+3: 300 32000 -> 32300
+4: 400 32000 -> 32400
+5: 500 32000 -> 32500
+6: 600 32000 -> 32600
+7: 700 32000 -> 32700
+8: 800 32000 -> 32767
+9: 900 32000 -> 32767
+
+

+

+

+ +

+
+
+

Example 2

+

+ In this example, we will expand on the previous example by making + one of the input arrays a mono stream, and also scale the mono + input stream by a volume. Rather than iterating over each + signed 16-bit value, in this example we will iterate over samples, + meaning the member size for the stereo arrays is 4, since each + array member contains a left and right 16 bit value. +

+

+

+
+.function audio_add_mono_to_stereo_scaled_s16
+.dest 4 d1 short
+.source 4 s1 short
+.source 2 s2 short
+.param 2 volume
+.temp 4 s2_scaled
+.temp 2 t
+.temp 4 s2_stereo
+
+mulswl s2_scaled, s2, volume
+shrsl s2_scaled, s2_scaled, 12
+convssslw t, s2_scaled
+mergewl s2_stereo, t, t
+x2 addssw d1, s1, s2_stereo
+
+

+ + Piece by piece: + +

+
+.function audio_add_mono_to_stereo_scaled_s16
+.dest 4 d1 short
+.source 4 s1 short
+.source 2 s2 short
+
+

+ + This is the same as the previous example, except that the stereo + arrays are increased in size to 4. However, we'll use the short + type, since Orc does not care what type we use, and short is + the type of the array we want to use in the C code. + +

+
+.param 2 volume
+
+

+ + This specifies a parameter, which is an integer that is passed to + an Orc function. In the generated C code, parameters are always of + type int. There are also float parameters for the floating point + equivalent. + +

+
+.temp 4 s2_scaled
+.temp 2 t
+.temp 4 s2_stereo
+
+

+ + This specifies a few temporary variables that are used later in the + code. These definitions are similar to defining local variables in + C code. Note that the size is important: each opcode has + specific sizes for source and destination operands, and it is + important to match these correctly with temporary variables. + +

+
+mulswl s2_scaled, s2, volume
+shrsl s2_scaled, s2_scaled, 12
+
+

+ + This scales the mono input: signed multiply of s2 and volume, giving + a 32-bit value, and then a signed right shift by 12. Since the + second operand of mulswl is 16-bit, only the lower 16 bits of + volume will be used in the multiply. The right shift is + effectively the same as dividing by 4096. Thus, a neutral scaling + that does not increase or decrease the mono input would correspond + to calling the function with a parameter value of 4096. + +

+
+convssslw t, s2_scaled
+mergewl s2_stereo, t, t
+
+

+ + The first instruction is "convert saturated signed 32-bit to signed + 16-bit", and the second merges the two values of (16 bit) t into the + high and low halves of s2_stereo. This duplicates the mono signal + into the right and left channels. It is important to use the + saturated conversion, since the effective scaling value may have + been greater than 1.0, thus the larger values may need to be clipped. + +

+
+x2 addssw d1, s1, s2_stereo
+
+

+ + The "x2" prefix indicates that we want the operation specified to be + done twice, first to the upper half of all operands, and again + separately to the lower half of all operands. Since addssw is + normally a 16-bit operation, the x2 prefix causes it to be a 32-bit + operation. And so, it adds the newly created right and left values + of the scaled mono signal into the s1 signal. +

+

+ There are several variations of the above program that might be + more suitable for a particular application. This function only + handles a limited dynamic range of volume scaling factors, however, + by changing the shift constant, or turning the shift into a + parameter, the dynamic range can be increased significantly. +

+
+
+

Example 3

+

+ The third example shows how to convert a planar 4:2:0 video + image into a packed 4:4:4 video image with an alpha channel. The + first format is often referred to as I420 and the second as AYUV. +

+

+ For simplicity in the following discussion, we'll assume that the + image dimensions are 640x480. The 4:2:0 subsampling means the + input chroma planes are 320x240 (subsampled by 2 in each direction). + These need to be upsampled to 640x480, then repacked with the input + Y plane, with an added dummy alpha value. There are many ways to + perform upsampling; the simplest is to duplicate each value + horizontally and vertically. The result is low quality, but + adequate for demonstration purposes. +

+

+ There are several choices for the Orc array size and dimensionality. + Iterating vertically can be done in the C code or in the Orc code. If + done in the Orc code, we would need to use an array size of 240 and + have two separate arrays for the even and odd Y rows. If done in the + C code, there is no such limitation. Horizontally, the story is + different: we can use the loadupsdb opcode to duplicate each byte in + the U and V arrays, so we can iterate over 640 array elements. It + is also possible to iterate over 320 elements and duplicate the U + and V elements using mergebw. There is a very slight speed + advantage to iterating vertically in Orc, and for demonstration + purposes, we will choose to use the loadupsdb opcode, thus we will + be iterating over 320x240 elements. +

+

+ The code: + +

+
+.function convert_I420_AYUV
+.flags 2d
+.dest 4 d1
+.dest 4 d2
+.source 1 y1
+.source 1 y2
+.source 1 u
+.source 1 v
+.const 1 c255 255
+.temp 2 uv
+.temp 2 ay
+.temp 1 tu
+.temp 1 tv
+
+loadupdb tu, u
+loadupdb tv, v
+mergebw uv, tu, tv
+mergebw ay, c255, y1
+mergewl d1, ay, uv
+mergebw ay, c255, y2
+mergewl d2, ay, uv
+
+

+ + A few things of note: The ".flags 2d" line is used to indicate that + Orc should iterate over two dimensions, and generate a prototype that + includes row strides for each array and a size parameter for the + second dimension. +

+

+ Since we are working on two input Y lines and two output AYUV lines + at a time, we need two source and destination arrays corresponding + to the even and odd lines. The row strides for these are doubled + compared to the normal 2-D array. +

+

+ The mergebw and mergewl opcodes join two 8-bit values into one 16-bit + value (or 16-bit values into a 32-bit value) by concatinating them + in memory order. Thus, to get AYUV in memory order, we merge AY and + UV, and to get UV, we merge U and V. Since we're duplicating each + U and V line, we use the same UV value for the even and odd output + lines. +

+

+ The prototype that is generated is: + +

+
+void convert_I420_AYUV (orc_uint32 * d1, int d1_stride, orc_uint32 * d2,
+  int d2_stride, const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2,
+  int s2_stride, const orc_uint8 * s3, int s3_stride, const orc_uint8 * s4,
+  int s4_stride, int n, int m);
+
+

+ + The orcc tool unhelpfully changed the names of the parameters, + however, the order is standard: first destinations, then sources, then + parameters, then array sizes. Think of it like memcpy() or memset(). +

+

+ Calling the function: + +

+
+convert_I420_AYUV (output, 1280*4, output + 640, 1280 * 4,
+    input_y, 1280, input_y + 640, 1280,
+    input_u, 320, input_v, 320,
+    320, 240);
+
+

+ +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc-x86.html b/doc/html/orc-x86.html new file mode 100644 index 0000000..0f727dc --- /dev/null +++ b/doc/html/orc-x86.html @@ -0,0 +1,1727 @@ + + + + +x86 + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

x86

+

x86 — code generation for x86

+
+
+

Synopsis

+
void                orc_x86_emit_add_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_add_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg,
+                                                         orc_bool record);
+void                orc_x86_emit_add_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_align                  (OrcCompiler *compiler);
+void                orc_x86_emit_and_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_and_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg);
+void                orc_x86_emit_cmp_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_cmp_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_dec_memoffset          (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg);
+void                orc_x86_emit_emms                   (OrcCompiler *compiler);
+void                orc_x86_emit_epilogue               (OrcCompiler *compiler);
+void                orc_x86_emit_je                     (OrcCompiler *compiler,
+                                                         int label);
+void                orc_x86_emit_jle                    (OrcCompiler *compiler,
+                                                         int label);
+void                orc_x86_emit_jmp                    (OrcCompiler *compiler,
+                                                         int label);
+void                orc_x86_emit_jne                    (OrcCompiler *compiler,
+                                                         int label);
+void                orc_x86_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+void                orc_x86_emit_modrm_memoffset        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2);
+void                orc_x86_emit_modrm_reg              (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg1);
+void                orc_x86_emit_mov_memoffset_mmx      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int is_aligned);
+void                orc_x86_emit_mov_memoffset_reg      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_memoffset_sse      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int is_aligned);
+void                orc_x86_emit_mov_mmx_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2,
+                                                         int aligned,
+                                                         int uncached);
+void                orc_x86_emit_mov_mmx_reg            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_mmx_reg_reg        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2);
+void                orc_x86_emit_mov_reg_mmx            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_reg_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_reg_sse            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_sse_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2,
+                                                         int aligned,
+                                                         int uncached);
+void                orc_x86_emit_mov_sse_reg            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_mov_sse_reg_reg        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_pop                    (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg);
+void                orc_x86_emit_prologue               (OrcCompiler *compiler);
+void                orc_x86_emit_push                   (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg);
+void                orc_x86_emit_ret                    (OrcCompiler *compiler);
+void                orc_x86_emit_rex                    (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int reg3);
+void                orc_x86_emit_sar_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg);
+void                orc_x86_emit_sub_memoffset_reg      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg,
+                                                         int destreg);
+void                orc_x86_emit_sub_reg_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+void                orc_x86_emit_test_reg_reg           (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+const char *        orc_x86_get_regname                 (int i);
+const char *        orc_x86_get_regname_16              (int i);
+const char *        orc_x86_get_regname_64              (int i);
+const char *        orc_x86_get_regname_mmx             (int i);
+const char *        orc_x86_get_regname_ptr             (OrcCompiler *compiler,
+                                                         int i);
+const char *        orc_x86_get_regname_sse             (int i);
+int                 orc_x86_get_regnum                  (int i);
+void                orc_x86_do_fixups                   (OrcCompiler *compiler);
+
+
+
+

Description

+
+
+

Details

+
+

orc_x86_emit_add_imm_memoffset ()

+
void                orc_x86_emit_add_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_add_imm_reg ()

+
void                orc_x86_emit_add_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg,
+                                                         orc_bool record);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

reg :

+

record :

+
+
+
+
+

orc_x86_emit_add_reg_memoffset ()

+
void                orc_x86_emit_add_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_align ()

+
void                orc_x86_emit_align                  (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_x86_emit_and_imm_memoffset ()

+
void                orc_x86_emit_and_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_and_imm_reg ()

+
void                orc_x86_emit_and_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

reg :

+
+
+
+
+

orc_x86_emit_cmp_imm_memoffset ()

+
void                orc_x86_emit_cmp_imm_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_cmp_reg_memoffset ()

+
void                orc_x86_emit_cmp_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_dec_memoffset ()

+
void                orc_x86_emit_dec_memoffset          (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

offset :

+

reg :

+
+
+
+
+

orc_x86_emit_emms ()

+
void                orc_x86_emit_emms                   (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_x86_emit_epilogue ()

+
void                orc_x86_emit_epilogue               (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_x86_emit_je ()

+
void                orc_x86_emit_je                     (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_x86_emit_jle ()

+
void                orc_x86_emit_jle                    (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_x86_emit_jmp ()

+
void                orc_x86_emit_jmp                    (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_x86_emit_jne ()

+
void                orc_x86_emit_jne                    (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_x86_emit_label ()

+
void                orc_x86_emit_label                  (OrcCompiler *compiler,
+                                                         int label);
+

+

+
++ + + + + + + + + + +

compiler :

+

label :

+
+
+
+
+

orc_x86_emit_modrm_memoffset ()

+
void                orc_x86_emit_modrm_memoffset        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

offset :

+

reg2 :

+
+
+
+
+

orc_x86_emit_modrm_reg ()

+
void                orc_x86_emit_modrm_reg              (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_imm_reg ()

+
void                orc_x86_emit_mov_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg1);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

reg1 :

+
+
+
+
+

orc_x86_emit_mov_memoffset_mmx ()

+
void                orc_x86_emit_mov_memoffset_mmx      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int is_aligned);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

offset :

+

reg1 :

+

reg2 :

+

is_aligned :

+
+
+
+
+

orc_x86_emit_mov_memoffset_reg ()

+
void                orc_x86_emit_mov_memoffset_reg      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

offset :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_memoffset_sse ()

+
void                orc_x86_emit_mov_memoffset_sse      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int is_aligned);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

offset :

+

reg1 :

+

reg2 :

+

is_aligned :

+
+
+
+
+

orc_x86_emit_mov_mmx_memoffset ()

+
void                orc_x86_emit_mov_mmx_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2,
+                                                         int aligned,
+                                                         int uncached);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

offset :

+

reg2 :

+

aligned :

+

uncached :

+
+
+
+
+

orc_x86_emit_mov_mmx_reg ()

+
void                orc_x86_emit_mov_mmx_reg            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_mmx_reg_reg ()

+
void                orc_x86_emit_mov_mmx_reg_reg        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_reg_memoffset ()

+
void                orc_x86_emit_mov_reg_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

offset :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_reg_mmx ()

+
void                orc_x86_emit_mov_reg_mmx            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_reg_reg ()

+
void                orc_x86_emit_mov_reg_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_reg_sse ()

+
void                orc_x86_emit_mov_reg_sse            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_sse_memoffset ()

+
void                orc_x86_emit_mov_sse_memoffset      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int offset,
+                                                         int reg2,
+                                                         int aligned,
+                                                         int uncached);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

offset :

+

reg2 :

+

aligned :

+

uncached :

+
+
+
+
+

orc_x86_emit_mov_sse_reg ()

+
void                orc_x86_emit_mov_sse_reg            (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_mov_sse_reg_reg ()

+
void                orc_x86_emit_mov_sse_reg_reg        (OrcCompiler *compiler,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_pop ()

+
void                orc_x86_emit_pop                    (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

size :

+

reg :

+
+
+
+
+

orc_x86_emit_prologue ()

+
void                orc_x86_emit_prologue               (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_x86_emit_push ()

+
void                orc_x86_emit_push                   (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

size :

+

reg :

+
+
+
+
+

orc_x86_emit_ret ()

+
void                orc_x86_emit_ret                    (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+

orc_x86_emit_rex ()

+
void                orc_x86_emit_rex                    (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2,
+                                                         int reg3);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

reg2 :

+

reg3 :

+
+
+
+
+

orc_x86_emit_sar_imm_reg ()

+
void                orc_x86_emit_sar_imm_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int value,
+                                                         int reg);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

value :

+

reg :

+
+
+
+
+

orc_x86_emit_sub_memoffset_reg ()

+
void                orc_x86_emit_sub_memoffset_reg      (OrcCompiler *compiler,
+                                                         int size,
+                                                         int offset,
+                                                         int reg,
+                                                         int destreg);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

offset :

+

reg :

+

destreg :

+
+
+
+
+

orc_x86_emit_sub_reg_reg ()

+
void                orc_x86_emit_sub_reg_reg            (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_emit_test_reg_reg ()

+
void                orc_x86_emit_test_reg_reg           (OrcCompiler *compiler,
+                                                         int size,
+                                                         int reg1,
+                                                         int reg2);
+

+

+
++ + + + + + + + + + + + + + + + + + +

compiler :

+

size :

+

reg1 :

+

reg2 :

+
+
+
+
+

orc_x86_get_regname ()

+
const char *        orc_x86_get_regname                 (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regname_16 ()

+
const char *        orc_x86_get_regname_16              (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regname_64 ()

+
const char *        orc_x86_get_regname_64              (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regname_mmx ()

+
const char *        orc_x86_get_regname_mmx             (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regname_ptr ()

+
const char *        orc_x86_get_regname_ptr             (OrcCompiler *compiler,
+                                                         int i);
+

+

+
++ + + + + + + + + + + + + + +

compiler :

+

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regname_sse ()

+
const char *        orc_x86_get_regname_sse             (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_get_regnum ()

+
int                 orc_x86_get_regnum                  (int i);
+

+

+
++ + + + + + + + + + +

i :

+

Returns :

+
+
+
+
+

orc_x86_do_fixups ()

+
void                orc_x86_do_fixups                   (OrcCompiler *compiler);
+

+

+
++ + + + +

compiler :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/orc.devhelp b/doc/html/orc.devhelp new file mode 100644 index 0000000..735ef9b --- /dev/null +++ b/doc/html/orc.devhelp @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/orc.devhelp2 b/doc/html/orc.devhelp2 new file mode 100644 index 0000000..a8b9fab --- /dev/null +++ b/doc/html/orc.devhelp2 @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/right.png b/doc/html/right.png new file mode 100644 index 0000000000000000000000000000000000000000..92832e3a4566e59d6e4092010e08d28f3be3a68d GIT binary patch literal 472 zcmV;}0Vn>6P)Cd4HCN^TYHBC0dz3r5|}*T3c5!K}0^NPTey!^rYo;W&eW{b1SE%dR-1ljcju- zJITo5P_e{cPDWDszO|97o#m$fni3V4d%~7^?0HU4-k!+X`e~w55Q}HA=c?CM9`EK` z^o5GF_RsnG`ey+9wOf8O4bzg>7W*;jU~M?g`OZAA$mNp|Lz<$s+~N9!2`ir8RcClo$(Q~19INM~9}j;&*|enC yGd}kJak0wj?aUKd8;%}`i}SSew>!A-2iw}^5}Rh(M>+vRkipZ{&t;ucLK6U4uc96R literal 0 HcmV?d00001 diff --git a/doc/opcode_table.xml b/doc/opcode_table.xml new file mode 100644 index 0000000..40692ec --- /dev/null +++ b/doc/opcode_table.xml @@ -0,0 +1,1529 @@ + +Table of Opcodes + + + +opcode +destination size +source 1 size +source 2 size +description +pseudo code + + + + +absb +1 +1 + +absolute value +(a < 0) ? -a : a + + +addb +1 +1 +1 +add +a + b + + +addssb +1 +1 +1 +add with signed saturate +clamp(a + b) + + +addusb +1 +1 +1 +add with unsigned saturate +clamp(a + b) + + +andb +1 +1 +1 +bitwise AND +a & b + + +andnb +1 +1 +1 +bitwise AND NOT +a & (~b) + + +avgsb +1 +1 +1 +signed average +(a + b + 1)>>1 + + +avgub +1 +1 +1 +unsigned average +(a + b + 1)>>1 + + +cmpeqb +1 +1 +1 +compare equal +(a == b) ? (~0) : 0 + + +cmpgtsb +1 +1 +1 +compare greater than +(a > b) ? (~0) : 0 + + +copyb +1 +1 + +copy +a + + +loadb +1 +1 + +load from memory +array[i] + + +loadoffb +1 +1 +4S +load from memory with offset +array[i+offset] + + +loadupdb +1 +1 + +load upsampled duplicate +array[i>>1] + + +loadupib +1 +1 + +load upsampled interpolate +(array[i>>1] + array[(i+1)>>1] + 1)>>1 + + +loadpb +1 +1 + +load parameter or constant +scalar + + +ldresnearb +1 +1 +4S +load, nearest neighbor resampled +array[(b+c*i)>>8] + + +ldresnearl +4 +4 +4S +load, nearest neighbor resampled +array[(b+c*i)>>8] + + +ldreslinb +1 +1 +4S +load, bilinear resampled +special + + +ldreslinl +4 +4 +4S +load, bilinear resampled +special + + +maxsb +1 +1 +1 +signed maximum +(a > b) ? a : b + + +maxub +1 +1 +1 +unsigned maximum +(a > b) ? a : b + + +minsb +1 +1 +1 +signed minimum +(a < b) ? a : b + + +minub +1 +1 +1 +unsigned minimum +(a < b) ? a : b + + +mullb +1 +1 +1 +low bits of multiply +a * b + + +mulhsb +1 +1 +1 +high bits of signed multiply +(a * b) >> 8 + + +mulhub +1 +1 +1 +high bits of unsigned multiply +(a * b) >> 8 + + +orb +1 +1 +1 +bitwise or +a | b + + +shlb +1 +1 +1S +shift left +a << b + + +shrsb +1 +1 +1S +signed shift right +a >> b + + +shrub +1 +1 +1S +unsigned shift right +a >> b + + +signb +1 +1 + +sign +sign(a) + + +storeb +1 +1 + +store to memory +special + + +subb +1 +1 +1 +subtract +a - b + + +subssb +1 +1 +1 +subtract with signed saturate +clamp(a - b) + + +subusb +1 +1 +1 +subtract with unsigned saturate +clamp(a - b) + + +xorb +1 +1 +1 +bitwise XOR +a ^ b + + +absw +2 +2 + +absolute value +(a < 0) ? -a : a + + +addw +2 +2 +2 +add +a + b + + +addssw +2 +2 +2 +add with signed saturate +clamp(a + b) + + +addusw +2 +2 +2 +add with unsigned saturate +clamp(a + b) + + +andw +2 +2 +2 +bitwise AND +a & b + + +andnw +2 +2 +2 +bitwise AND NOT +a & (~b) + + +avgsw +2 +2 +2 +signed average +(a + b + 1)>>1 + + +avguw +2 +2 +2 +unsigned average +(a + b + 1)>>1 + + +cmpeqw +2 +2 +2 +compare equal +(a == b) ? (~0) : 0 + + +cmpgtsw +2 +2 +2 +compare greater than +(a > b) ? (~0) : 0 + + +copyw +2 +2 + +copy +a + + +div255w +2 +2 + +divide by 255 +a/255 + + +divluw +2 +2 +2 +saturated unsigned divide 16-bit by 8-bit +clamp(a/(b & 255),0,255) + + +loadw +2 +2 + +load from memory +array[i] + + +loadoffw +2 +2 +4S +load from memory with offset +array[i+offset] + + +loadpw +2 +2 + +load parameter or constant +scalar + + +maxsw +2 +2 +2 +signed maximum +(a > b) ? a : b + + +maxuw +2 +2 +2 +unsigned maximum +(a > b) ? a : b + + +minsw +2 +2 +2 +signed minimum +(a < b) ? a : b + + +minuw +2 +2 +2 +unsigned minimum +(a < b) ? a : b + + +mullw +2 +2 +2 +low bits of multiply +a * b + + +mulhsw +2 +2 +2 +high bits of signed multiply +(a * b) >> 8 + + +mulhuw +2 +2 +2 +high bits of unsigned multiply +(a * b) >> 8 + + +orw +2 +2 +2 +bitwise or +a | b + + +shlw +2 +2 +2S +shift left +a << b + + +shrsw +2 +2 +2S +signed shift right +a >> b + + +shruw +2 +2 +2S +unsigned shift right +a >> b + + +signw +2 +2 + +sign +sign(a) + + +storew +2 +2 + +store to memory +special + + +subw +2 +2 +2 +subtract +a - b + + +subssw +2 +2 +2 +subtract with signed saturate +clamp(a - b) + + +subusw +2 +2 +2 +subtract with unsigned saturate +clamp(a - b) + + +xorw +2 +2 +2 +bitwise XOR +a ^ b + + +absl +4 +4 + +absolute value +(a < 0) ? -a : a + + +addl +4 +4 +4 +add +a + b + + +addssl +4 +4 +4 +add with signed saturate +clamp(a + b) + + +addusl +4 +4 +4 +add with unsigned saturate +clamp(a + b) + + +andl +4 +4 +4 +bitwise AND +a & b + + +andnl +4 +4 +4 +bitwise AND NOT +a & (~b) + + +avgsl +4 +4 +4 +signed average +(a + b + 1)>>1 + + +avgul +4 +4 +4 +unsigned average +(a + b + 1)>>1 + + +cmpeql +4 +4 +4 +compare equal +(a == b) ? (~0) : 0 + + +cmpgtsl +4 +4 +4 +compare greater than +(a > b) ? (~0) : 0 + + +copyl +4 +4 + +copy +a + + +loadl +4 +4 + +load from memory +array[i] + + +loadoffl +4 +4 +4S +load from memory with offset +array[i+offset] + + +loadpl +4 +4 + +load parameter or constant +scalar + + +maxsl +4 +4 +4 +signed maximum +(a > b) ? a : b + + +maxul +4 +4 +4 +unsigned maximum +(a > b) ? a : b + + +minsl +4 +4 +4 +signed minimum +(a < b) ? a : b + + +minul +4 +4 +4 +unsigned minimum +(a < b) ? a : b + + +mulll +4 +4 +4 +low bits of multiply +a * b + + +mulhsl +4 +4 +4 +high bits of signed multiply +(a * b) >> 16 + + +mulhul +4 +4 +4 +high bits of unsigned multiply +(a * b) >> 16 + + +orl +4 +4 +4 +bitwise or +a | b + + +shll +4 +4 +4S +shift left +a << b + + +shrsl +4 +4 +4S +signed shift right +a >> b + + +shrul +4 +4 +4S +unsigned shift right +a >> b + + +signl +4 +4 + +sign +sign(a) + + +storel +4 +4 + +store to memory +special + + +subl +4 +4 +4 +subtract +a - b + + +subssl +4 +4 +4 +subtract with signed saturate +clamp(a - b) + + +subusl +4 +4 +4 +subtract with unsigned saturate +clamp(a - b) + + +xorl +4 +4 +4 +bitwise XOR +a ^ b + + +loadq +8 +8 + +load from memory +array[i] + + +loadpq +8 +8 + +load parameter or constant +scalar + + +storeq +8 +8 + +store to memory +special + + +splatw3q +8 +8 + +duplicates high 16-bits to lower 48 bits +special + + +copyq +8 +8 + + + + + +cmpeqq +8 +8 +8 + + + + +cmpgtsq +8 +8 +8 + + + + +andq +8 +8 +8 + + + + +andnq +8 +8 +8 + + + + +orq +8 +8 +8 + + + + +xorq +8 +8 +8 + + + + +addq +8 +8 +8 + + + + +subq +8 +8 +8 + + + + +shlq +8 +8 +8S + + + + +shrsq +8 +8 +8S + + + + +shruq +8 +8 +8S + + + + +convsbw +2 +1 + +convert signed +a + + +convubw +2 +1 + +convert unsigned +a + + +splatbw +2 +1 + +duplicates 8 bits to both halfs of 16 bits +special + + +splatbl +4 +1 + +duplicates 8 bits to all parts of 32 bits +special + + +convswl +4 +2 + +convert signed +a + + +convuwl +4 +2 + +convert unsigned +a + + +convslq +8 +4 + +signed convert +a + + +convulq +8 +4 + +unsigned convert +a + + +convwb +1 +2 + +convert +a + + +convhwb +1 +2 + +shift and convert +a>>8 + + +convssswb +1 +2 + +convert signed to signed with saturation +clamp(a) + + +convsuswb +1 +2 + +convert signed to unsigned with saturation +clamp(a) + + +convusswb +1 +2 + +convert unsigned to signed with saturation +clamp(a) + + +convuuswb +1 +2 + +convert unsigned to unsigned with saturation +clamp(a) + + +convlw +2 +4 + +convert +a + + +convhlw +2 +4 + +shift and convert +a>>16 + + +convssslw +2 +4 + +convert signed to signed with saturation +clamp(a) + + +convsuslw +2 +4 + +convert signed to unsigned with saturation +clamp(a) + + +convusslw +2 +4 + +convert unsigned to signed with saturation +clamp(a) + + +convuuslw +2 +4 + +convert unsigned to unsigned with saturation +clamp(a) + + +convql +4 +8 + +convert +a + + +convsssql +4 +8 + +convert signed to signed with saturation +clamp(a) + + +convsusql +4 +8 + +convert signed to unsigned with saturation +clamp(a) + + +convussql +4 +8 + +convert unsigned to signed with saturation +clamp(a) + + +convuusql +4 +8 + +convert unsigned to unsigned with saturation +clamp(a) + + +mulsbw +2 +1 +1 +multiply signed +a * b + + +mulubw +2 +1 +1 +multiply unsigned +a * b + + +mulswl +4 +2 +2 +multiply signed +a * b + + +muluwl +4 +2 +2 +multiply unsigned +a * b + + +accw +2 +2 + +accumulate ++= a + + +accl +4 +4 + +accumulate ++= a + + +accsadubl +4 +1 +1 +accumulate absolute difference ++= abs(a - b) + + +swapw +2 +2 + +endianness swap +special + + +swapl +4 +4 + +endianness swap +special + + +swapwl +4 +4 + + + + + +swapq +8 +8 + + + + + +swaplq +8 +8 + + + + + +select0wb +1 +2 + +select first half +special + + +select1wb +1 +2 + +select second half +special + + +select0lw +2 +4 + +select first half +special + + +select1lw +2 +4 + +select second half +special + + +mergewl +4 +2 +2 +merge halves +special + + +mergebw +2 +1 +1 +merge halves +special + + +splitql +4 +8 + + + + + +splitlw +2 +4 + +split first/second words +special + + +splitwb +1 +2 + +split first/second bytes +special + + +addf +4 +4 +4 +add +a + b + + +subf +4 +4 +4 +subtract +a - b + + +mulf +4 +4 +4 +multiply +a * b + + +divf +4 +4 +4 +divide +a / b + + +sqrtf +4 +4 + +square root +sqrt(a) + + +maxf +4 +4 +4 +maximum +max(a,b) + + +minf +4 +4 +4 +minimum +min(a,b) + + +cmpeqf +4 +4 +4 +compare equal +(a == b) ? (~0) : 0 + + +cmpltf +4 +4 +4 +compare less than +(a == b) ? (~0) : 0 + + +cmplef +4 +4 +4 +compare less than or equal +(a == b) ? (~0) : 0 + + +convfl +4 +4 + +convert float point to integer +a + + +convlf +4 +4 + +convert integer to floating point +a + + +addd +8 +8 +8 + + + + +subd +8 +8 +8 + + + + +muld +8 +8 +8 + + + + +divd +8 +8 +8 + + + + +sqrtd +8 +8 + + + + + +maxd +8 +8 +8 + + + + +mind +8 +8 +8 + + + + +cmpeqd +8 +8 +8 + + + + +cmpltd +8 +8 +8 + + + + +cmpled +8 +8 +8 + + + + +convdl +4 +8 + + + + + +convld +8 +4 + + + + + +convfd +8 +4 + + + + + +convdf +4 +8 + + + + + + +
diff --git a/doc/opcodes.xml b/doc/opcodes.xml new file mode 100644 index 0000000..5e2235a --- /dev/null +++ b/doc/opcodes.xml @@ -0,0 +1,101 @@ + + +%version-entities; + +]> + + +Orc Opcodes +3 +Orc + + + +Orc Opcodes + +Description of Opcodes + + + + +Orc Opcodes + + + Opcodes only work with variables of a particular size. In the + table below, destination and source indicate the size of the + destination and source operands, in bytes. In general, opcodes + have a suffix indicating the sizes, "b" for 1-byte operations, + "w" for 2-byte operations, and "l" for 4-byte operations. If + the source and destination have different sizes, the source + size suffix is listed first, then the destination suffix. For + example, converting a 1-byte variable to 2-byte can be performed + using the "convsbw" opcode. + + + + Signed, unsigned, and saturating operations are indicated by + the letters "s", "u", and "s". If signed or unsigned is not + indicated, it generally means that the signedness is not + relevant to the definition of the opcode, and that the operation + on signed or unsigned values will give the same result. + + + + The "select" opcodes divide the bits in the source value into + two halves. For "select0", the half that is first in memory + order is selected, and the latter half for "select1". In other + words, "convwb" is the same as "select0wb" on little-endian + systems, and "select1wb" on big-endian systems. + + + + The "merge" opcodes take two values and put them together in + memory order. + + + + Accumulating opcodes require an accumulator variable as the + destination. Accumulating opcodes start with "acc". These + opcodes sum the source values over the entire array, and can + be read from the OrcExecutor structure after an execution + of an Orc program. + + + + Shift opcodes only work with constants or parameters as the + second source value. + + + + For more precise understanding of operations, it is recommended + to compile a program for the C target and examine the resulting C + source code. + + + + + + In the pseudo code of the above table, abs() indicates absolute + value, clamp() indicates that any values outside the destination + range are set to the nearest value in the destination range, and + sign() evaluates to -1 for values less than 0, 1 for values + greater than 0, and 0 for 0. + + + + + +Rule Coverage + + + The values for shift operations are not correct in this table. + + + + + + + + diff --git a/doc/orc-docs.sgml b/doc/orc-docs.sgml new file mode 100644 index 0000000..a9170ae --- /dev/null +++ b/doc/orc-docs.sgml @@ -0,0 +1,51 @@ + + +%version-entities; +]> + + + Orc Reference Manual + + for Orc-&ORC_VERSION;. + The latest version of this documentation can be found on-line at + http://code.entropywave.com/documentation/orc/. + + + + + Overview + + + + + + + Application API + + + + + + + + Extension API + + + + + + + Code Generation + + + + + + + + Herein lie dragons + + + diff --git a/doc/orc-overrides.txt b/doc/orc-overrides.txt new file mode 100644 index 0000000..e69de29 diff --git a/doc/orc-sections.txt b/doc/orc-sections.txt new file mode 100644 index 0000000..a70f68e --- /dev/null +++ b/doc/orc-sections.txt @@ -0,0 +1,324 @@ +
+orc +orc_init +
+ +
+orcprogram +OrcProgram +ORC_N_CONSTANTS +ORC_N_RULE_SETS +ORC_N_TARGETS +ORC_PROGRAM_ERROR +orc_program_new +orc_program_new_dss +orc_program_new_as +orc_program_new_ass +orc_program_new_ds +orc_program_free +orc_program_get_name +orc_program_set_name + +orc_program_add_temporary +orc_program_add_source +orc_program_add_destination +orc_program_add_constant +orc_program_add_accumulator +orc_program_add_parameter + +orc_program_append +orc_program_append_str +orc_program_append_ds +orc_program_append_ds_str + +orc_program_compile +orc_program_compile_for_target +orc_program_compile_full + +orc_program_get_asm_code + + +orc_program_find_var_by_name +orc_program_allocate_register +orc_program_get_max_var_size +orc_program_dup_temporary +
+ +
+orcutils +orc_bool +ORC_ASSERT +ORC_BEGIN_DECLS +ORC_CLAMP +ORC_END_DECLS +ORC_EXPORT +ORC_GNUC_PREREQ +ORC_GNU_PRINTF +ORC_INTERNAL +ORC_PTR_TO_INT +ORC_READ_UINT32_LE +ORC_WRITE_UINT32_LE +
+ +
+misc +OrcVariable +OrcInstruction +OrcRule +OrcFixup +OrcRuleEmitFunc +ORC_N_REGS +ORC_N_INSNS +ORC_N_VARIABLES +ORC_N_REGISTERS +ORC_N_FIXUPS +ORC_N_LABELS +ORC_GP_REG_BASE +ORC_VEC_REG_BASE +ORC_STRUCT_OFFSET +OrcVarType +orc_powerpc_init +orc_arm_init +orc_c_init +orc_parse +ARRAY_SIZE +MAX +MIN +get_cpuinfo_line +get_file +get_file_int +get_tag_value +strsplit +
+ +
+orcdebug +OrcDebugLevel +OrcDebugPrintFunc +ORC_DEBUG_PRINT +ORC_ERROR +ORC_WARNING +ORC_INFO +ORC_DEBUG +ORC_LOG +ORC_FUNCTION +orc_debug_get_level +orc_debug_print +orc_debug_set_level +orc_debug_set_print_function +
+ +
+orccompiler +OrcCompileResult +OrcCompiler +OrcConstant +ORC_COMPILER_ERROR +ORC_COMPILE_RESULT_IS_FATAL +ORC_COMPILE_RESULT_IS_SUCCESSFUL +ORC_ASM_CODE +ORC_ENABLE_ASM_CODE +orc_compiler_allocate_codemem +orc_compiler_append_code +orc_compiler_get_dest +orc_compiler_label_new +
+ +
+orcopcode +OrcOpcodeEmulateFunc +OrcOpcodeExecutor +OrcOpcodeSet +OrcRuleSet +OrcStaticOpcode +OrcTarget +ORC_OPCODE_N_ARGS +ORC_STATIC_OPCODE_ACCUMULATOR +ORC_STATIC_OPCODE_N_DEST +ORC_STATIC_OPCODE_N_SRC +orc_opcode_find_by_name +orc_opcode_init +orc_opcode_register_static +orc_opcode_set_find_by_name +orc_opcode_set_get +orc_rule_set_new +orc_target_get_asm_preamble +orc_target_get_by_name +orc_target_get_default +orc_target_get_default_flags +orc_target_get_name +orc_target_get_rule +orc_target_register +
+ +
+orcexecutor +OrcExecutor +orc_executor_new +orc_executor_free +orc_executor_set_array +orc_executor_set_array_str +orc_executor_set_n +orc_executor_emulate +orc_executor_run +orc_executor_get_accumulator +orc_executor_get_accumulator_str +orc_executor_set_param +orc_executor_set_param_str +orc_executor_set_program + +
+ +
+orcrule +orc_rule_register +
+ +
+orcx86 +orc_x86_emit_add_imm_memoffset +orc_x86_emit_add_imm_reg +orc_x86_emit_add_reg_memoffset +orc_x86_emit_align +orc_x86_emit_and_imm_memoffset +orc_x86_emit_and_imm_reg +orc_x86_emit_cmp_imm_memoffset +orc_x86_emit_cmp_reg_memoffset +orc_x86_emit_dec_memoffset +orc_x86_emit_emms +orc_x86_emit_epilogue +orc_x86_emit_je +orc_x86_emit_jle +orc_x86_emit_jmp +orc_x86_emit_jne +orc_x86_emit_label +orc_x86_emit_modrm_memoffset +orc_x86_emit_modrm_reg +orc_x86_emit_mov_imm_reg +orc_x86_emit_mov_memoffset_mmx +orc_x86_emit_mov_memoffset_reg +orc_x86_emit_mov_memoffset_sse +orc_x86_emit_mov_mmx_memoffset +orc_x86_emit_mov_mmx_reg +orc_x86_emit_mov_mmx_reg_reg +orc_x86_emit_mov_reg_memoffset +orc_x86_emit_mov_reg_mmx +orc_x86_emit_mov_reg_reg +orc_x86_emit_mov_reg_sse +orc_x86_emit_mov_sse_memoffset +orc_x86_emit_mov_sse_reg +orc_x86_emit_mov_sse_reg_reg +orc_x86_emit_pop +orc_x86_emit_prologue +orc_x86_emit_push +orc_x86_emit_ret +orc_x86_emit_rex +orc_x86_emit_sar_imm_reg +orc_x86_emit_sub_memoffset_reg +orc_x86_emit_sub_reg_reg +orc_x86_emit_test_reg_reg +orc_x86_get_regname +orc_x86_get_regname_16 +orc_x86_get_regname_64 +orc_x86_get_regname_mmx +orc_x86_get_regname_ptr +orc_x86_get_regname_sse +orc_x86_get_regnum +orc_x86_do_fixups +
+ +
+orcsse +OrcSSERegister +OrcTargetSSEFlags +ORC_SSE_SHUF +orc_sse_emit_0f +orc_sse_emit_660f +orc_sse_emit_f20f +orc_sse_emit_f30f +orc_sse_emit_loadib +orc_sse_emit_loadil +orc_sse_emit_loadiw +orc_sse_emit_loadpb +orc_sse_emit_loadpl +orc_sse_emit_loadpq +orc_sse_emit_loadpw +orc_sse_emit_pshufd +orc_sse_emit_pshuflw +orc_sse_emit_shiftimm +orc_sse_get_cpu_flags +orc_sse_init +
+ +
+orcmmx +OrcMMXRegister +OrcTargetMMXFlags +ORC_MMX_SHUF +orc_mmx_emit_0f +orc_mmx_emit_660f +orc_mmx_emit_f20f +orc_mmx_emit_f30f +orc_mmx_emit_loadib +orc_mmx_emit_loadil +orc_mmx_emit_loadiw +orc_mmx_emit_loadpb +orc_mmx_emit_loadpl +orc_mmx_emit_loadpq +orc_mmx_emit_loadpw +orc_mmx_emit_pshufw +orc_mmx_emit_shiftimm +orc_mmx_get_cpu_flags +orc_mmx_init +
+ +
+orcarm +OrcArmCond +OrcArmDP +OrcArmRegister +orc_arm_do_fixups +orc_arm_emit +orc_arm_emit_add +orc_arm_emit_add_imm +orc_arm_emit_branch +orc_arm_emit_bx_lr +orc_arm_emit_cmp_imm +orc_arm_emit_dp_reg +orc_arm_emit_label +orc_arm_emit_load_reg +orc_arm_emit_loadimm +orc_arm_emit_mov +orc_arm_emit_pop +orc_arm_emit_push +orc_arm_emit_sub +orc_arm_emit_sub_imm +orc_arm_loadw +orc_arm_reg_name +orc_arm_storew +
+ +
+orcpowerpc +powerpc_get_regname +powerpc_regnum +powerpc_add_fixup +powerpc_do_fixups +powerpc_emit +powerpc_emit_655510 +powerpc_emit_VA +powerpc_emit_VX +powerpc_emit_VX_2 +powerpc_emit_X +powerpc_emit_addi +powerpc_emit_b +powerpc_emit_beq +powerpc_emit_bne +powerpc_emit_label +powerpc_emit_lwz +powerpc_emit_ret +powerpc_emit_srawi +powerpc_emit_stwu +powerpc_flush +powerpc_get_constant +
diff --git a/doc/orc.types b/doc/orc.types new file mode 100644 index 0000000..e69de29 diff --git a/doc/table.xml b/doc/table.xml new file mode 100644 index 0000000..14beff6 --- /dev/null +++ b/doc/table.xml @@ -0,0 +1,1719 @@ + +Table of Opcode Rule Coverage + + + +opcode name +sse +mmx +altivec +arm +neon +c64x-c + + + + +absb +yes +yes +yes +no +yes +no + + +addb +yes +yes +yes +yes +yes +no + + +addssb +yes +yes +yes +yes +yes +no + + +addusb +yes +yes +yes +yes +yes +no + + +andb +yes +yes +yes +yes +yes +no + + +andnb +yes +yes +yes +yes +yes +no + + +avgsb +yes +yes +yes +yes +yes +no + + +avgub +yes +yes +yes +yes +yes +no + + +cmpeqb +yes +yes +yes +yes +yes +no + + +cmpgtsb +yes +yes +yes +yes +yes +no + + +copyb +yes +yes +yes +yes +yes +no + + +loadb +yes +yes +yes +yes +yes +no + + +loadoffb +yes +yes +no +no +yes +no + + +loadupdb +yes +yes +no +no +no +no + + +loadupib +yes +yes +no +no +no +no + + +loadpb +yes +yes +yes +yes +yes +no + + +ldresnearb +no +no +no +no +no +no + + +ldresnearl +yes +yes +no +no +no +no + + +ldreslinb +no +no +no +no +no +no + + +ldreslinl +yes +yes +no +no +no +no + + +maxsb +yes +yes +yes +no +yes +no + + +maxub +yes +yes +yes +no +yes +no + + +minsb +yes +yes +yes +no +yes +no + + +minub +yes +yes +yes +no +yes +no + + +mullb +yes +yes +yes +yes +yes +no + + +mulhsb +yes +yes +yes +yes +yes +no + + +mulhub +yes +yes +yes +no +yes +no + + +orb +yes +yes +yes +yes +yes +no + + +shlb +yes +yes +yes +yes +yes +no + + +shrsb +yes +yes +yes +no +yes +no + + +shrub +yes +yes +yes +no +yes +no + + +signb +yes +yes +yes +no +yes +no + + +storeb +yes +yes +yes +yes +yes +no + + +subb +yes +yes +yes +yes +yes +no + + +subssb +yes +yes +yes +yes +yes +no + + +subusb +yes +yes +yes +yes +yes +no + + +xorb +yes +yes +yes +yes +yes +no + + +absw +yes +yes +yes +no +yes +no + + +addw +yes +yes +yes +yes +yes +no + + +addssw +yes +yes +yes +yes +yes +no + + +addusw +yes +yes +yes +yes +yes +no + + +andw +yes +yes +yes +yes +yes +no + + +andnw +yes +yes +yes +yes +yes +no + + +avgsw +yes +yes +yes +no +yes +no + + +avguw +yes +yes +yes +yes +yes +no + + +cmpeqw +yes +yes +yes +yes +yes +no + + +cmpgtsw +yes +yes +yes +yes +yes +no + + +copyw +yes +yes +yes +yes +yes +no + + +div255w +yes +yes +yes +no +yes +no + + +divluw +yes +yes +no +no +no +no + + +loadw +yes +yes +yes +yes +yes +no + + +loadoffw +yes +yes +no +no +yes +no + + +loadpw +yes +yes +yes +yes +yes +no + + +maxsw +yes +yes +yes +no +yes +no + + +maxuw +yes +yes +yes +no +yes +no + + +minsw +yes +yes +yes +no +yes +no + + +minuw +yes +yes +yes +no +yes +no + + +mullw +yes +yes +yes +yes +yes +no + + +mulhsw +yes +yes +yes +yes +yes +no + + +mulhuw +yes +yes +yes +no +yes +no + + +orw +yes +yes +yes +yes +yes +no + + +shlw +yes +yes +yes +yes +yes +no + + +shrsw +yes +yes +yes +no +yes +no + + +shruw +yes +yes +yes +yes +yes +no + + +signw +yes +yes +yes +no +yes +no + + +storew +yes +yes +yes +yes +yes +no + + +subw +yes +yes +yes +yes +yes +no + + +subssw +yes +yes +yes +yes +yes +no + + +subusw +yes +yes +yes +yes +yes +no + + +xorw +yes +yes +yes +yes +yes +no + + +absl +yes +yes +yes +no +yes +no + + +addl +yes +yes +yes +yes +yes +no + + +addssl +yes +yes +yes +yes +yes +no + + +addusl +yes +yes +yes +yes +yes +no + + +andl +yes +yes +yes +yes +yes +no + + +andnl +yes +yes +yes +yes +yes +no + + +avgsl +yes +yes +yes +no +yes +no + + +avgul +yes +yes +yes +no +yes +no + + +cmpeql +yes +yes +yes +yes +yes +no + + +cmpgtsl +yes +yes +yes +yes +yes +no + + +copyl +yes +yes +yes +yes +yes +no + + +loadl +yes +yes +yes +yes +yes +no + + +loadoffl +yes +yes +no +no +yes +no + + +loadpl +yes +yes +yes +yes +yes +no + + +maxsl +yes +yes +yes +yes +yes +no + + +maxul +yes +yes +yes +yes +yes +no + + +minsl +yes +yes +yes +yes +yes +no + + +minul +yes +yes +yes +yes +yes +no + + +mulll +yes +no +no +yes +yes +no + + +mulhsl +yes +no +no +yes +yes +no + + +mulhul +yes +no +no +no +yes +no + + +orl +yes +yes +yes +yes +yes +no + + +shll +yes +yes +yes +yes +yes +no + + +shrsl +yes +yes +yes +yes +yes +no + + +shrul +yes +yes +yes +yes +yes +no + + +signl +yes +yes +yes +no +yes +no + + +storel +yes +yes +yes +yes +yes +no + + +subl +yes +yes +yes +yes +yes +no + + +subssl +yes +yes +yes +no +yes +no + + +subusl +yes +yes +yes +yes +yes +no + + +xorl +yes +yes +yes +yes +yes +no + + +loadq +yes +yes +yes +no +yes +no + + +loadpq +yes +yes +no +no +no +no + + +storeq +yes +yes +yes +no +yes +no + + +splatw3q +yes +yes +yes +no +yes +no + + +copyq +yes +yes +no +no +no +no + + +cmpeqq +no +no +no +no +no +no + + +cmpgtsq +no +no +no +no +no +no + + +andq +yes +yes +no +no +no +no + + +andnq +yes +yes +no +no +no +no + + +orq +yes +yes +no +no +no +no + + +xorq +yes +yes +no +no +no +no + + +addq +yes +no +no +no +no +no + + +subq +yes +no +no +no +no +no + + +shlq +yes +yes +no +no +no +no + + +shrsq +yes +yes +no +no +no +no + + +shruq +yes +yes +no +no +no +no + + +convsbw +yes +yes +yes +yes +yes +no + + +convubw +yes +yes +yes +no +yes +no + + +splatbw +yes +yes +yes +no +yes +no + + +splatbl +yes +yes +yes +no +yes +no + + +convswl +yes +yes +yes +no +yes +no + + +convuwl +yes +yes +yes +no +yes +no + + +convslq +yes +yes +yes +no +yes +no + + +convulq +yes +yes +yes +no +yes +no + + +convwb +yes +yes +yes +yes +yes +no + + +convhwb +yes +yes +yes +no +yes +no + + +convssswb +yes +yes +yes +yes +yes +no + + +convsuswb +yes +yes +yes +yes +yes +no + + +convusswb +no +no +no +no +no +no + + +convuuswb +yes +yes +yes +no +yes +no + + +convlw +yes +yes +yes +yes +yes +no + + +convhlw +yes +yes +yes +no +yes +no + + +convssslw +yes +yes +yes +no +yes +no + + +convsuslw +no +no +yes +yes +yes +no + + +convusslw +no +no +no +no +no +no + + +convuuslw +no +no +yes +no +yes +no + + +convql +yes +yes +yes +no +yes +no + + +convsssql +no +no +no +no +yes +no + + +convsusql +no +no +no +no +yes +no + + +convussql +no +no +no +no +no +no + + +convuusql +no +no +no +no +yes +no + + +mulsbw +yes +yes +yes +yes +yes +no + + +mulubw +yes +yes +yes +no +yes +no + + +mulswl +yes +yes +yes +no +yes +no + + +muluwl +yes +yes +yes +no +yes +no + + +accw +yes +yes +no +no +yes +no + + +accl +yes +yes +yes +no +yes +no + + +accsadubl +yes +yes +no +no +yes +no + + +swapw +yes +yes +yes +yes +yes +no + + +swapl +yes +yes +yes +yes +yes +no + + +swapwl +yes +yes +no +no +no +no + + +swapq +yes +yes +no +no +no +no + + +swaplq +yes +yes +no +no +no +no + + +select0wb +yes +yes +yes +yes +yes +no + + +select1wb +yes +yes +yes +yes +yes +no + + +select0lw +yes +yes +yes +yes +yes +no + + +select1lw +yes +yes +yes +yes +yes +no + + +mergewl +yes +yes +yes +yes +yes +no + + +mergebw +yes +yes +yes +no +yes +no + + +splitql +yes +yes +no +no +no +no + + +splitlw +yes +yes +yes +no +yes +no + + +splitwb +yes +yes +yes +no +yes +no + + +addf +yes +no +yes +no +yes +no + + +subf +yes +no +yes +no +yes +no + + +mulf +yes +no +yes +no +yes +no + + +divf +yes +no +no +no +no +no + + +sqrtf +yes +no +no +no +no +no + + +maxf +yes +no +yes +no +yes +no + + +minf +yes +no +yes +no +yes +no + + +cmpeqf +yes +no +yes +no +yes +no + + +cmpltf +yes +no +yes +no +no +no + + +cmplef +yes +no +yes +no +no +no + + +convfl +yes +no +yes +no +yes +no + + +convlf +yes +no +yes +no +yes +no + + +addd +yes +no +no +no +no +no + + +subd +yes +no +no +no +no +no + + +muld +yes +no +no +no +no +no + + +divd +yes +no +no +no +no +no + + +sqrtd +yes +no +no +no +no +no + + +maxd +yes +no +no +no +no +no + + +mind +yes +no +no +no +no +no + + +cmpeqd +yes +no +no +no +no +no + + +cmpltd +yes +no +no +no +no +no + + +cmpled +yes +no +no +no +no +no + + +convdl +yes +no +no +no +no +no + + +convld +yes +no +no +no +no +no + + +convfd +yes +no +no +no +no +no + + +convdf +yes +no +no +no +no +no + + + +
diff --git a/doc/tmpl/misc.sgml b/doc/tmpl/misc.sgml new file mode 100644 index 0000000..e77b880 --- /dev/null +++ b/doc/tmpl/misc.sgml @@ -0,0 +1,242 @@ + +misc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@p: +@user: +@insn: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@struct_type: +@member: + + + + + + + +@ORC_VAR_TYPE_TEMP: +@ORC_VAR_TYPE_SRC: +@ORC_VAR_TYPE_DEST: +@ORC_VAR_TYPE_CONST: +@ORC_VAR_TYPE_PARAM: +@ORC_VAR_TYPE_ACCUMULATOR: + + + + + + +@void: + + + + + + + +@void: + + + + + + + +@void: + + + + + + + +@code: +@programs: +@Returns: + + + + + + + +@x: + + + + + + + +@a: +@b: + + + + + + + +@a: +@b: + + + + + + + +@cpuinfo: +@tag: +@Returns: + + + + + + + +@file: +@Returns: + + + + + + + +@file: +@value: +@Returns: + + + + + + + +@s: +@tag: +@Returns: + + + + + + + +@s: +@delimiter: +@Returns: + + diff --git a/doc/tmpl/mmx.sgml b/doc/tmpl/mmx.sgml new file mode 100644 index 0000000..31845b3 --- /dev/null +++ b/doc/tmpl/mmx.sgml @@ -0,0 +1,187 @@ + +mmx + + + + + + + + + + + + + + + + + + + + + + +@a: +@b: +@c: +@d: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@modrm_code: +@shift: +@reg: + + + + + + + +@Returns: + + + + + + + + + diff --git a/doc/tmpl/orc-unused.sgml b/doc/tmpl/orc-unused.sgml new file mode 100644 index 0000000..82e1b0b --- /dev/null +++ b/doc/tmpl/orc-unused.sgml @@ -0,0 +1,791 @@ + + + + + + + + + + + + + + + + + + + + + +mmx + + + + + + + + + + + + + + + + + + + + + + + +sse + + + + + + + + + + + + + + + + + + + + + + + +x86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@var: +@is_indirect: +@is_indexed: +@index_var: +@index_scale: + + + + + + +@name: +@n_src: +@n_dest: +@dest_size: +@src_size: +@rules: +@emulate: +@emulate_user: + + + + + + +@var: +@is_data: +@is_chained: +@chained_reg: +@merge: + + + + + + +@name: +@size: + + + + + + +@p: +@reg: +@value: + + + + + + +@compiler: +@cond: +@opcode: +@dest: +@src1: +@src2: + + + + + + +@compiler: +@dest: +@imm: + + + + + + +@compiler: + + + + + + +@compiler: +@Returns: + + + + + + +@program: + + + + + + +@p: + + + + + + +@p: + + + + + + +@p: + + + + + + +@program: + + + + + + +@program: + + + + + + +@program: +@Returns: + + + + + + +@program: +@is_data: +@Returns: + + + + + + +@p: + + + + + + +@program: + + + + + + +@program: +@is_data: +@Returns: + + + + + + +@p: + + + + + + + + + + + + +@program: + + + + + + +@name: +@Returns: + + + + + + +@name: +@size: + + + + + + +@var: +@Returns: + + + + + + + + + + + + +@compiler: + + + + + + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + +@compiler: +@size: +@offset: +@reg: + + + + + + +@compiler: + + + + + + +@compiler: +@label: + + + + + + +@compiler: +@label: + + + + + + +@compiler: +@label: + + + + + + +@compiler: +@reg1: +@offset: +@reg2: + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@value: +@reg1: + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: +@is_aligned: + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: +@aligned: +@uncached: + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + +@compiler: +@size: +@reg: + + + + + + +@compiler: +@size: +@reg: + + + + + + +@compiler: + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + + + + + + +@i: +@Returns: + + + + + + +@i: +@Returns: + + + + + + +@i: +@Returns: + + + + + + +@i: +@Returns: + + + + + + +@compiler: +@i: +@Returns: + + + + + + +@i: +@Returns: + + + + + + +@i: +@Returns: + + + + + + +@compiler: + diff --git a/doc/tmpl/orc.sgml b/doc/tmpl/orc.sgml new file mode 100644 index 0000000..4ae39e9 --- /dev/null +++ b/doc/tmpl/orc.sgml @@ -0,0 +1,30 @@ + +orc + + + + + + + + + + + + + + + + + + + + + + + + + +@void: + + diff --git a/doc/tmpl/orcarm.sgml b/doc/tmpl/orcarm.sgml new file mode 100644 index 0000000..baf3503 --- /dev/null +++ b/doc/tmpl/orcarm.sgml @@ -0,0 +1,256 @@ + +orcarm + + + + + + + + + + + + + + + + + + + + + + + + + +@ORC_ARM_COND_EQ: +@ORC_ARM_COND_NE: +@ORC_ARM_COND_CS: +@ORC_ARM_COND_CC: +@ORC_ARM_COND_MI: +@ORC_ARM_COND_PL: +@ORC_ARM_COND_VS: +@ORC_ARM_COND_VC: +@ORC_ARM_COND_HI: +@ORC_ARM_COND_LS: +@ORC_ARM_COND_GE: +@ORC_ARM_COND_LT: +@ORC_ARM_COND_GT: +@ORC_ARM_COND_LE: +@ORC_ARM_COND_AL: + + + + + + +@ORC_ARM_DP_AND: +@ORC_ARM_DP_EOR: +@ORC_ARM_DP_SUB: +@ORC_ARM_DP_RSB: +@ORC_ARM_DP_ADD: +@ORC_ARM_DP_ADC: +@ORC_ARM_DP_SBC: +@ORC_ARM_DP_RSC: +@ORC_ARM_DP_TST: +@ORC_ARM_DP_TEQ: +@ORC_ARM_DP_CMP: +@ORC_ARM_DP_CMN: +@ORC_ARM_DP_ORR: +@ORC_ARM_DP_MOV: +@ORC_ARM_DP_BIC: +@ORC_ARM_DP_MVN: + + + + + + +@ORC_ARM_A1: +@ORC_ARM_A2: +@ORC_ARM_A3: +@ORC_ARM_A4: +@ORC_ARM_V1: +@ORC_ARM_V2: +@ORC_ARM_V3: +@ORC_ARM_V4: +@ORC_ARM_V5: +@ORC_ARM_V6: +@ORC_ARM_V7: +@ORC_ARM_V8: +@ORC_ARM_IP: +@ORC_ARM_SP: +@ORC_ARM_LR: +@ORC_ARM_PC: + + + + + + +@compiler: + + + + + + + +@compiler: +@insn: + + + + + + + +@compiler: +@dest: +@src1: +@src2: + + + + + + + +@compiler: +@dest: +@src1: +@value: + + + + + + + +@compiler: +@cond: +@label: + + + + + + + +@compiler: + + + + + + + +@compiler: +@src1: +@value: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@dest: +@src1: +@offset: + + + + + + + +@compiler: +@dest: +@src: + + + + + + + +@compiler: +@regs: + + + + + + + +@compiler: +@regs: + + + + + + + +@compiler: +@dest: +@src1: +@src2: + + + + + + + +@compiler: +@dest: +@src1: +@value: +@record: + + + + + + + +@compiler: +@dest: +@src1: +@offset: + + + + + + + +@reg: +@Returns: + + + + + + + +@compiler: +@dest: +@offset: +@src1: + + diff --git a/doc/tmpl/orccompiler.sgml b/doc/tmpl/orccompiler.sgml new file mode 100644 index 0000000..df87b4b --- /dev/null +++ b/doc/tmpl/orccompiler.sgml @@ -0,0 +1,105 @@ + +orccompiler + + + + + + + + + + + + + + + + + + + + + + + + + +@ORC_COMPILE_RESULT_OK: +@ORC_COMPILE_RESULT_UNKNOWN_COMPILE: +@ORC_COMPILE_RESULT_MISSING_RULE: +@ORC_COMPILE_RESULT_UNKNOWN_PARSE: +@ORC_COMPILE_RESULT_PARSE: +@ORC_COMPILE_RESULT_VARIABLE: + + + + + + + + + + + + + + + + + + +@compiler: +@...: + + + + + + + +@x: + + + + + + + +@x: + + + + + + + +@compiler: +@...: + + + + + + + + + + + + + + +@p: +@fmt: + + + + + + + +@compiler: +@Returns: + + diff --git a/doc/tmpl/orcdebug.sgml b/doc/tmpl/orcdebug.sgml new file mode 100644 index 0000000..8f7904a --- /dev/null +++ b/doc/tmpl/orcdebug.sgml @@ -0,0 +1,141 @@ + +orcdebug + + + + + + + + + + + + + + + + + + + + + + + + + +@ORC_DEBUG_NONE: +@ORC_DEBUG_ERROR: +@ORC_DEBUG_WARNING: +@ORC_DEBUG_INFO: +@ORC_DEBUG_DEBUG: +@ORC_DEBUG_LOG: + + + + + + +@level: +@file: +@func: +@line: +@format: +@varargs: + + + + + + + +@level: +@...: + + + + + + + +@...: + + + + + + + +@...: + + + + + + + +@...: + + + + + + + +@...: + + + + + + + +@...: + + + + + + + + + + + + + + +@void: +@Returns: + + + + + + + +@level: +@file: +@func: +@line: +@format: +@Varargs: + + + + + + + +@level: + + + + + + + +@func: + + diff --git a/doc/tmpl/orcexecutor.sgml b/doc/tmpl/orcexecutor.sgml new file mode 100644 index 0000000..1503366 --- /dev/null +++ b/doc/tmpl/orcexecutor.sgml @@ -0,0 +1,139 @@ + +orcexecutor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@program: +@Returns: + + + + + + + +@ex: + + + + + + + +@ex: +@var: +@ptr: + + + + + + + +@ex: +@name: +@ptr: + + + + + + + +@ex: +@n: + + + + + + + +@ex: + + + + + + + +@ex: + + + + + + + +@ex: +@var: +@Returns: + + + + + + + +@ex: +@name: +@Returns: + + + + + + + +@ex: +@var: +@value: + + + + + + + +@ex: +@name: +@value: + + + + + + + +@ex: +@program: + + diff --git a/doc/tmpl/orcmmx.sgml b/doc/tmpl/orcmmx.sgml new file mode 100644 index 0000000..aba95a0 --- /dev/null +++ b/doc/tmpl/orcmmx.sgml @@ -0,0 +1,222 @@ + +orcmmx + + + + + + + + + + + + + + + + + + + + + + + + + +@X86_MM0: +@X86_MM1: +@X86_MM2: +@X86_MM3: +@X86_MM4: +@X86_MM5: +@X86_MM6: +@X86_MM7: + + + + + + +@ORC_TARGET_MMX_MMX: +@ORC_TARGET_MMX_MMXEXT: +@ORC_TARGET_MMX_3DNOW: +@ORC_TARGET_MMX_3DNOWEXT: +@ORC_TARGET_MMX_SSSE3: +@ORC_TARGET_MMX_SSE4_1: +@ORC_TARGET_MMX_SSE4_2: +@ORC_TARGET_MMX_FRAME_POINTER: +@ORC_TARGET_MMX_SHORT_JUMPS: +@ORC_TARGET_MMX_64BIT: + + + + + + +@a: +@b: +@c: +@d: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@modrm_code: +@shift: +@reg: + + + + + + + +@void: +@Returns: + + + + + + + +@void: + + diff --git a/doc/tmpl/orcopcode.sgml b/doc/tmpl/orcopcode.sgml new file mode 100644 index 0000000..66b0245 --- /dev/null +++ b/doc/tmpl/orcopcode.sgml @@ -0,0 +1,229 @@ + +orcopcode + + + + + + + + + + + + + + + + + + + + + + + + + +@ex: +@user: + + + + + + + + + + + + + + + + + + + + + + + + + +@name: +@flags: +@dest_size: +@src_size: +@emulateN: + + + + + + +@name: +@executable: +@data_register_offset: +@get_default_flags: +@compiler_init: +@compile: +@rule_sets: +@n_rule_sets: +@get_asm_preamble: +@load_constant: +@get_flag_name: +@flush_cache: +@load_constant_long: +@_unused: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@name: +@Returns: + + + + + + + +@void: + + + + + + + +@sopcode: +@prefix: +@Returns: + + + + + + + +@opcode_set: +@name: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@opcode_set: +@target: +@required_flags: +@Returns: + + + + + + + +@target: +@Returns: + + + + + + + +@target_name: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@target: +@Returns: + + + + + + + +@target: +@Returns: + + + + + + + +@target: +@opcode: +@target_flags: +@Returns: + + + + + + + +@target: + + diff --git a/doc/tmpl/orcpowerpc.sgml b/doc/tmpl/orcpowerpc.sgml new file mode 100644 index 0000000..aa433ee --- /dev/null +++ b/doc/tmpl/orcpowerpc.sgml @@ -0,0 +1,232 @@ + +orcpowerpc + + + + + + + + + + + + + + + + + + + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@compiler: +@type: +@ptr: +@label: + + + + + + + +@compiler: + + + + + + + +@compiler: +@insn: + + + + + + + +@compiler: +@major: +@d: +@a: +@b: +@minor: + + + + + + + +@compiler: +@name: +@insn: +@d: +@a: +@b: +@c: + + + + + + + +@compiler: +@insn: +@d: +@a: +@b: + + + + + + + +@p: +@name: +@insn: +@d: +@a: +@b: + + + + + + + +@compiler: +@insn: +@d: +@a: +@b: + + + + + + + +@compiler: +@regd: +@rega: +@imm: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@regd: +@rega: +@imm: + + + + + + + +@compiler: + + + + + + + +@compiler: +@regd: +@rega: +@shift: +@record: + + + + + + + +@compiler: +@regs: +@rega: +@offset: + + + + + + + +@p: +@type: +@value: +@Returns: + + diff --git a/doc/tmpl/orcprogram.sgml b/doc/tmpl/orcprogram.sgml new file mode 100644 index 0000000..ae1d06c --- /dev/null +++ b/doc/tmpl/orcprogram.sgml @@ -0,0 +1,318 @@ + +orcprogram + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@program: +@...: + + + + + + + +@void: +@Returns: + + + + + + + +@size1: +@size2: +@size3: +@Returns: + + + + + + + +@size1: +@size2: +@Returns: + + + + + + + +@size1: +@size2: +@size3: +@Returns: + + + + + + + +@size1: +@size2: +@Returns: + + + + + + + +@program: + + + + + + + +@program: +@Returns: + + + + + + + +@program: +@name: + + + + + + + +@program: +@size: +@name: +@Returns: + + + + + + + +@program: +@size: +@name: +@Returns: + + + + + + + +@program: +@size: +@name: +@Returns: + + + + + + + +@program: +@size: +@value: +@name: +@Returns: + + + + + + + +@program: +@size: +@name: +@Returns: + + + + + + + +@program: +@size: +@name: +@Returns: + + + + + + + +@p: +@opcode: +@arg0: +@arg1: +@arg2: + + + + + + + +@p: +@opcode: +@arg0: +@arg1: +@arg2: + + + + + + + +@program: +@opcode: +@arg0: +@arg1: + + + + + + + +@p: +@opcode: +@arg0: +@arg1: + + + + + + + +@p: +@Returns: + + + + + + + +@p: +@target: +@Returns: + + + + + + + +@p: +@target: +@flags: +@Returns: + + + + + + + +@program: +@Returns: + + + + + + + +@program: +@name: +@Returns: + + + + + + + +@program: +@is_data: +@Returns: + + + + + + + +@program: +@i: +@j: +@Returns: + + diff --git a/doc/tmpl/orcrule.sgml b/doc/tmpl/orcrule.sgml new file mode 100644 index 0000000..2f9332d --- /dev/null +++ b/doc/tmpl/orcrule.sgml @@ -0,0 +1,33 @@ + +orcrule + + + + + + + + + + + + + + + + + + + + + + + + + +@rule_set: +@opcode_name: +@emit: +@emit_user: + + diff --git a/doc/tmpl/orcsse.sgml b/doc/tmpl/orcsse.sgml new file mode 100644 index 0000000..e5ffefe --- /dev/null +++ b/doc/tmpl/orcsse.sgml @@ -0,0 +1,241 @@ + +orcsse + + + + + + + + + + + + + + + + + + + + + + + + + +@X86_XMM0: +@X86_XMM1: +@X86_XMM2: +@X86_XMM3: +@X86_XMM4: +@X86_XMM5: +@X86_XMM6: +@X86_XMM7: +@X86_XMM8: +@X86_XMM9: +@X86_XMM10: +@X86_XMM11: +@X86_XMM12: +@X86_XMM13: +@X86_XMM14: +@X86_XMM15: + + + + + + +@ORC_TARGET_SSE_SSE2: +@ORC_TARGET_SSE_SSE3: +@ORC_TARGET_SSE_SSSE3: +@ORC_TARGET_SSE_SSE4_1: +@ORC_TARGET_SSE_SSE4_2: +@ORC_TARGET_SSE_SSE4A: +@ORC_TARGET_SSE_SSE5: +@ORC_TARGET_SSE_FRAME_POINTER: +@ORC_TARGET_SSE_SHORT_JUMPS: +@ORC_TARGET_SSE_64BIT: + + + + + + +@a: +@b: +@c: +@d: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@modrm_code: +@shift: +@reg: + + + + + + + +@void: +@Returns: + + + + + + + +@void: + + diff --git a/doc/tmpl/orcutils.sgml b/doc/tmpl/orcutils.sgml new file mode 100644 index 0000000..59272cc --- /dev/null +++ b/doc/tmpl/orcutils.sgml @@ -0,0 +1,117 @@ + +orcutils + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@test: + + + + + + + + + + + + + + +@x: +@a: +@b: + + + + + + + + + + + + + + + + + + + + + +@maj: +@min: + + + + + + + +@a: +@b: + + + + + + + + + + + + + + +@x: + + + + + + + +@ptr: + + + + + + + +@ptr: +@val: + + diff --git a/doc/tmpl/orcx86.sgml b/doc/tmpl/orcx86.sgml new file mode 100644 index 0000000..41597b7 --- /dev/null +++ b/doc/tmpl/orcx86.sgml @@ -0,0 +1,531 @@ + +orcx86 + + + + + + + + + + + + + + + + + + + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@value: +@reg: +@record: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@offset: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@reg1: +@offset: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@value: +@reg1: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: +@is_aligned: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: +@is_aligned: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: +@aligned: +@uncached: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: +@aligned: +@uncached: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: +@reg3: + + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + + +@compiler: +@size: +@offset: +@reg: +@destreg: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@compiler: +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@compiler: + + diff --git a/doc/tmpl/sse.sgml b/doc/tmpl/sse.sgml new file mode 100644 index 0000000..a2b40cc --- /dev/null +++ b/doc/tmpl/sse.sgml @@ -0,0 +1,198 @@ + +sse + + + + + + + + + + + + + + + + + + + + + + +@a: +@b: +@c: +@d: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@src: +@dest: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@reg: +@value: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@shuf: +@src: +@dest: + + + + + + + +@p: +@insn_name: +@code: +@modrm_code: +@shift: +@reg: + + + + + + + +@Returns: + + + + + + + + + diff --git a/doc/tmpl/x86.sgml b/doc/tmpl/x86.sgml new file mode 100644 index 0000000..8a275d3 --- /dev/null +++ b/doc/tmpl/x86.sgml @@ -0,0 +1,519 @@ + +x86 + + + + + + + + + + + + + + + + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + + +@compiler: +@size: +@value: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg: + + + + + + + +@compiler: +@size: +@offset: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@label: + + + + + + + +@compiler: +@reg1: +@offset: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@value: +@reg1: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: +@is_aligned: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@offset: +@reg1: +@reg2: +@is_aligned: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: +@aligned: +@uncached: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@offset: +@reg2: +@aligned: +@uncached: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@reg: + + + + + + + +@compiler: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: +@reg3: + + + + + + + +@compiler: +@size: +@value: +@reg: + + + + + + + +@compiler: +@size: +@offset: +@reg: +@destreg: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@compiler: +@size: +@reg1: +@reg2: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@compiler: +@i: +@Returns: + + + + + + + +@i: +@Returns: + + + + + + + +@i: +@Returns: + + diff --git a/doc/tutorial.xml b/doc/tutorial.xml new file mode 100644 index 0000000..c8b8a62 --- /dev/null +++ b/doc/tutorial.xml @@ -0,0 +1,510 @@ + + +%version-entities; + +]> + + +Orc Tutorial +3 +Orc + + + +Orc Tutorial + +Getting started writing Orc code. + + + + +Orc Tutorial + + + This section walks you through several examples of increasing + complexity to get you started working with Orc. Each of these + examples are available in the Orc source code, in the examples + directory. The first three examples use static Orc code that + is in a source file, and is compiled into intermediate C code + by the orcc tool. + + + + The first example demonstrates how to add two arrays of 16-bit + signed integers together. A possible use case for this is + combining two stereo audio streams together. + + + + The second example builds from the first, replacing one of the + stereo input streams with a mono stream, converting it to stereo + in the process, and also adjusting the volume of the stream. + + + + The third example shows how to convert a planar 4:2:0 video + image into a packed 4:4:4 video image with an alpha channel. + + + + + +Example 1 + + + This example demonstrates combining two stereo audio streams + by adding. Uncompressed audio streams (i.e., PCM format) can + be in a variety of formats, but one of the most common is + interleaved signed 16-bit integers, and we will choose that + for the purposes of this example. Extending to other formats + is left as an exercise for the reader. Interleaved means that + left and right channel samples are consecutive: in memory, the + data look like LRLRLR... The sampling rate is unimportant, as + long as both streams are the same. + + + + One important feature/limitation of signed 16-bit audio samples + is that adding two together could cause an overflow. For example, + adding the value 25000 to 10000 gives 35000, but this overflows + 16 bits, so a standard addition would instead give the value + -30536 (35000-65536). Overflows handled this way sound like + crackling or worse, so we would like a better solution. One + solution is to use saturating addition: in this case, the addition + of 25000 and 10000 would be limited by the upper end of signed + 16-bit values to give 32767. Although this still causes + distortion in the output signal, it is much less audible and + annoying. + + + + In normal C code, 16-bit saturating addition is difficult to express + without using 32-bit intermediates. In Orc, saturating addition + is a basic operation with opcodes for each size, both signed and + unsigned. In this case, we want "addssw", for "add signed saturated + word". + + + + Also, we're going to make a one simplification: Adding two + interleaved stereo streams is the same as adding two mono streams + with twice as many samples. So we'll use 2*n_samples in the calling + code. + + + + To the code: + + +.function audio_add_s16 +.dest 2 d1 +.source 2 s1 +.source 2 s2 + +addssw d1, s1, s2 + + + + + Line by line: + + +.function audio_add_s16 + + + This starts a function. A function (represented internally by the + object OrcProgram) is equivalent to a C function. When you generate + C code from this Orc exmaple using the orcc tool, it generates a C + stub function called "audio_add_s16()", which at runtime will + generate an OrcProgram object corresponding to the above code, + compile it, and then run it. + + +.dest 2 d1 short + + + This specifies that you want a destination (output) array named "d1", + with the element size being 2. Orc does not differentiate between + signed and unsigned arrays (or even floating point), however, you + may optionally specify a type afterwards that will be used in any + autogenerated C code. + + +.source 2 s1 short +.source 2 s2 short + + + This specifies that you want two source (input) arrays, "s1" and "s2", + similar to the destination array. + + +addssw d1, s1, s2 + + + This specifies the (only) opcode that we want for this program: signed + saturated addition of each member of the two source arrays, and store + the result in the destination array. + + + + A few notes about the above program: The loop over the array members + is implied. Everything that Orc does is based on looping over each + array element and executing the opcodes in a program. + + + + When you generate C code from the above Orc code using + 'orcc --implementation example1.orc', + you get a bunch of boilerplate code, plus three C functions: + + +/* audio_add_s16 */ +#ifdef DISABLE_ORC +void +audio_add_s16 (int16 * d1, const int16 * s1, const int16 * s2, int n) +{ + ... +} + + + This function is used if DISABLE_ORC is defined. As one might guess, + if you define DISABLE_ORC, no runtime Orc features are used, and all + calls to audio_add_s16() use this function. The interior of the function + is a for() loop that implements the Orc function. The generated code + may not necessarily be easy to read, but it is straightforward: all + the verbosity and use of unions is to avoid compiler warnings without + making the compiler too complex. But this is the place to go if you + are trying to understand what Orc is doing. + + +#else +static void +_backup_audio_add_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + ... +} + + + This function is used when runtime Orc is enabled, but Orc was unable + to generate code for the function at runtime. There are various + reasons why that might happen -- unimplemented rules for a target, or + more temporary variables used than available registers. + + +void +audio_add_s16 (short * d1, const short * s1, const short * s2, int n) +{ + ... +} + + + The third generated function is the important part: It is used when + Orc is enabled at runtime, and creates the OrcProgram corresponding + to the function you defined. Then it compiles the function and + calls it. + + + + After generating the C code, you should generate the header file, + using: 'orcc --header example1orc.orc -o example1orc.h'. + After similar boilerplate code, there is the expected declaration + of audio_add_s16(): + + +void audio_add_s16 (short * d1, const short * s1, const short * s2, int n); + + + + + + + Some C code to generate sample data, call the generated code, and + print out the results: + + +#include <stdio.h> +#include "example1orc.h" + +#define N 10 + +short a[N]; +short b[N]; +short c[N]; + +int +main (int argc, char *argv[]) +{ + int i; + + /* Create some data in the source arrays */ + for(i=0;i < N;i++){ + a[i] = 100*i; + b[i] = 32000; + } + + /* Call a function that uses Orc */ + audio_add_s16 (c, a, b, N); + + /* Print the results */ + for(i=0;i < N;i++){ + printf("%d: %d %d -> %d\n", i, a[i], b[i], c[i]); + } + + return 0; +} + + + + + The output of the program: + + +0: 0 32000 -> 32000 +1: 100 32000 -> 32100 +2: 200 32000 -> 32200 +3: 300 32000 -> 32300 +4: 400 32000 -> 32400 +5: 500 32000 -> 32500 +6: 600 32000 -> 32600 +7: 700 32000 -> 32700 +8: 800 32000 -> 32767 +9: 900 32000 -> 32767 + + + + + + + + + + +Example 2 + + + In this example, we will expand on the previous example by making + one of the input arrays a mono stream, and also scale the mono + input stream by a volume. Rather than iterating over each + signed 16-bit value, in this example we will iterate over samples, + meaning the member size for the stereo arrays is 4, since each + array member contains a left and right 16 bit value. + + + + +.function audio_add_mono_to_stereo_scaled_s16 +.dest 4 d1 short +.source 4 s1 short +.source 2 s2 short +.param 2 volume +.temp 4 s2_scaled +.temp 2 t +.temp 4 s2_stereo + +mulswl s2_scaled, s2, volume +shrsl s2_scaled, s2_scaled, 12 +convssslw t, s2_scaled +mergewl s2_stereo, t, t +x2 addssw d1, s1, s2_stereo + + + Piece by piece: + + +.function audio_add_mono_to_stereo_scaled_s16 +.dest 4 d1 short +.source 4 s1 short +.source 2 s2 short + + + This is the same as the previous example, except that the stereo + arrays are increased in size to 4. However, we'll use the short + type, since Orc does not care what type we use, and short is + the type of the array we want to use in the C code. + + +.param 2 volume + + + This specifies a parameter, which is an integer that is passed to + an Orc function. In the generated C code, parameters are always of + type int. There are also float parameters for the floating point + equivalent. + + +.temp 4 s2_scaled +.temp 2 t +.temp 4 s2_stereo + + + This specifies a few temporary variables that are used later in the + code. These definitions are similar to defining local variables in + C code. Note that the size is important: each opcode has + specific sizes for source and destination operands, and it is + important to match these correctly with temporary variables. + + +mulswl s2_scaled, s2, volume +shrsl s2_scaled, s2_scaled, 12 + + + This scales the mono input: signed multiply of s2 and volume, giving + a 32-bit value, and then a signed right shift by 12. Since the + second operand of mulswl is 16-bit, only the lower 16 bits of + volume will be used in the multiply. The right shift is + effectively the same as dividing by 4096. Thus, a neutral scaling + that does not increase or decrease the mono input would correspond + to calling the function with a parameter value of 4096. + + +convssslw t, s2_scaled +mergewl s2_stereo, t, t + + + The first instruction is "convert saturated signed 32-bit to signed + 16-bit", and the second merges the two values of (16 bit) t into the + high and low halves of s2_stereo. This duplicates the mono signal + into the right and left channels. It is important to use the + saturated conversion, since the effective scaling value may have + been greater than 1.0, thus the larger values may need to be clipped. + + +x2 addssw d1, s1, s2_stereo + + + The "x2" prefix indicates that we want the operation specified to be + done twice, first to the upper half of all operands, and again + separately to the lower half of all operands. Since addssw is + normally a 16-bit operation, the x2 prefix causes it to be a 32-bit + operation. And so, it adds the newly created right and left values + of the scaled mono signal into the s1 signal. + + + + There are several variations of the above program that might be + more suitable for a particular application. This function only + handles a limited dynamic range of volume scaling factors, however, + by changing the shift constant, or turning the shift into a + parameter, the dynamic range can be increased significantly. + + + + + + +Example 3 + + + The third example shows how to convert a planar 4:2:0 video + image into a packed 4:4:4 video image with an alpha channel. The + first format is often referred to as I420 and the second as AYUV. + + + + For simplicity in the following discussion, we'll assume that the + image dimensions are 640x480. The 4:2:0 subsampling means the + input chroma planes are 320x240 (subsampled by 2 in each direction). + These need to be upsampled to 640x480, then repacked with the input + Y plane, with an added dummy alpha value. There are many ways to + perform upsampling; the simplest is to duplicate each value + horizontally and vertically. The result is low quality, but + adequate for demonstration purposes. + + + + There are several choices for the Orc array size and dimensionality. + Iterating vertically can be done in the C code or in the Orc code. If + done in the Orc code, we would need to use an array size of 240 and + have two separate arrays for the even and odd Y rows. If done in the + C code, there is no such limitation. Horizontally, the story is + different: we can use the loadupsdb opcode to duplicate each byte in + the U and V arrays, so we can iterate over 640 array elements. It + is also possible to iterate over 320 elements and duplicate the U + and V elements using mergebw. There is a very slight speed + advantage to iterating vertically in Orc, and for demonstration + purposes, we will choose to use the loadupsdb opcode, thus we will + be iterating over 320x240 elements. + + + + The code: + + +.function convert_I420_AYUV +.flags 2d +.dest 4 d1 +.dest 4 d2 +.source 1 y1 +.source 1 y2 +.source 1 u +.source 1 v +.const 1 c255 255 +.temp 2 uv +.temp 2 ay +.temp 1 tu +.temp 1 tv + +loadupdb tu, u +loadupdb tv, v +mergebw uv, tu, tv +mergebw ay, c255, y1 +mergewl d1, ay, uv +mergebw ay, c255, y2 +mergewl d2, ay, uv + + + A few things of note: The ".flags 2d" line is used to indicate that + Orc should iterate over two dimensions, and generate a prototype that + includes row strides for each array and a size parameter for the + second dimension. + + + + Since we are working on two input Y lines and two output AYUV lines + at a time, we need two source and destination arrays corresponding + to the even and odd lines. The row strides for these are doubled + compared to the normal 2-D array. + + + + The mergebw and mergewl opcodes join two 8-bit values into one 16-bit + value (or 16-bit values into a 32-bit value) by concatinating them + in memory order. Thus, to get AYUV in memory order, we merge AY and + UV, and to get UV, we merge U and V. Since we're duplicating each + U and V line, we use the same UV value for the even and odd output + lines. + + + + The prototype that is generated is: + + +void convert_I420_AYUV (orc_uint32 * d1, int d1_stride, orc_uint32 * d2, + int d2_stride, const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, + int s2_stride, const orc_uint8 * s3, int s3_stride, const orc_uint8 * s4, + int s4_stride, int n, int m); + + + The orcc tool unhelpfully changed the names of the parameters, + however, the order is standard: first destinations, then sources, then + parameters, then array sizes. Think of it like memcpy() or memset(). + + + + Calling the function: + + +convert_I420_AYUV (output, 1280*4, output + 640, 1280 * 4, + input_y, 1280, input_y + 640, 1280, + input_u, 320, input_v, 320, + 320, 240); + + + + + + + + diff --git a/doc/version.entities.in b/doc/version.entities.in new file mode 100644 index 0000000..c65557d --- /dev/null +++ b/doc/version.entities.in @@ -0,0 +1,2 @@ + + diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..a279d77 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,61 @@ + +noinst_PROGRAMS = +if CROSS_COMPILING +else +noinst_PROGRAMS += example1 example2 example3 mt19937ar + +BUILT_SOURCES = example1orc.c example1orc.h \ + example2orc.c example2orc.h \ + example3orc.c example3orc.h \ + mt19937arorc.c mt19937arorc.h +endif + +if ENABLE_BACKEND_MMX +noinst_PROGRAMS += volscale +endif + +AM_LDFLAGS = $(ORC_LIBS) +AM_CFLAGS = $(ORC_CFLAGS) + +EXTRA_DIST = example1orc.orc example2orc.orc example3orc.orc mt19937arorc.orc + +CLEANFILES = example1orc.c example1orc.h \ + example2orc.c example2orc.h \ + example3orc.c example3orc.h \ + mt19937arorc.c mt19937arorc.h + +example1_SOURCES = example1.c +nodist_example1_SOURCES = example1orc.c example1orc.h +example2_SOURCES = example2.c +nodist_example2_SOURCES = example2orc.c example2orc.h +example3_SOURCES = example3.c +nodist_example3_SOURCES = example3orc.c example3orc.h +mt19937ar_SOURCES = mt19937ar.c +nodist_mt19937ar_SOURCES = mt19937arorc.c mt19937arorc.h + + +example1orc.c: $(srcdir)/example1orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example1orc.c $(srcdir)/example1orc.orc + +example1orc.h: $(srcdir)/example1orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example1orc.h $(srcdir)/example1orc.orc + +example2orc.c: $(srcdir)/example2orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example2orc.c $(srcdir)/example2orc.orc + +example2orc.h: $(srcdir)/example2orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example2orc.h $(srcdir)/example2orc.orc + +example3orc.c: $(srcdir)/example3orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example3orc.c $(srcdir)/example3orc.orc + +example3orc.h: $(srcdir)/example3orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example3orc.h $(srcdir)/example3orc.orc + +mt19937arorc.c: $(srcdir)/mt19937arorc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o mt19937arorc.c $(srcdir)/mt19937arorc.orc + +mt19937arorc.h: $(srcdir)/mt19937arorc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o mt19937arorc.h $(srcdir)/mt19937arorc.orc + + diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..90727f1 --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,587 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +@CROSS_COMPILING_FALSE@am__append_1 = example1 example2 example3 mt19937ar +@ENABLE_BACKEND_MMX_TRUE@am__append_2 = volscale +subdir = examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@CROSS_COMPILING_FALSE@am__EXEEXT_1 = example1$(EXEEXT) \ +@CROSS_COMPILING_FALSE@ example2$(EXEEXT) example3$(EXEEXT) \ +@CROSS_COMPILING_FALSE@ mt19937ar$(EXEEXT) +@ENABLE_BACKEND_MMX_TRUE@am__EXEEXT_2 = volscale$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_example1_OBJECTS = example1.$(OBJEXT) +nodist_example1_OBJECTS = example1orc.$(OBJEXT) +example1_OBJECTS = $(am_example1_OBJECTS) $(nodist_example1_OBJECTS) +example1_LDADD = $(LDADD) +am_example2_OBJECTS = example2.$(OBJEXT) +nodist_example2_OBJECTS = example2orc.$(OBJEXT) +example2_OBJECTS = $(am_example2_OBJECTS) $(nodist_example2_OBJECTS) +example2_LDADD = $(LDADD) +am_example3_OBJECTS = example3.$(OBJEXT) +nodist_example3_OBJECTS = example3orc.$(OBJEXT) +example3_OBJECTS = $(am_example3_OBJECTS) $(nodist_example3_OBJECTS) +example3_LDADD = $(LDADD) +am_mt19937ar_OBJECTS = mt19937ar.$(OBJEXT) +nodist_mt19937ar_OBJECTS = mt19937arorc.$(OBJEXT) +mt19937ar_OBJECTS = $(am_mt19937ar_OBJECTS) \ + $(nodist_mt19937ar_OBJECTS) +mt19937ar_LDADD = $(LDADD) +volscale_SOURCES = volscale.c +volscale_OBJECTS = volscale.$(OBJEXT) +volscale_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(example1_SOURCES) $(nodist_example1_SOURCES) \ + $(example2_SOURCES) $(nodist_example2_SOURCES) \ + $(example3_SOURCES) $(nodist_example3_SOURCES) \ + $(mt19937ar_SOURCES) $(nodist_mt19937ar_SOURCES) volscale.c +DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \ + $(example3_SOURCES) $(mt19937ar_SOURCES) volscale.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@CROSS_COMPILING_FALSE@BUILT_SOURCES = example1orc.c example1orc.h \ +@CROSS_COMPILING_FALSE@ example2orc.c example2orc.h \ +@CROSS_COMPILING_FALSE@ example3orc.c example3orc.h \ +@CROSS_COMPILING_FALSE@ mt19937arorc.c mt19937arorc.h + +AM_LDFLAGS = $(ORC_LIBS) +AM_CFLAGS = $(ORC_CFLAGS) +EXTRA_DIST = example1orc.orc example2orc.orc example3orc.orc mt19937arorc.orc +CLEANFILES = example1orc.c example1orc.h \ + example2orc.c example2orc.h \ + example3orc.c example3orc.h \ + mt19937arorc.c mt19937arorc.h + +example1_SOURCES = example1.c +nodist_example1_SOURCES = example1orc.c example1orc.h +example2_SOURCES = example2.c +nodist_example2_SOURCES = example2orc.c example2orc.h +example3_SOURCES = example3.c +nodist_example3_SOURCES = example3orc.c example3orc.h +mt19937ar_SOURCES = mt19937ar.c +nodist_mt19937ar_SOURCES = mt19937arorc.c mt19937arorc.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES) + @rm -f example1$(EXEEXT) + $(LINK) $(example1_OBJECTS) $(example1_LDADD) $(LIBS) +example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES) + @rm -f example2$(EXEEXT) + $(LINK) $(example2_OBJECTS) $(example2_LDADD) $(LIBS) +example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES) + @rm -f example3$(EXEEXT) + $(LINK) $(example3_OBJECTS) $(example3_LDADD) $(LIBS) +mt19937ar$(EXEEXT): $(mt19937ar_OBJECTS) $(mt19937ar_DEPENDENCIES) + @rm -f mt19937ar$(EXEEXT) + $(LINK) $(mt19937ar_OBJECTS) $(mt19937ar_LDADD) $(LIBS) +volscale$(EXEEXT): $(volscale_OBJECTS) $(volscale_DEPENDENCIES) + @rm -f volscale$(EXEEXT) + $(LINK) $(volscale_OBJECTS) $(volscale_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1orc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2orc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3orc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt19937ar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt19937arorc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volscale.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +example1orc.c: $(srcdir)/example1orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example1orc.c $(srcdir)/example1orc.orc + +example1orc.h: $(srcdir)/example1orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example1orc.h $(srcdir)/example1orc.orc + +example2orc.c: $(srcdir)/example2orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example2orc.c $(srcdir)/example2orc.orc + +example2orc.h: $(srcdir)/example2orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example2orc.h $(srcdir)/example2orc.orc + +example3orc.c: $(srcdir)/example3orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o example3orc.c $(srcdir)/example3orc.orc + +example3orc.h: $(srcdir)/example3orc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o example3orc.h $(srcdir)/example3orc.orc + +mt19937arorc.c: $(srcdir)/mt19937arorc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o mt19937arorc.c $(srcdir)/mt19937arorc.orc + +mt19937arorc.h: $(srcdir)/mt19937arorc.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o mt19937arorc.h $(srcdir)/mt19937arorc.orc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/example1.c b/examples/example1.c new file mode 100644 index 0000000..ee11c1f --- /dev/null +++ b/examples/example1.c @@ -0,0 +1,31 @@ +#include +#include "example1orc.h" + +#define N 10 + +short a[N]; +short b[N]; +short c[N]; + +int +main (int argc, char *argv[]) +{ + int i; + + /* Create some data in the source arrays */ + for(i=0;i %d\n", i, a[i], b[i], c[i]); + } + + return 0; +} + diff --git a/examples/example1orc.orc b/examples/example1orc.orc new file mode 100644 index 0000000..6430f70 --- /dev/null +++ b/examples/example1orc.orc @@ -0,0 +1,8 @@ + +.function audio_add_s16 +.dest 2 d1 short +.source 2 s1 short +.source 2 s2 short + +addssw d1, s1, s2 + diff --git a/examples/example2.c b/examples/example2.c new file mode 100644 index 0000000..c2d03e4 --- /dev/null +++ b/examples/example2.c @@ -0,0 +1,34 @@ +#include +#include "example2orc.h" + +#define N 10 + +short a[N*2]; +short b[N]; +short c[N*2]; + +int +main (int argc, char *argv[]) +{ + int i; + double volume = 0.5; + + /* Create some data in the source arrays */ + for(i=0;i %d,%d\n", i, a[2*i], a[2*i+1], b[i], + c[2*i], c[2*i+1]); + } + + return 0; +} + diff --git a/examples/example2orc.orc b/examples/example2orc.orc new file mode 100644 index 0000000..06a4de8 --- /dev/null +++ b/examples/example2orc.orc @@ -0,0 +1,16 @@ + +.function audio_add_mono_to_stereo_scaled_s16 +.dest 4 d1 short +.source 4 s1 short +.source 2 s2 short +.param 2 volume +.temp 4 s2_scaled +.temp 2 t +.temp 4 s2_stereo + +mulswl s2_scaled, s2, volume +shrsl s2_scaled, s2_scaled, 12 +convssslw t, s2_scaled +mergewl s2_stereo, t, t +x2 addssw d1, s1, s2_stereo + diff --git a/examples/example3.c b/examples/example3.c new file mode 100644 index 0000000..5b04b3f --- /dev/null +++ b/examples/example3.c @@ -0,0 +1,24 @@ +#include +#include "example3orc.h" + +#define N 10 + +unsigned char input_y[640*480]; +unsigned char input_u[320*240]; +unsigned char input_v[320*240]; + +unsigned int output[640*480]; + +int +main (int argc, char *argv[]) +{ + + /* Call a function that uses Orc */ + convert_I420_AYUV (output, 1280*4, output + 640, 1280 * 4, + input_y, 1280, input_y + 640, 1280, + input_u, 320, input_v, 320, + 320, 240); + + return 0; +} + diff --git a/examples/example3orc.orc b/examples/example3orc.orc new file mode 100644 index 0000000..2e06a50 --- /dev/null +++ b/examples/example3orc.orc @@ -0,0 +1,23 @@ + +.function convert_I420_AYUV +.flags 2d +.dest 4 d1 +.dest 4 d2 +.source 1 y1 +.source 1 y2 +.source 1 u +.source 1 v +.const 1 c255 255 +.temp 2 uv +.temp 2 ay +.temp 1 tu +.temp 1 tv + +loadupdb tu, u +loadupdb tv, v +mergebw uv, tu, tv +mergebw ay, c255, y1 +mergewl d1, ay, uv +mergebw ay, c255, y2 +mergewl d2, ay, uv + diff --git a/examples/mt19937ar.c b/examples/mt19937ar.c new file mode 100644 index 0000000..a9f736f --- /dev/null +++ b/examples/mt19937ar.c @@ -0,0 +1,315 @@ +/* + A C-program for MT19937, with initialization improved 2002/1/26. + Coded by Takuji Nishimura and Makoto Matsumoto. + + Before using, initialize the state by using init_genrand(seed) + or init_by_array(init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + Any feedback is very welcome. + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) +*/ + +#include +#include +#include +#include +#include "mt19937arorc.h" + +/* Period parameters */ +#define N 624 +#define M 397 +#define MATRIX_A 0x9908b0dfUL /* constant vector a */ +#define UPPER_MASK 0x80000000UL /* most significant w-r bits */ +#define LOWER_MASK 0x7fffffffUL /* least significant r bits */ + +static unsigned long mt[N]; /* the array for the state vector */ +static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ + +/* initializes mt[N] with a seed */ +void init_genrand(unsigned long s) +{ + mt[0]= s & 0xffffffffUL; + for (mti=1; mti> 30)) + mti); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array mt[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + mt[mti] &= 0xffffffffUL; + /* for >32 bit machines */ + } +} + +/* initialize by an array with array-length */ +/* init_key is the array for initializing keys */ +/* key_length is its length */ +/* slight change for C++, 2004/2/26 */ +void init_by_array(orc_uint32 init_key[], int key_length) +{ + int i, j, k; + init_genrand(19650218UL); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) + + init_key[j] + j; /* non linear */ + mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; j++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) + - i; /* non linear */ + mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + } + + mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ +} + +/* generates a random number on [0,0xffffffff]-interval */ +unsigned long genrand_int32(void) +{ + unsigned long y; + static unsigned long mag01[2]={0x0UL, MATRIX_A}; + /* mag01[x] = x * MATRIX_A for x=0,1 */ + + if (mti >= N) { /* generate N words at one time */ + int kk; + + if (mti == N+1) /* if init_genrand() has not been called, */ + init_genrand(5489UL); /* a default initial seed is used */ + + for (kk=0;kk> 1) ^ mag01[y & 0x1UL]; + } + for (;kk> 1) ^ mag01[y & 0x1UL]; + } + y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK); + mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL]; + + mti = 0; + } + + y = mt[mti++]; + + /* Tempering */ + y ^= (y >> 11); + y ^= (y << 7) & 0x9d2c5680UL; + y ^= (y << 15) & 0xefc60000UL; + y ^= (y >> 18); + + return y; +} + +/* Orc version */ + +typedef struct _OrcRandomContext OrcRandomContext; +struct _OrcRandomContext { + orc_uint32 d[N]; + orc_uint32 mt[N+1]; + int mti; +}; + +OrcRandomContext * +orc_random_context_new (void) +{ + OrcRandomContext *context; + context = malloc(sizeof(OrcRandomContext)); + memset (context, 0, sizeof(OrcRandomContext)); + context->mti = N+1; + return context; +} + +void +orc_random_init_genrand(OrcRandomContext *context, orc_uint32 s) +{ + orc_uint32 *mt = context->mt; + int mti; + + mt[0] = s; + for (mti=1; mti> 30)) + mti); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + } + context->mti = mti; +} + +void +orc_random_init_by_array (OrcRandomContext *context, orc_uint32 *init_key, + int key_length) +{ + int i, j, k; + orc_uint32 *mt = context->mt; + + orc_random_init_genrand (context, 19650218UL); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) + + init_key[j] + j; /* non linear */ + i++; j++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) + - i; /* non linear */ + i++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + } + + mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ +} + +#if 0 +/* These are the functions that were converted to Orc code. */ +static void +mix (orc_uint32 *mt, orc_uint32 *mt2, int n) +{ + orc_uint32 y; + int kk; + + for (kk=0;kk> 1; + y ^= t1; + + mt[kk] = mt2[kk] ^ y; + } +} + +static void +temper (orc_uint32 *d, orc_uint32 *mt, int n) +{ + orc_uint32 y; + int i; + + for(i=0;i> 11); + y ^= (y << 7) & 0x9d2c5680UL; + y ^= (y << 15) & 0xefc60000UL; + y ^= (y >> 18); + d[i] = y; + } +} +#endif + +static void +update_context (OrcRandomContext *context) +{ + orc_uint32 *d = context->d; + orc_uint32 *mt = context->mt; + +#if 0 + mix (mt, mt + M, N-M); + mt[N] = mt[0]; + mix (mt + N - M, mt, M); + temper (d, mt, N); +#endif + + mt19937ar_mix (mt, mt + 1, mt + M, N-M); + mt[N] = mt[0]; + mt19937ar_mix (mt + N - M, mt + N - M + 1, mt, M); + mt19937ar_temper (d, mt, N); + +#if 0 + /* too many temp variables, compiles incorrectly */ + mt19937ar_mix_temper (d, mt, mt + 1, mt + M, N-M); + mt[N] = mt[0]; + mt19937ar_mix_temper (d + N - M, mt + N - M, mt + N - M + 1, mt, M); +#endif +} + +orc_uint32 +orc_random_genrand_int32 (OrcRandomContext *context) +{ + if (context->mti >= N) { /* generate N words at one time */ + if (context->mti == N+1) /* if init_genrand() has not been called, */ + orc_random_init_genrand(context, 5489UL); /* a default initial seed is used */ + + update_context (context); + + context->mti = 0; + } + + return context->d[context->mti++]; +} + + +int main(void) +{ + int i; + orc_uint32 init[4]={0x123, 0x234, 0x345, 0x456}; + int length=4; + orc_uint32 ref, test; + OrcRandomContext *context; + int error = 0; + + init_by_array(init, length); + + context = orc_random_context_new (); + orc_random_init_by_array (context, init, length); + + printf("1000 outputs of genrand_int32()\n"); + for (i=0; i<1000; i++) { + ref = genrand_int32(); + test = orc_random_genrand_int32(context); + printf("%08x %08x %c\n", ref, test, (ref == test) ? ' ' : '*'); + if (ref != test) error = 1; + } + if (error) { + printf("FAIL\n"); + } + + return 0; +} + diff --git a/examples/mt19937arorc.orc b/examples/mt19937arorc.orc new file mode 100644 index 0000000..3c64358 --- /dev/null +++ b/examples/mt19937arorc.orc @@ -0,0 +1,85 @@ + +.function mt19937ar_mix +.dest 4 mt +.source 4 mt1 +.source 4 mt2 +.temp 4 y +.temp 4 t1 +.temp 4 t2 +.const 4 c1 1 +.const 4 UPPER_MASK 0x80000000 +.const 4 LOWER_MASK 0x7fffffff +.const 4 MATRIX_A 0x9908b0df + + +loadl t1, mt +andl t1, t1, UPPER_MASK +loadl t2, mt1 +andl t2, t2, LOWER_MASK +orl y, t1, t2 +andl t1, y, c1 +cmpeql t1, t1, c1 +andl t1, t1, MATRIX_A +shrul y, y, c1 +xorl y, y, t1 +xorl mt, mt2, y + + +.function mt19937ar_temper +.dest 4 d +.source 4 s +.temp 4 y +.temp 4 t + +loadl y, s +shrul t, y, 11 +xorl y, y, t +shll t, y, 7 +andl t, t, 0x9d2c5680 +xorl y, y, t +shll t, y, 15 +andl t, t, 0xefc60000 +xorl y, y, t +shrul t, y, 18 +xorl d, y, t + + +#.function mt19937ar_mix_temper +#.dest 4 d +#.dest 4 mt +#.source 4 mt1 +#.source 4 mt2 +#.temp 4 y +#.temp 4 t1 +#.temp 4 t2 +#.const 4 c1 1 +#.const 4 UPPER_MASK 0x80000000 +#.const 4 LOWER_MASK 0x7fffffff +#.const 4 MATRIX_A 0x9908b0df +# +# +#loadl t1, mt +#andl t1, t1, UPPER_MASK +#loadl t2, mt1 +#andl t2, t2, LOWER_MASK +#orl y, t1, t2 +#andl t1, y, c1 +#cmpeql t1, t1, c1 +#andl t1, t1, MATRIX_A +#shrul y, y, c1 +#xorl y, y, t1 +#xorl y, mt2, y +#storel mt, y +#shrul t1, y, 11 +#xorl y, y, t1 +#shll t1, y, 7 +#andl t1, t1, 0x9d2c5680 +#xorl y, y, t1 +#shll t1, y, 15 +#andl t1, t1, 0xefc60000 +#xorl y, y, t1 +#shrul t1, y, 18 +#xorl d, y, t1 + + + diff --git a/examples/volscale.c b/examples/volscale.c new file mode 100644 index 0000000..c8dac72 --- /dev/null +++ b/examples/volscale.c @@ -0,0 +1,269 @@ + +#include +#ifndef _MSC_VER +#include +#endif + +#define ORC_ENABLE_UNSTABLE_API + +#include + +static OrcProgram *p = NULL; + +static void +mmx_rule_mulhslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmp1 = X86_MM4; + int tmp2 = X86_MM5; + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + if (dest != src1) { + orc_mmx_emit_movq (p, src1, dest); + } + + orc_mmx_emit_pxor (p, tmp1, tmp1); /* .. | 0 | 0 | */ + orc_mmx_emit_punpcklwd (p, tmp1, src2); /* .. | 0 | p0 | */ + orc_mmx_emit_pcmpgtw (p, dest, tmp1); /* .. | 0 | s(vl) | */ + orc_mmx_emit_pand (p, src2, tmp1); /* .. | 0 | (p0) | (vl >> 15) & p */ + orc_mmx_emit_movq (p, src2, tmp2); + orc_mmx_emit_pmulhw (p, src1, src2); /* .. | 0 | vl*p0 | */ + orc_mmx_emit_paddw (p, tmp1, src2); /* .. | 0 | vl*p0 | + sign correct */ + orc_mmx_emit_psrld (p, 16, dest); /* .. | 0 | vh | */ + orc_mmx_emit_pmaddwd (p, tmp2, dest); /* .. | p0 * vh | */ + orc_mmx_emit_paddd (p, src2, dest); /* .. | p0 * v0 | */ +} + +static void +sse_rule_mulhslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmp1 = X86_XMM4; + int tmp2 = X86_XMM5; + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + if (dest != src1) { + orc_sse_emit_movdqa (p, src1, dest); + } + + orc_sse_emit_pxor (p, tmp1, tmp1); /* .. | 0 | 0 | */ + orc_sse_emit_punpcklwd (p, tmp1, src2); /* .. | 0 | p0 | */ + orc_sse_emit_pcmpgtw (p, dest, tmp1); /* .. | 0 | s(vl) | */ + orc_sse_emit_pand (p, src2, tmp1); /* .. | 0 | (p0) | (vl >> 15) & p */ + orc_sse_emit_movdqa (p, src2, tmp2); + orc_sse_emit_pmulhw (p, src1, src2); /* .. | 0 | vl*p0 | */ + orc_sse_emit_paddw (p, tmp1, src2); /* .. | 0 | vl*p0 | + sign correct */ + orc_sse_emit_psrld (p, 16, dest); /* .. | 0 | vh | */ + orc_sse_emit_pmaddwd (p, tmp2, dest); /* .. | p0 * vh | */ + orc_sse_emit_paddd (p, src2, dest); /* .. | p0 * v0 | */ +} + +static void +mmx_register_rules (void) +{ + OrcRuleSet *rule_set; + + rule_set = orc_rule_set_new (orc_opcode_set_get("pulse"), + orc_target_get_by_name ("mmx"), ORC_TARGET_MMX_MMX); + + orc_rule_register (rule_set, "mulhslw", mmx_rule_mulhslw, NULL); +} + +static void +sse_register_rules (void) +{ + OrcRuleSet *rule_set; + + rule_set = orc_rule_set_new (orc_opcode_set_get("pulse"), + orc_target_get_by_name ("sse"), ORC_TARGET_SSE_SSE2); + + orc_rule_register (rule_set, "mulhslw", sse_rule_mulhslw, NULL); +} + +/* calculate the high 32 bits of a 32x16 signed multiply */ +static void +emulate_mulhslw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ptr0; + const orc_union32 * ptr4; + const orc_int16 * ptr5; + orc_union32 var32; + orc_int16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_int16 *)ex->src_ptrs[1]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mulsbw */ + var34.i = (var32.i * var33)>>16; + /* 3: storew */ + ptr0[i] = var34; + } +} + +static OrcStaticOpcode opcodes[] = { + { "mulhslw", 0, { 4 }, { 4, 2 }, emulate_mulhslw }, + + { "" } +}; + +static void +register_instr (void) +{ + orc_opcode_register_static (opcodes, "pulse"); + mmx_register_rules (); + sse_register_rules (); +} + +static void +do_volume_c (orc_int16 *dest, const orc_int32 *vols, const orc_int16 *samp, int len) +{ + int i; + + for (i = 0; i < len; i++) { + orc_int32 t, hi, lo; + + hi = vols[i] >> 16; + lo = vols[i] & 0xffff; + + t = (orc_int32)(samp[i]); + t = ((t * lo) >> 16) + (t * hi); + dest[i] = (orc_int16) ORC_CLAMP (t, -0x8000, 0x7FFF); + } +} + + +static void +do_volume_backup (OrcExecutor *ex) +{ + orc_int16 *dest; + orc_int32 *vols; + const orc_int16 *samp; + int len; + + dest = ex->arrays[ORC_VAR_D1]; + vols = ex->arrays[ORC_VAR_S1]; + samp = ex->arrays[ORC_VAR_S2]; + len = ex->n; + + do_volume_c (dest, vols, samp, len); +} + +static void +make_volume_orc() +{ + OrcCompileResult res; + + /* int16 destination samples that get scaled by int32 volumes */ + p = orc_program_new (); + orc_program_set_backup_function (p, do_volume_backup); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 2, "s2"); + + /* a temporary for the upscaled input samples */ + orc_program_add_temporary (p, 4, "t1"); + + /* multiply with the volume, keeping only the high 32bits */ + orc_program_append (p, "mulhslw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2); + /* pack an saturate do 16 bits again */ + orc_program_append_ds (p, "convssslw", ORC_VAR_D1, ORC_VAR_T1); + + /* Compile the program */ + res = orc_program_compile (p); + fprintf (stderr, "result: %d\n", res); + + if (res == ORC_COMPILE_RESULT_OK) + fprintf (stderr, "%s\n", orc_program_get_asm_code (p)); +} + +static void +do_volume_orc (orc_int16 *dest, orc_int32 *volumes, orc_int16 *samp, int length) +{ + OrcExecutor _ex; + OrcExecutor *ex = &_ex; + + /* Set the values on the executor structure */ + orc_executor_set_program (ex, p); + orc_executor_set_n (ex, length); + orc_executor_set_array (ex, ORC_VAR_D1, dest); + orc_executor_set_array (ex, ORC_VAR_S1, volumes); + orc_executor_set_array (ex, ORC_VAR_S2, samp); + + /* Run the program. This calls the code that was generated above, + * or, if the compilation failed, will emulate the program. */ + orc_executor_run (ex); +} + +static orc_uint64 +get_timestamp () +{ +#ifndef _MSC_VER + struct timeval now; + + gettimeofday (&now, NULL); + + return now.tv_sec * 1000000LL + now.tv_usec; +#else + return 0; +#endif +} + +#define TIMES 100000 +#define N 1024 + +orc_int16 dest[N]; +orc_int16 samp[N]; +orc_int32 vols[N]; + +int +main (int argc, char *argv[]) +{ + int i; + orc_uint64 start, stop; + + /* orc_init() must be called before any other Orc function */ + orc_init (); + + orc_debug_set_level (ORC_DEBUG_LOG); + register_instr (); + + make_volume_orc(); + orc_debug_set_level (ORC_DEBUG_NONE); + + /* Create some data in the source arrays */ + for(i=0;i %d\n", i, samp[i], dest[i]); + } + + return 0; +} diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 0000000..ed8c7a6 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,225 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + pdf-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ + $(srcdir)/pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +if GTK_DOC_BUILD_HTML +HTML_BUILD_STAMP=html-build.stamp +else +HTML_BUILD_STAMP= +endif +if GTK_DOC_BUILD_PDF +PDF_BUILD_STAMP=pdf-build.stamp +else +PDF_BUILD_STAMP= +endif + +all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +else +all-local: +endif + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + @touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + @touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + @cp version.entities $(srcdir)/xml/ + @touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/html + @mkdir $(srcdir)/html + @mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options=--path="$(srcdir)"; \ + fi; \ + cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + @touch html-build.stamp + +#### pdf #### + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building PDF' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/$(DOC_MODULE).pdf + @mkpdf_imgdirs=""; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + @touch pdf-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html + +install-data-local: + @installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + mv -f $${installdir}/$(DOC_MODULE).devhelp \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + cp $(srcdir)/html/* $(distdir)/html + -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ + cd $(distdir) && rm -f $(DISTCLEANFILES) + $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..6781b98 --- /dev/null +++ b/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ltmain.sh b/ltmain.sh new file mode 100755 index 0000000..7ed280b --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,8413 @@ +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6b +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +TIMESTAMP="" +package_revision=1.3017 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/m4/ac_libtool_tags.m4 b/m4/ac_libtool_tags.m4 new file mode 100644 index 0000000..d0ddb2e --- /dev/null +++ b/m4/ac_libtool_tags.m4 @@ -0,0 +1,57 @@ + +# backported from libtool 1.6 by Paolo Bonzini +# When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG +# to be more similar to the libtool 1.6 implementation, which +# uses an m4 loop and m4 case instead of a shell loop. This +# way the CXX/GCJ/F77/RC tests are not always expanded. + +# AC_LIBTOOL_TAGS +# --------------- +# tags to enable +AC_DEFUN([AC_LIBTOOL_TAGS], +[m4_define([_LT_TAGS],[$1]) +m4_define([_LT_AC_TAGCONFIG], [ + if test -f "$ltmain"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + + AC_FOREACH([_LT_TAG], _LT_TAGS, + [m4_case(_LT_TAG, + [CXX], [ + if test -n "$CXX" && test "X$CXX" != "Xno"; then + AC_LIBTOOL_LANG_CXX_CONFIG + available_tags="$available_tags _LT_TAG" + fi], + [F77], [ + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + available_tags="$available_tags _LT_TAG" + fi], + [GCJ], [ + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + available_tags="$available_tags _LT_TAG" + fi], + [RC], [ + if test -n "$RC" && test "X$RC" != "Xno"; then + AC_LIBTOOL_LANG_RC_CONFIG + available_tags="$available_tags _LT_TAG" + fi], + [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG") + m4_exit(1)]) + ]) + fi + +])dnl _LT_AC_TAG_CONFIG +]) + diff --git a/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4 new file mode 100644 index 0000000..ebb2853 --- /dev/null +++ b/m4/as-compiler-flag.m4 @@ -0,0 +1,33 @@ +dnl as-compiler-flag.m4 0.1.0 + +dnl autostars m4 macro for detection of compiler flags + +dnl David Schleef + +dnl $Id: as-compiler-flag.m4,v 1.1 2004-08-20 22:25:22 ds Exp $ + +dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) +dnl Tries to compile with the given CFLAGS. +dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, +dnl and ACTION-IF-NOT-ACCEPTED otherwise. + +AC_DEFUN([AS_COMPILER_FLAG], +[ + AC_MSG_CHECKING([to see if compiler understands $1]) + + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + + AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) + CFLAGS="$save_CFLAGS" + + if test "X$flag_ok" = Xyes ; then + $2 + true + else + $3 + true + fi + AC_MSG_RESULT([$flag_ok]) +]) + diff --git a/m4/as-host-defines.m4 b/m4/as-host-defines.m4 new file mode 100644 index 0000000..d43596f --- /dev/null +++ b/m4/as-host-defines.m4 @@ -0,0 +1,52 @@ +dnl as-host-defines.m4 0.1.0 + +dnl autostars m4 macro for generating defines for various host architectures + +dnl David Schleef + +dnl $Id: as-host-defines.m4,v 1.3 2007-08-22 20:55:24 uid2631 Exp $ + +dnl AS_HOST_DEFINES() + +AC_DEFUN([AS_HOST_DEFINES], +[ + case "x${host_cpu}" in + xi?86 | k?) + HAVE_I386=yes + AC_DEFINE(HAVE_I386, 1, [Defined if host is i386]) + ;; + xx86_64|xamd64) + HAVE_AMD64=yes + AC_DEFINE(HAVE_AMD64, 1, [Defined if host is amd64]) + ;; + xpowerpc|xppc|xpowerpc64|xppc64) + HAVE_POWERPC=yes + AC_DEFINE(HAVE_POWERPC, 1, [Defined if host is powerpc]) + ;; + xarm) + HAVE_ARM=yes + AC_DEFINE(HAVE_ARM, 1, [Defined if host is arm]) + ;; + esac + +AM_CONDITIONAL(HAVE_I386, test "x$HAVE_I386" = "xyes") +AM_CONDITIONAL(HAVE_AMD64, test "x$HAVE_AMD64" = "xyes") +AM_CONDITIONAL(HAVE_POWERPC, test "x$HAVE_POWERPC" = "xyes") +AM_CONDITIONAL(HAVE_ARM, test "x$HAVE_ARM" = "xyes") + + case "${host_os}" in + mingw*) + HAVE_OS_WIN32=yes + AC_DEFINE(HAVE_OS_WIN32, 1, [Defined if host OS is MS Windows]) + ;; + linux*) + HAVE_OS_LINUX=yes + AC_DEFINE(HAVE_OS_LINUX, 1, [Defined if host OS is linux]) + ;; + esac + +AM_CONDITIONAL(HAVE_OS_WIN32, test "$HAVE_OS_WIN32" = "yes") +AM_CONDITIONAL(HAVE_OS_LINUX, test "$HAVE_OS_LINUX" = "yes") + +]) + diff --git a/m4/as-nano.m4 b/m4/as-nano.m4 new file mode 100644 index 0000000..119666c --- /dev/null +++ b/m4/as-nano.m4 @@ -0,0 +1,27 @@ +dnl as-version.m4 0.1.0 + +dnl autostars m4 macro for versioning (modified) + +dnl Thomas Vander Stichele +dnl David Schleef + +dnl $Id: as-nano.m4,v 1.2 2007-03-16 23:30:02 ds Exp $ + +dnl AS_VERSION(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) + +AC_DEFUN([AS_NANO], +[ + AC_MSG_CHECKING(nano version) + + NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//']) + AC_SUBST(NANO) + + if test x"$NANO" = x || test "x$NANO" = "x0" ; then + AC_MSG_RESULT([0 (release)]) + NANO=0 + ifelse([$1], , :, [$1]) + else + AC_MSG_RESULT($NANO) + ifelse([$2], , :, [$2]) + fi +]) diff --git a/m4/ax_create_stdint_h.m4 b/m4/ax_create_stdint_h.m4 new file mode 100644 index 0000000..13bf699 --- /dev/null +++ b/m4/ax_create_stdint_h.m4 @@ -0,0 +1,734 @@ +##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html +# +# SYNOPSIS +# +# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] +# +# DESCRIPTION +# +# the "ISO C9X: 7.18 Integer types " section requires the +# existence of an include file that defines a set of +# typedefs, especially uint8_t,int32_t,uintptr_t. Many older +# installations will not provide this file, but some will have the +# very same definitions in . In other enviroments we can +# use the inet-types in which would define the typedefs +# int8_t and u_int8_t respectivly. +# +# This macros will create a local "_stdint.h" or the headerfile given +# as an argument. In many cases that file will just "#include +# " or "#include ", while in other environments +# it will provide the set of basic 'stdint's definitions/typedefs: +# +# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t +# int_least32_t.. int_fast32_t.. intmax_t +# +# which may or may not rely on the definitions of other files, or +# using the AC_CHECK_SIZEOF macro to determine the actual sizeof each +# type. +# +# if your header files require the stdint-types you will want to +# create an installable file mylib-int.h that all your other +# installable header may include. So if you have a library package +# named "mylib", just use +# +# AX_CREATE_STDINT_H(mylib-int.h) +# +# in configure.ac and go to install that very header file in +# Makefile.am along with the other headers (mylib.h) - and the +# mylib-specific headers can simply use "#include " to +# obtain the stdint-types. +# +# Remember, if the system already had a valid , the +# generated file will include it directly. No need for fuzzy +# HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled +# its stdint.h for non-c99 compilation and the c99-mode is not the +# default. Therefore this macro will not use the compiler's stdint.h +# - please complain to the GCC developers). +# +# LAST MODIFICATION +# +# 2007-06-27 +# +# COPYLEFT +# +# Copyright (c) 2007 Guido U. Draheim +# +# This program 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 2 of the +# License, or (at your option) any later version. +# +# This program 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., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# As a special exception, the respective Autoconf Macro's copyright +# owner gives unlimited permission to copy, distribute and modify the +# configure scripts that are the output of Autoconf when processing +# the Macro. You need not follow the terms of the GNU General Public +# License when using or distributing such scripts, even though +# portions of the text of the Macro appear in them. The GNU General +# Public License (GPL) does govern all other use of the material that +# constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the +# Autoconf Macro released by the Autoconf Macro Archive. When you +# make and distribute a modified version of the Autoconf Macro, you +# may extend this special exception to the GPL to apply to your +# modified version as well. + +AC_DEFUN([AX_CHECK_DATA_MODEL],[ + AC_CHECK_SIZEOF(char) + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(void*) + ac_cv_char_data_model="" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" + AC_MSG_CHECKING([data model]) + case "$ac_cv_char_data_model/$ac_cv_long_data_model" in + 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; + 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; + 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; + 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; + 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; + 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; + 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; + 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; + 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; + 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; + 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; + 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; + 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; + 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; + 222/*|333/*|444/*|666/*|888/*) : + ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; + *) ac_cv_data_model="none" ; n="very unusual model" ;; + esac + AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) +]) + +dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) +AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ +AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ + ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) + do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uint64_t + AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + done + AC_MSG_CHECKING([for stdint uintptr_t]) + ]) +]) + +AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ +AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ + ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) + do + unset ac_cv_type_uint32_t + unset ac_cv_type_uint64_t + AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + break; + done + AC_MSG_CHECKING([for stdint uint32_t]) + ]) +]) + +AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ +AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ + ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do + unset ac_cv_type_u_int32_t + unset ac_cv_type_u_int64_t + AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + break; + done + AC_MSG_CHECKING([for stdint u_int32_t]) + ]) +]) + +AC_DEFUN([AX_CREATE_STDINT_H], +[# ------ AX CREATE STDINT H ------------------------------------- +AC_MSG_CHECKING([for stdint types]) +ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` +# try to shortcircuit - if the default include path of the compiler +# can find a "stdint.h" header then we assume that all compilers can. +AC_CACHE_VAL([ac_cv_header_stdint_t],[ +old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" +old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" +old_CFLAGS="$CFLAGS" ; CFLAGS="" +AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], +[ac_cv_stdint_result="(assuming C99 compatible system)" + ac_cv_header_stdint_t="stdint.h"; ], +[ac_cv_header_stdint_t=""]) +if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then +CFLAGS="-std=c99" +AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], +[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) +fi +CXXFLAGS="$old_CXXFLAGS" +CPPFLAGS="$old_CPPFLAGS" +CFLAGS="$old_CFLAGS" ]) + +v="... $ac_cv_header_stdint_h" +if test "$ac_stdint_h" = "stdint.h" ; then + AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) +elif test "$ac_stdint_h" = "inttypes.h" ; then + AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) +elif test "_$ac_cv_header_stdint_t" = "_" ; then + AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) +else + ac_cv_header_stdint="$ac_cv_header_stdint_t" + AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) +fi + +if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. + +dnl .....intro message done, now do a few system checks..... +dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, +dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW +dnl instead that is triggered with 3 or more arguments (see types.m4) + +inttype_headers=`echo $2 | sed -e 's/,/ /g'` + +ac_cv_stdint_result="(no helpful system typedefs seen)" +AX_CHECK_HEADER_STDINT_X(dnl + stdint.h inttypes.h sys/inttypes.h $inttype_headers, + ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") + +if test "_$ac_cv_header_stdint_x" = "_" ; then +AX_CHECK_HEADER_STDINT_O(dnl, + inttypes.h sys/inttypes.h stdint.h $inttype_headers, + ac_cv_stdint_result="(seen uint32_t$and64 in $i)") +fi + +if test "_$ac_cv_header_stdint_x" = "_" ; then +if test "_$ac_cv_header_stdint_o" = "_" ; then +AX_CHECK_HEADER_STDINT_U(dnl, + sys/types.h inttypes.h sys/inttypes.h $inttype_headers, + ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") +fi fi + +dnl if there was no good C99 header file, do some typedef checks... +if test "_$ac_cv_header_stdint_x" = "_" ; then + AC_MSG_CHECKING([for stdint datatype model]) + AC_MSG_RESULT([(..)]) + AX_CHECK_DATA_MODEL +fi + +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_x" +elif test "_$ac_cv_header_stdint_o" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_o" +elif test "_$ac_cv_header_stdint_u" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_u" +else + ac_cv_header_stdint="stddef.h" +fi + +AC_MSG_CHECKING([for extra inttypes in chosen header]) +AC_MSG_RESULT([($ac_cv_header_stdint)]) +dnl see if int_least and int_fast types are present in _this_ header. +unset ac_cv_type_int_least32_t +unset ac_cv_type_int_fast32_t +AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) +AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) +AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) + +fi # shortcircut to system "stdint.h" +# ------------------ PREPARE VARIABLES ------------------------------ +if test "$GCC" = "yes" ; then +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` +else +ac_cv_stdint_message="using $CC" +fi + +AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl +$ac_cv_stdint_result]) + +dnl ----------------------------------------------------------------- +# ----------------- DONE inttypes.h checks START header ------------- +AC_CONFIG_COMMANDS([$ac_stdint_h],[ +AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) +ac_stdint=$tmp/_stdint.h + +echo "#ifndef" $_ac_stdint_h >$ac_stdint +echo "#define" $_ac_stdint_h "1" >>$ac_stdint +echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint +echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint +echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint +if test "_$ac_cv_header_stdint_t" != "_" ; then +echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint +echo "#include " >>$ac_stdint +echo "#endif" >>$ac_stdint +echo "#endif" >>$ac_stdint +else + +cat >>$ac_stdint < +#else +#include + +/* .................... configured part ............................ */ + +STDINT_EOF + +echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_header="$ac_cv_header_stdint_x" + echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint +fi + +echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_o" != "_" ; then + ac_header="$ac_cv_header_stdint_o" + echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint +fi + +echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint +if test "_$ac_cv_header_stdint_u" != "_" ; then + ac_header="$ac_cv_header_stdint_u" + echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint +fi + +echo "" >>$ac_stdint + +if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then + echo "#include <$ac_header>" >>$ac_stdint + echo "" >>$ac_stdint +fi fi + +echo "/* which 64bit typedef has been found */" >>$ac_stdint +if test "$ac_cv_type_uint64_t" = "yes" ; then +echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint +fi +if test "$ac_cv_type_u_int64_t" = "yes" ; then +echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* which type model has been detected */" >>$ac_stdint +if test "_$ac_cv_char_data_model" != "_" ; then +echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint +echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint +else +echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint +echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* whether int_least types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_least32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint +fi +echo "/* whether int_fast types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_fast32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint +fi +echo "/* whether intmax_t type was detected */" >>$ac_stdint +if test "$ac_cv_type_intmax_t" = "yes"; then +echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + + cat >>$ac_stdint <= 199901L +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; + +#elif !defined __STRICT_ANSI__ +#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ +#define _HAVE_UINT64_T +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ +/* note: all ELF-systems seem to have loff-support which needs 64-bit */ +#if !defined _NO_LONGLONG +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif + +#elif defined __alpha || (defined __mips && defined _ABIN32) +#if !defined _NO_LONGLONG +typedef long int64_t; +typedef unsigned long uint64_t; +#endif + /* compiler/cpu type to define int64_t */ +#endif +#endif +#endif + +#if defined _STDINT_HAVE_U_INT_TYPES +/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ +typedef u_int8_t uint8_t; +typedef u_int16_t uint16_t; +typedef u_int32_t uint32_t; + +/* glibc compatibility */ +#ifndef __int8_t_defined +#define __int8_t_defined +#endif +#endif + +#ifdef _STDINT_NEED_INT_MODEL_T +/* we must guess all the basic types. Apart from byte-adressable system, */ +/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ +/* (btw, those nibble-addressable systems are way off, or so we assume) */ + +dnl /* have a look at "64bit and data size neutrality" at */ +dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ +dnl /* (the shorthand "ILP" types always have a "P" part) */ + +#if defined _STDINT_BYTE_MODEL +#if _STDINT_LONG_MODEL+0 == 242 +/* 2:4:2 = IP16 = a normal 16-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef long int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 +/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ +/* 4:4:4 = ILP32 = a normal 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 +/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ +/* 4:8:8 = LP64 = a normal 64-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* this system has a "long" of 64bit */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +typedef unsigned long uint64_t; +typedef long int64_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 448 +/* LLP64 a 64-bit system derived from a 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* assuming the system has a "long long" */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif +#else +#define _STDINT_NO_INT32_T +#endif +#else +#define _STDINT_NO_INT8_T +#define _STDINT_NO_INT32_T +#endif +#endif + +/* + * quote from SunOS-5.8 sys/inttypes.h: + * Use at your own risk. As of February 1996, the committee is squarely + * behind the fixed sized types; the "least" and "fast" types are still being + * discussed. The probability that the "fast" types may be removed before + * the standard is finalized is high enough that they are not currently + * implemented. + */ + +#if defined _STDINT_NEED_INT_LEAST_T +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_least64_t; +#endif + +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_least64_t; +#endif + /* least types */ +#endif + +#if defined _STDINT_NEED_INT_FAST_T +typedef int8_t int_fast8_t; +typedef int int_fast16_t; +typedef int32_t int_fast32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_fast64_t; +#endif + +typedef uint8_t uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef uint32_t uint_fast32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_fast64_t; +#endif + /* fast types */ +#endif + +#ifdef _STDINT_NEED_INTMAX_T +#ifdef _HAVE_UINT64_T +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; +#else +typedef long intmax_t; +typedef unsigned long uintmax_t; +#endif +#endif + +#ifdef _STDINT_NEED_INTPTR_T +#ifndef __intptr_t_defined +#define __intptr_t_defined +/* we encourage using "long" to store pointer values, never use "int" ! */ +#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 +typedef unsigned int uintptr_t; +typedef int intptr_t; +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 +typedef unsigned long uintptr_t; +typedef long intptr_t; +#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T +typedef uint64_t uintptr_t; +typedef int64_t intptr_t; +#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ +typedef unsigned long uintptr_t; +typedef long intptr_t; +#endif +#endif +#endif + +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS +#ifndef UINT32_C + +/* Signed. */ +# define INT8_C(c) c +# define INT16_C(c) c +# define INT32_C(c) c +# ifdef _HAVE_LONGLONG_UINT64_T +# define INT64_C(c) c ## L +# else +# define INT64_C(c) c ## LL +# endif + +/* Unsigned. */ +# define UINT8_C(c) c ## U +# define UINT16_C(c) c ## U +# define UINT32_C(c) c ## U +# ifdef _HAVE_LONGLONG_UINT64_T +# define UINT64_C(c) c ## UL +# else +# define UINT64_C(c) c ## ULL +# endif + +/* Maximal type. */ +# ifdef _HAVE_LONGLONG_UINT64_T +# define INTMAX_C(c) c ## L +# define UINTMAX_C(c) c ## UL +# else +# define INTMAX_C(c) c ## LL +# define UINTMAX_C(c) c ## ULL +# endif + + /* literalnumbers */ +#endif +#endif + +/* These limits are merily those of a two complement byte-oriented system */ + +/* Minimum of signed integral types. */ +# define INT8_MIN (-128) +# define INT16_MIN (-32767-1) +# define INT32_MIN (-2147483647-1) +# define INT64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of signed integral types. */ +# define INT8_MAX (127) +# define INT16_MAX (32767) +# define INT32_MAX (2147483647) +# define INT64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of unsigned integral types. */ +# define UINT8_MAX (255) +# define UINT16_MAX (65535) +# define UINT32_MAX (4294967295U) +# define UINT64_MAX (__UINT64_C(18446744073709551615)) + +/* Minimum of signed integral types having a minimum size. */ +# define INT_LEAST8_MIN INT8_MIN +# define INT_LEAST16_MIN INT16_MIN +# define INT_LEAST32_MIN INT32_MIN +# define INT_LEAST64_MIN INT64_MIN +/* Maximum of signed integral types having a minimum size. */ +# define INT_LEAST8_MAX INT8_MAX +# define INT_LEAST16_MAX INT16_MAX +# define INT_LEAST32_MAX INT32_MAX +# define INT_LEAST64_MAX INT64_MAX + +/* Maximum of unsigned integral types having a minimum size. */ +# define UINT_LEAST8_MAX UINT8_MAX +# define UINT_LEAST16_MAX UINT16_MAX +# define UINT_LEAST32_MAX UINT32_MAX +# define UINT_LEAST64_MAX UINT64_MAX + + /* shortcircuit*/ +#endif + /* once */ +#endif +#endif +STDINT_EOF +fi + if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then + AC_MSG_NOTICE([$ac_stdint_h is unchanged]) + else + ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` + AS_MKDIR_P(["$ac_dir"]) + rm -f $ac_stdint_h + mv $ac_stdint $ac_stdint_h + fi +],[# variables for create stdint.h replacement +PACKAGE="$PACKAGE" +VERSION="$VERSION" +ac_stdint_h="$ac_stdint_h" +_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) +ac_cv_stdint_message="$ac_cv_stdint_message" +ac_cv_header_stdint_t="$ac_cv_header_stdint_t" +ac_cv_header_stdint_x="$ac_cv_header_stdint_x" +ac_cv_header_stdint_o="$ac_cv_header_stdint_o" +ac_cv_header_stdint_u="$ac_cv_header_stdint_u" +ac_cv_type_uint64_t="$ac_cv_type_uint64_t" +ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" +ac_cv_char_data_model="$ac_cv_char_data_model" +ac_cv_long_data_model="$ac_cv_long_data_model" +ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" +ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" +ac_cv_type_intmax_t="$ac_cv_type_intmax_t" +]) +]) diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 new file mode 100644 index 0000000..2cfa1e7 --- /dev/null +++ b/m4/gtk-doc.m4 @@ -0,0 +1,61 @@ +dnl -*- mode: autoconf -*- + +# serial 1 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + dnl check for tools we added during development + AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + if test x$enable_gtk_doc = xyes; then + ifelse([$1],[], + [PKG_CHECK_EXISTS([gtk-doc],, + AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], + [PKG_CHECK_EXISTS([gtk-doc >= $1],, + AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + fi + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) diff --git a/m4/libtool.m4 b/m4/libtool.m4 new file mode 100644 index 0000000..a3fee53 --- /dev/null +++ b/m4/libtool.m4 @@ -0,0 +1,7377 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 new file mode 100644 index 0000000..34151a3 --- /dev/null +++ b/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 new file mode 100644 index 0000000..f3c5309 --- /dev/null +++ b/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 new file mode 100644 index 0000000..637bb20 --- /dev/null +++ b/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 new file mode 100644 index 0000000..3c20213 --- /dev/null +++ b/m4/pkg.m4 @@ -0,0 +1,135 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +if test $pkg_failed = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met. +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details.])], + [$4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables +to avoid the need to call pkg-config. See the pkg-config man page for +more details. + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES diff --git a/missing b/missing new file mode 100755 index 0000000..28055d2 --- /dev/null +++ b/missing @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program 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 2, or (at your option) +# any later version. + +# This program 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/orc-test/Makefile.am b/orc-test/Makefile.am new file mode 100644 index 0000000..0493334 --- /dev/null +++ b/orc-test/Makefile.am @@ -0,0 +1,24 @@ + +pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc-test + +lib_LTLIBRARIES = liborc-test-@ORC_MAJORMINOR@.la + +liborc_test_@ORC_MAJORMINOR@_la_LIBADD = $(ORC_LIBS) +liborc_test_@ORC_MAJORMINOR@_la_LDFLAGS = \ + -version-info $(ORC_LIBVERSION) \ + -no-undefined -export-symbols-regex 'orc_' +liborc_test_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ + -DORC_ENABLE_UNSTABLE_API + +liborc_test_@ORC_MAJORMINOR@_la_SOURCES = \ + orctest.c \ + orcarray.c \ + orcrandom.c \ + orcprofile.c + +pkginclude_HEADERS = \ + orctest.h \ + orcarray.h \ + orcrandom.h \ + orcprofile.h + diff --git a/orc-test/Makefile.in b/orc-test/Makefile.in new file mode 100644 index 0000000..ffb5f99 --- /dev/null +++ b/orc-test/Makefile.in @@ -0,0 +1,622 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = orc-test +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +liborc_test_@ORC_MAJORMINOR@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_liborc_test_@ORC_MAJORMINOR@_la_OBJECTS = \ + liborc_test_@ORC_MAJORMINOR@_la-orctest.lo \ + liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo \ + liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo \ + liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo +liborc_test_@ORC_MAJORMINOR@_la_OBJECTS = \ + $(am_liborc_test_@ORC_MAJORMINOR@_la_OBJECTS) +liborc_test_@ORC_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ + $(liborc_test_@ORC_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(liborc_test_@ORC_MAJORMINOR@_la_SOURCES) +DIST_SOURCES = $(liborc_test_@ORC_MAJORMINOR@_la_SOURCES) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc-test +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = liborc-test-@ORC_MAJORMINOR@.la +liborc_test_@ORC_MAJORMINOR@_la_LIBADD = $(ORC_LIBS) +liborc_test_@ORC_MAJORMINOR@_la_LDFLAGS = \ + -version-info $(ORC_LIBVERSION) \ + -no-undefined -export-symbols-regex 'orc_' + +liborc_test_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ + -DORC_ENABLE_UNSTABLE_API + +liborc_test_@ORC_MAJORMINOR@_la_SOURCES = \ + orctest.c \ + orcarray.c \ + orcrandom.c \ + orcprofile.c + +pkginclude_HEADERS = \ + orctest.h \ + orcarray.h \ + orcrandom.h \ + orcprofile.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu orc-test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu orc-test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +liborc-test-@ORC_MAJORMINOR@.la: $(liborc_test_@ORC_MAJORMINOR@_la_OBJECTS) $(liborc_test_@ORC_MAJORMINOR@_la_DEPENDENCIES) + $(liborc_test_@ORC_MAJORMINOR@_la_LINK) -rpath $(libdir) $(liborc_test_@ORC_MAJORMINOR@_la_OBJECTS) $(liborc_test_@ORC_MAJORMINOR@_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcarray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcprofile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcrandom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orctest.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +liborc_test_@ORC_MAJORMINOR@_la-orctest.lo: orctest.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_test_@ORC_MAJORMINOR@_la-orctest.lo -MD -MP -MF $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orctest.Tpo -c -o liborc_test_@ORC_MAJORMINOR@_la-orctest.lo `test -f 'orctest.c' || echo '$(srcdir)/'`orctest.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orctest.Tpo $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orctest.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orctest.c' object='liborc_test_@ORC_MAJORMINOR@_la-orctest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_test_@ORC_MAJORMINOR@_la-orctest.lo `test -f 'orctest.c' || echo '$(srcdir)/'`orctest.c + +liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo: orcarray.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo -MD -MP -MF $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcarray.Tpo -c -o liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo `test -f 'orcarray.c' || echo '$(srcdir)/'`orcarray.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcarray.Tpo $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcarray.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcarray.c' object='liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_test_@ORC_MAJORMINOR@_la-orcarray.lo `test -f 'orcarray.c' || echo '$(srcdir)/'`orcarray.c + +liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo: orcrandom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo -MD -MP -MF $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcrandom.Tpo -c -o liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo `test -f 'orcrandom.c' || echo '$(srcdir)/'`orcrandom.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcrandom.Tpo $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcrandom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrandom.c' object='liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_test_@ORC_MAJORMINOR@_la-orcrandom.lo `test -f 'orcrandom.c' || echo '$(srcdir)/'`orcrandom.c + +liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo: orcprofile.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo -MD -MP -MF $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcprofile.Tpo -c -o liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo `test -f 'orcprofile.c' || echo '$(srcdir)/'`orcprofile.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcprofile.Tpo $(DEPDIR)/liborc_test_@ORC_MAJORMINOR@_la-orcprofile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprofile.c' object='liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_test_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_test_@ORC_MAJORMINOR@_la-orcprofile.lo `test -f 'orcprofile.c' || echo '$(srcdir)/'`orcprofile.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/orc-test/orcarray.c b/orc-test/orcarray.c new file mode 100644 index 0000000..0686008 --- /dev/null +++ b/orc-test/orcarray.c @@ -0,0 +1,301 @@ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define EXTEND_ROWS 16 +#define EXTEND_STRIDE 256 + +#ifdef _MSC_VER +#define isnan(x) _isnan(x) +#endif + +#define ALIGNMENT 64 +#define MISALIGNMENT 0 + +OrcArray * +orc_array_new (int n, int m, int element_size, int misalignment) +{ + OrcArray *ar; + void *data; +#ifdef HAVE_POSIX_MEMALIGN + int ret; +#endif + + ar = malloc (sizeof(OrcArray)); + memset (ar, 0, sizeof(OrcArray)); + + ar->n = n; + ar->m = m; + ar->element_size = element_size; + + ar->stride = (n*element_size + EXTEND_STRIDE); + ar->stride = (ar->stride + (ALIGNMENT-1)) & (~(ALIGNMENT-1)); + ar->alloc_len = ar->stride * (m+2*EXTEND_ROWS) + (ALIGNMENT * element_size); + +#ifdef HAVE_POSIX_MEMALIGN + ret = posix_memalign (&data, ALIGNMENT, ar->alloc_len); +#else + data = malloc (ar->alloc_len); +#endif + ar->alloc_data = data; + + ar->data = ORC_PTR_OFFSET (ar->alloc_data, + ar->stride * EXTEND_ROWS + element_size * misalignment); + + return ar; +} + +void +orc_array_free (OrcArray *array) +{ + free (array->alloc_data); + free (array); +} + +void +orc_array_set_pattern (OrcArray *array, int value) +{ + memset (array->alloc_data, value, array->alloc_len); +} + +void +orc_array_set_random (OrcArray *array, OrcRandomContext *context) +{ + orc_random_bits (context, array->alloc_data, array->alloc_len); +} + +#define CREATE_FLOAT(sign,exp,mant) (((sign)<<31)|((exp)<<23)|((mant)<<0)) + +static const orc_uint32 special_floats[] = { + CREATE_FLOAT(0,0,0), /* 0 */ + CREATE_FLOAT(1,0,0), /* -0 */ + CREATE_FLOAT(0,126,0), /* 0.5 */ + CREATE_FLOAT(0,127,0), /* 1 */ + CREATE_FLOAT(0,128,0), /* 2 */ + CREATE_FLOAT(1,126,0), /* -0.5 */ + CREATE_FLOAT(1,127,0), /* -1 */ + CREATE_FLOAT(1,128,0), /* -2 */ + CREATE_FLOAT(0,255,0), /* infinity */ + CREATE_FLOAT(1,255,0), /* -infinity */ + CREATE_FLOAT(0,255,1), /* nan */ + CREATE_FLOAT(1,255,1), /* -nan */ + CREATE_FLOAT(0,0,1), /* denormal */ + CREATE_FLOAT(1,0,1), /* -denormal */ + CREATE_FLOAT(0,127+31,0), /* MAX_INT+1 */ + CREATE_FLOAT(0,127+30,0x7fffff), /* largest float < MAX_INT */ + CREATE_FLOAT(0,127+23,0x7fffff), /* largest non-integer float */ + CREATE_FLOAT(1,127+31,0), /* MIN_INT */ + CREATE_FLOAT(1,127+31,1), /* MIN_INT-1 */ + CREATE_FLOAT(1,127+30,0x7fffff), /* largest float >= MIN_INT */ + CREATE_FLOAT(1,127+23,0x7fffff), /* (negative) largest non-integer float */ + CREATE_FLOAT(0,127+14,(32767-16384)<<(23-14)), /* 32767 */ + CREATE_FLOAT(0,127+15,(0)<<(23-15)), /* 32768 */ + CREATE_FLOAT(0,127+15,(1)<<(23-15)), /* -32769 */ + CREATE_FLOAT(1,127+14,(32767-16384)<<(23-14)), /* -32767 */ + CREATE_FLOAT(1,127+15,(0)<<(23-15)), /* -32768 */ + CREATE_FLOAT(1,127+15,(1)<<(23-15)), /* -32769 */ + CREATE_FLOAT(0,127+4,(27-16)<<(23-4)), /* 27 */ + CREATE_FLOAT(0,127+4,(28-16)<<(23-4)), /* 28 */ + CREATE_FLOAT(0,127+4,(29-16)<<(23-4)), /* 29 */ + CREATE_FLOAT(0,127+4,(30-16)<<(23-4)), /* 30 */ + CREATE_FLOAT(0,127+4,(31-16)<<(23-4)), /* 31 */ +}; + +void +orc_array_set_pattern_2 (OrcArray *array, OrcRandomContext *context, + int type) +{ + int i,j; + + switch (type) { + case ORC_PATTERN_RANDOM: + orc_random_bits (context, array->alloc_data, array->alloc_len); + break; + case ORC_PATTERN_FLOAT_SMALL: + { + if (array->element_size != 4) return; + for(j=0;jm;j++){ + orc_union32 *data; + int exp; + + data = ORC_PTR_OFFSET(array->data, array->stride * j); + + for(i=0;in;i++){ + data[i].i = orc_random (context); + exp = (data[i].i & 0x7f80000) >> 23; + exp &= 0xf; + exp += 122; + data[i].i &= ~0x7f800000; + data[i].i |= (exp&0xff) << 23; + } + } + } + break; + case ORC_PATTERN_FLOAT_SPECIAL: + { + if (array->element_size != 4) return; + for(j=0;jm;j++){ + orc_union32 *data; + int x; + + data = ORC_PTR_OFFSET(array->data, array->stride * j); + + for(i=0;in;i++){ + x = i&0x1f; + data[i].i = special_floats[x]; + } + } + } + break; + case ORC_PATTERN_FLOAT_DENORMAL: + { + if (array->element_size != 4) return; + for(j=0;jm;j++){ + orc_union32 *data; + + data = ORC_PTR_OFFSET(array->data, array->stride * j); + + for(i=0;in;i++){ + data[i].i = orc_random (context); + data[i].i &= ~0x7f800000; + } + } + } + break; + default: + break; + } +} + +#define MIN_NONDENORMAL (1.1754944909521339405e-38) +#define MIN_NONDENORMAL_D (2.2250738585072014e-308) + +int +orc_array_compare (OrcArray *array1, OrcArray *array2, int flags) +{ + if ((flags & ORC_TEST_FLAGS_FLOAT)) { + if (array1->element_size == 4) { + int j; + for(j=0;jm;j++){ + float *a, *b; + int i; + + a = ORC_PTR_OFFSET (array1->data, j*array1->stride); + b = ORC_PTR_OFFSET (array2->data, j*array2->stride); + + for (i=0;in;i++){ + if (isnan(a[i]) && isnan(b[i])) continue; + if (a[i] == b[i]) continue; + if (fabs(a[i] - b[i]) < MIN_NONDENORMAL) continue; + return FALSE; + } + } + return TRUE; + } else if (array1->element_size == 8) { + int j; + for(j=0;jm;j++){ + double *a, *b; + int i; + + a = ORC_PTR_OFFSET (array1->data, j*array1->stride); + b = ORC_PTR_OFFSET (array2->data, j*array2->stride); + + for (i=0;in;i++){ + if (isnan(a[i]) && isnan(b[i])) continue; + if (a[i] == b[i]) continue; + if (abs(a[i] - b[i]) < MIN_NONDENORMAL_D) continue; + return FALSE; + } + } + return TRUE; + } + } else { + if (memcmp (array1->alloc_data, array2->alloc_data, + array1->alloc_len) == 0) { + return TRUE; + } + } + + return FALSE; +} + +int +orc_array_check_out_of_bounds (OrcArray *array) +{ + int i; + int j; + unsigned char *data; + + data = array->alloc_data; + for(i=0;istride * EXTEND_ROWS;i++){ + if (data[i] != ORC_OOB_VALUE) { + printf("OOB check failed at start-%d\n", array->stride * EXTEND_ROWS - i); + return FALSE; + } + } + + for(j=0;jm;j++){ + data = ORC_PTR_OFFSET(array->data, array->stride * j); + for(i=array->element_size * array->n;istride;i++){ + if (data[i] != ORC_OOB_VALUE) { + printf("OOB check failed on row %d, end+%d\n", j, + i - array->element_size * array->n); + return FALSE; + } + } + } + + data = ORC_PTR_OFFSET (array->data, array->stride * array->m); + for(i=0;istride * EXTEND_ROWS;i++){ + if (data[i] != ORC_OOB_VALUE) { + printf("OOB check failed at end+%d\n", i); + return FALSE; + } + } + + return TRUE; +} + +#if 0 +void +orc_array_print_compare (OrcArray *array1, OrcArray *array2) +{ + + for(j=0;jm;j++){ + for(i=0;in;i++){ + int a,b; + int j; + + printf("%2d %2d:", i, j); + + for(k=0;kvars[k].name == NULL) continue; + if (program->vars[k].vartype == ORC_VAR_TYPE_SRC && + program->vars[k].size > 0) { + print_array_val_signed (ex->arrays[k], program->vars[k].size, i); + } + } + + printf(" ->"); + a = print_array_val_signed (dest_emul[k], program->vars[k].size, i); + b = print_array_val_signed (dest_exec[k], program->vars[k].size, i); + + if (a != b) { + printf(" *"); + } + + printf("\n"); + } + } +} +#endif + diff --git a/orc-test/orcarray.h b/orc-test/orcarray.h new file mode 100644 index 0000000..eb57c57 --- /dev/null +++ b/orc-test/orcarray.h @@ -0,0 +1,43 @@ + +#ifndef _ORC_ARRAY_H_ +#define _ORC_ARRAY_H_ + +#include +#include +#include +#include + +#define ORC_OOB_VALUE 0xa5 + +typedef struct _OrcArray OrcArray; +struct _OrcArray { + void *data; + int stride; + int element_size; + int n,m; + + void *alloc_data; + int alloc_len; +}; + +enum { + ORC_PATTERN_RANDOM = 0, + ORC_PATTERN_FLOAT_SMALL, + ORC_PATTERN_FLOAT_SPECIAL, + ORC_PATTERN_FLOAT_DENORMAL +}; + +OrcArray *orc_array_new (int n, int m, int element_size, int misalignment); +void orc_array_free (OrcArray *array); + +void orc_array_set_pattern (OrcArray *array, int value); +void orc_array_set_random (OrcArray *array, OrcRandomContext *context); +void orc_array_set_pattern_2 (OrcArray *array, OrcRandomContext *context, + int type); + + +int orc_array_compare (OrcArray *array1, OrcArray *array2, int flags); +int orc_array_check_out_of_bounds (OrcArray *array); + +#endif + diff --git a/orc-test/orcprofile.c b/orc-test/orcprofile.c new file mode 100644 index 0000000..85de41b --- /dev/null +++ b/orc-test/orcprofile.c @@ -0,0 +1,219 @@ +/* + * Orc - Oil Runtime Compiler + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#ifdef HAVE_SYS_TIME_H +#include +#endif +#include +#include +#include + +/* not used because it requires a kernel patch */ +/* #undef USE_CORTEX_A8_COUNTER */ + +/** + * SECTION:orcprofile + * @title:OrcProfile + * @short_description: + * Measuring the length of time needed to execute Orc functions. + * + */ + +/** + * orc_profile_init: + * @prof: the OrcProfile structure + * + * Initializes a profiling structure. + */ +void +orc_profile_init (OrcProfile *prof) +{ +#if defined(__GNUC__) && defined(HAVE_ARM) && defined(USE_CORTEX_A8_COUNTER) + unsigned int flags; + + __asm__ volatile ("mrc p15, 0, %0, c9, c12, 0" : "=r" (flags)); + flags |= 1; + __asm__ volatile ("mcr p15, 0, %0, c9, c12, 0" :: "r" (flags)); + + __asm__ volatile ("mcr p15, 0, %0, c9, c12, 2" :: "r"(1<<31)); + __asm__ __volatile__(" mcr p15, 0, %0, c9, c13, 0" :: "r" (0)); + + __asm__ volatile ("mcr p15, 0, %0, c9, c12, 1" :: "r"(1<<31)); +#endif + memset(prof, 0, sizeof(OrcProfile)); + + prof->min = -1; + +} + +/** + * orc_profile_stop_handle: + * @prof: the OrcProfile structure + * + * Handles post-processing of a single profiling run. + * + * FIXME: need more info + */ +void +orc_profile_stop_handle (OrcProfile *prof) +{ + int i; + + prof->last = prof->stop - prof->start; + + prof->total += prof->last; + prof->n++; + + if (prof->last < prof->min) prof->min = prof->last; + + for(i=0;ihist_n;i++) { + if (prof->last == prof->hist_time[i]) { + prof->hist_count[i]++; + break; + } + } + if (i == prof->hist_n && prof->hist_n < ORC_PROFILE_HIST_LENGTH) { + prof->hist_time[prof->hist_n] = prof->last; + prof->hist_count[prof->hist_n] = 1; + prof->hist_n++; + } +} + +/** + * orc_profile_get_ave_std: + * @prof: the OrcProfile structure + * @ave_p: pointer to average + * @std_p: pointer to standard deviation + * + * Calculates the average and standard deviation of a number of + * profiling runs, and places the results in the locations + * provided by @ave_p and @std_p. Either @ave_p and @std_p may + * be NULL, in which case the values will not be written. + */ +void +orc_profile_get_ave_std (OrcProfile *prof, double *ave_p, double *std_p) +{ + double ave; + double std; + int max_i; + double off; + double s; + double s2; + int i; + int n; + double x; + + do { + s = s2 = 0; + n = 0; + max_i = -1; + for(i=0;i<10;i++){ + x = prof->hist_time[i]; + s2 += x * x * prof->hist_count[i]; + s += x * prof->hist_count[i]; + n += prof->hist_count[i]; + if (prof->hist_count[i] > 0) { + if (max_i == -1 || prof->hist_time[i] > prof->hist_time[max_i]) { + max_i = i; + } + } + } + + ave = s / n; + std = sqrt (s2 - s * s / n + n*n) / (n-1); + off = (prof->hist_time[max_i] - ave)/std; + + if (off > 4.0) { + prof->hist_count[max_i] = 0; + } + } while (off > 4.0); + + if (ave_p) *ave_p = ave; + if (std_p) *std_p = std; +} + + +static unsigned long +oil_profile_stamp_default (void) +{ +#if defined(__GNUC__) && (defined(HAVE_I386) || defined(HAVE_AMD64)) + unsigned long ts; + __asm__ __volatile__("rdtsc\n" : "=a" (ts) : : "edx"); + return ts; +#elif defined(__GNUC__) && defined(HAVE_ARM) && defined(USE_CORTEX_A8_COUNTER) + unsigned int ts; + //__asm__ __volatile__(" mrc p14, 0, %0, c1, c0, 0 \n" : "=r" (ts)); + __asm__ __volatile__(" mrc p15, 0, %0, c9, c13, 0 \n" : "=r" (ts)); + return ts; +#elif defined(_MSC_VER) && defined(HAVE_I386) + unsigned long ts; + __asm push edx + __asm __emit 0fh __asm __emit 031h + __asm mov ts, eax + __asm pop edx +#elif defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK) + struct timespec ts; + clock_gettime (CLOCK_MONOTONIC, &ts); + return 1000000000*ts.tv_sec + ts.tv_nsec; +#elif defined(HAVE_GETTIMEOFDAY) + struct timeval tv; + gettimeofday(&tv,NULL); + return 1000000*(unsigned long)tv.tv_sec + (unsigned long)tv.tv_usec; +#else + return 0; +#endif +} + +static unsigned long (*_orc_profile_stamp)(void) = oil_profile_stamp_default; + +/** + * orc_profile_stamp: + * + * Creates a timestamp based on a CPU-specific high-frequency + * counter, if available. + * + * Returns: a timestamp + */ +unsigned long +orc_profile_stamp (void) +{ + return _orc_profile_stamp(); +} + +void +_orc_profile_init (void) +{ + +} + diff --git a/orc-test/orcprofile.h b/orc-test/orcprofile.h new file mode 100644 index 0000000..277fd59 --- /dev/null +++ b/orc-test/orcprofile.h @@ -0,0 +1,94 @@ +/* + * Orc - Oil Runtime Compiler + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ORC_PROFILE_H_ +#define _ORC_PROFILE_H_ + +#include + +ORC_BEGIN_DECLS + +/** + * ORC_PROFILE_HIST_LENGTH + * + * Internal definition of the number of histogram entries in #OrcProfile. + */ +#define ORC_PROFILE_HIST_LENGTH 10 + +typedef struct _OrcProfile OrcProfile; +/** + * OrcProfile: + * + * An opaque structure representing profiling information. + */ +struct _OrcProfile { + /*< private >*/ + unsigned long start; + unsigned long stop; + unsigned long min; + unsigned long last; + unsigned long total; + int n; + + int hist_n; + unsigned long hist_time[ORC_PROFILE_HIST_LENGTH]; + int hist_count[ORC_PROFILE_HIST_LENGTH]; +}; + +unsigned long orc_profile_stamp(void); +void orc_profile_init(OrcProfile *prof); +void orc_profile_stop_handle(OrcProfile *prof); +void orc_profile_get_ave_std (OrcProfile *prof, double *ave_p, double *std_p); + +/** + * orc_profile_start: + * @x: a pointer to an OrcProfile structure + * + * Starts a profiling run by obtaining a timestamp via orc_profile_stamp() + * and writing it into @x. + */ +#define orc_profile_start(x) do{ \ + (x)->start = orc_profile_stamp(); \ +}while(0) +/** + * orc_profile_stop: + * @x: a pointer to an OrcProfile structure + * + * Stops a profiling run by obtaining a timestamp via orc_profile_stamp() + * and writing it into @x. It then calls orc_profile_stop_handle() to + * handle post-processing of the profiling run. + */ +#define orc_profile_stop(x) do{ \ + (x)->stop = orc_profile_stamp(); \ + orc_profile_stop_handle(x); \ +}while(0) + + +ORC_END_DECLS + +#endif + diff --git a/orc-test/orcrandom.c b/orc-test/orcrandom.c new file mode 100644 index 0000000..0f53963 --- /dev/null +++ b/orc-test/orcrandom.c @@ -0,0 +1,47 @@ + +#include "config.h" + +#include +#include +#include +#include + + + +void +orc_random_init (OrcRandomContext *context, int seed) +{ + + context->x = seed; + +} + + + +void +orc_random_bits (OrcRandomContext *context, void *data, int n_bytes) +{ + orc_uint8 *d = data; + int i; + for(i=0;ix = 1103515245*context->x + 12345; + d[i] = context->x>>16; + } +} + +void +orc_random_floats (OrcRandomContext *context, float *data, int n) +{ + int i; + for(i=0;ix = 1103515245*context->x + 12345; + data[i] = (double)(context->x>>16) / 32768.0 - 1.0; + } +} + +unsigned int +orc_random (OrcRandomContext *context) +{ + context->x = 1103515245*context->x + 12345; + return context->x; +} diff --git a/orc-test/orcrandom.h b/orc-test/orcrandom.h new file mode 100644 index 0000000..757b982 --- /dev/null +++ b/orc-test/orcrandom.h @@ -0,0 +1,22 @@ + +#ifndef _ORC_RANDOM_H_ +#define _ORC_RANDOM_H_ + +#include + +ORC_BEGIN_DECLS + +typedef struct _OrcRandomContext OrcRandomContext; +struct _OrcRandomContext { + unsigned int x; +}; + +void orc_random_init (OrcRandomContext *context, int seed); +void orc_random_bits (OrcRandomContext *context, void *data, int n_bytes); +void orc_random_floats (OrcRandomContext *context, float *data, int n); +unsigned int orc_random (OrcRandomContext *context); + +ORC_END_DECLS + +#endif + diff --git a/orc-test/orctest.c b/orc-test/orctest.c new file mode 100644 index 0000000..0feba6d --- /dev/null +++ b/orc-test/orctest.c @@ -0,0 +1,1039 @@ + +#include "config.h" + +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + +#ifdef _MSC_VER +#define isnan(x) _isnan(x) +#endif + +#define MIN_NONDENORMAL (1.1754944909521339405e-38) + +void _orc_profile_init(void); + +OrcRandomContext rand_context; + +void +orc_test_init (void) +{ + orc_init (); + + setvbuf (stdout, NULL, _IONBF, 0); + + orc_random_init (&rand_context, 0x12345678); + _orc_profile_init (); +} + + +OrcTestResult +orc_test_gcc_compile (OrcProgram *p) +{ + char cmd[200]; + char *base; + char source_filename[100]; + char obj_filename[100]; + char dis_filename[100]; + char dump_filename[100]; + char dump_dis_filename[100]; + int ret; + FILE *file; + OrcCompileResult result; + OrcTarget *target; + unsigned int flags; + + base = "temp-orc-test"; + + sprintf(source_filename, "%s-source.s", base); + sprintf(obj_filename, "%s.o", base); + sprintf(dis_filename, "%s-source.dis", base); + sprintf(dump_filename, "%s-dump.bin", base); + sprintf(dump_dis_filename, "%s-dump.dis", base); + + target = orc_target_get_default (); + flags = orc_target_get_default_flags (target); + flags |= ORC_TARGET_CLEAN_COMPILE; + if (strcmp (orc_target_get_name (target), "sse") == 0) { + flags |= ORC_TARGET_SSE_SHORT_JUMPS; + } + if (strcmp (orc_target_get_name (target), "mmx") == 0) { + flags |= ORC_TARGET_MMX_SHORT_JUMPS; + } + + result = orc_program_compile_full (p, target, flags); + if (ORC_COMPILE_RESULT_IS_FATAL(result)) { + return ORC_TEST_FAILED; + } + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return ORC_TEST_INDETERMINATE; + } + + fflush (stdout); + + file = fopen (source_filename, "w"); + fprintf(file, "%s", orc_program_get_asm_code (p)); + fclose (file); + + file = fopen (dump_filename, "w"); + ret = fwrite(p->orccode->code, p->orccode->code_size, 1, file); + fclose (file); + +#if defined(HAVE_POWERPC) + sprintf (cmd, "gcc -Wa,-mregnames -Wall -c %s -o %s", source_filename, + obj_filename); +#else + sprintf (cmd, "gcc -Wall -c %s -o %s", source_filename, + obj_filename); +#endif + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("gcc failed"); + printf("%s\n", orc_program_get_asm_code (p)); + return ORC_TEST_FAILED; + } + +#if 0 + sprintf (cmd, "objdump -dr %s | sed 's/^[ 0-9a-f]*:/XXX:/' >%s", obj_filename, dis_filename); +#else + sprintf (cmd, "objdump -dr %s >%s", obj_filename, dis_filename); +#endif + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("objdump failed"); + return ORC_TEST_FAILED; + } + + sprintf (cmd, "objcopy -I binary " +#ifdef HAVE_I386 + "-O elf32-i386 -B i386 " +#elif defined(HAVE_AMD64) + "-O elf64-x86-64 -B i386 " +#elif defined(HAVE_POWERPC) + "-O elf32-powerpc -B powerpc " +#else + /* FIXME */ +#endif + "--rename-section .data=.text " + "--redefine-sym _binary_temp_orc_test_dump_bin_start=%s " + "%s %s", p->name, dump_filename, obj_filename); + ret = system (cmd); + if (ret != 0) { + printf("objcopy failed\n"); + return ORC_TEST_FAILED; + } + +#if 0 + sprintf (cmd, "objdump -Dr %s | sed 's/^[ 0-9a-f]*:/XXX:/' >%s", obj_filename, dump_dis_filename); +#else + sprintf (cmd, "objdump -Dr %s >%s", obj_filename, dump_dis_filename); +#endif + ret = system (cmd); + if (ret != 0) { + printf("objdump failed\n"); + return ORC_TEST_FAILED; + } + + sprintf (cmd, "diff -u %s %s", dis_filename, dump_dis_filename); + ret = system (cmd); + if (ret != 0) { + printf("diff failed\n"); + return ORC_TEST_FAILED; + } + + remove (source_filename); + remove (obj_filename); + remove (dis_filename); + remove (dump_filename); + remove (dump_dis_filename); + + return ORC_TEST_OK; +} + + +#define PREFIX "/opt/arm-2008q3/bin/arm-none-linux-gnueabi-" + +OrcTestResult +orc_test_gcc_compile_neon (OrcProgram *p) +{ + char cmd[300]; + char *base; + char source_filename[100]; + char obj_filename[100]; + char dis_filename[100]; + char dump_filename[100]; + char dump_dis_filename[100]; + int ret; + FILE *file; + OrcCompileResult result; + OrcTarget *target; + unsigned int flags; + + base = "temp-orc-test"; + + sprintf(source_filename, "%s-source.s", base); + sprintf(obj_filename, "%s.o", base); + sprintf(dis_filename, "%s-source.dis", base); + sprintf(dump_filename, "%s-dump.bin", base); + sprintf(dump_dis_filename, "%s-dump.dis", base); + + target = orc_target_get_by_name ("neon"); + flags = orc_target_get_default_flags (target); + flags |= ORC_TARGET_CLEAN_COMPILE; + + result = orc_program_compile_full (p, target, flags); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return ORC_TEST_INDETERMINATE; + } + + fflush (stdout); + + file = fopen (source_filename, "w"); + fprintf(file, "%s", orc_program_get_asm_code (p)); + fclose (file); + + file = fopen (dump_filename, "w"); + ret = fwrite(p->orccode->code, p->orccode->code_size, 1, file); + fclose (file); + + sprintf (cmd, PREFIX "gcc -march=armv6t2 -mcpu=cortex-a8 -mfpu=neon -Wall " + "-c %s -o %s", source_filename, obj_filename); + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("arm gcc failed"); + return ORC_TEST_INDETERMINATE; + } + + sprintf (cmd, PREFIX "objdump -dr %s >%s", obj_filename, dis_filename); + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("objdump failed"); + return ORC_TEST_INDETERMINATE; + } + + sprintf (cmd, PREFIX "objcopy -I binary " + "-O elf32-littlearm -B arm " + "--rename-section .data=.text " + "--redefine-sym _binary_temp_orc_test_dump_bin_start=%s " + "%s %s", p->name, dump_filename, obj_filename); + ret = system (cmd); + if (ret != 0) { + printf("objcopy failed\n"); + return ORC_TEST_INDETERMINATE; + } + + sprintf (cmd, PREFIX "objdump -Dr %s >%s", obj_filename, dump_dis_filename); + ret = system (cmd); + if (ret != 0) { + printf("objdump failed\n"); + return ORC_TEST_INDETERMINATE; + } + + sprintf (cmd, "diff -u %s %s", dis_filename, dump_dis_filename); + ret = system (cmd); + if (ret != 0) { + printf("diff failed\n"); + return ORC_TEST_FAILED; + } + + remove (source_filename); + remove (obj_filename); + remove (dis_filename); + remove (dump_filename); + remove (dump_dis_filename); + + return ORC_TEST_OK; +} + +#define C64X_PREFIX "/opt/TI/TI_CGT_C6000_6.1.12/bin/" + +OrcTestResult +orc_test_gcc_compile_c64x (OrcProgram *p) +{ + char cmd[300]; + char *base; + char source_filename[100]; + char obj_filename[100]; + char dis_filename[100]; + char dump_filename[100]; + char dump_dis_filename[100]; + int ret; + FILE *file; + OrcCompileResult result; + OrcTarget *target; + unsigned int flags; + + base = "temp-orc-test"; + + sprintf(source_filename, "%s-source.s", base); + sprintf(obj_filename, "%s-source.obj", base); + sprintf(dis_filename, "%s-source.dis", base); + sprintf(dump_filename, "%s-dump.bin", base); + sprintf(dump_dis_filename, "%s-dump.dis", base); + + target = orc_target_get_by_name ("c64x"); + flags = orc_target_get_default_flags (target); + + result = orc_program_compile_full (p, target, flags); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return ORC_TEST_INDETERMINATE; + } + + fflush (stdout); + + file = fopen (source_filename, "w"); + fprintf(file, "%s", orc_program_get_asm_code (p)); + fclose (file); + + file = fopen (dump_filename, "w"); + ret = fwrite(p->orccode->code, p->orccode->code_size, 1, file); + fclose (file); + + sprintf (cmd, C64X_PREFIX "cl6x -mv=6400+ " + "-c %s", source_filename); + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("compiler failed"); + //printf("%s\n", orc_program_get_asm_code (p)); + return ORC_TEST_INDETERMINATE; + } + + sprintf (cmd, C64X_PREFIX "dis6x %s >%s", obj_filename, dis_filename); + ret = system (cmd); + if (ret != 0) { + ORC_ERROR ("objdump failed"); + return ORC_TEST_INDETERMINATE; + } + +#if 0 + sprintf (cmd, C64X_PREFIX "objcopy -I binary " + "-O elf32-littlearm -B arm " + "--rename-section .data=.text " + "--redefine-sym _binary_temp_orc_test_dump_bin_start=%s " + "%s %s", p->name, dump_filename, obj_filename); + ret = system (cmd); + if (ret != 0) { + printf("objcopy failed\n"); + return ORC_TEST_FAILED; + } +#endif + +#if 0 + sprintf (cmd, C64X_PREFIX "dis6x %s >%s", dump_filename, dump_dis_filename); + ret = system (cmd); + if (ret != 0) { + printf("objdump failed\n"); + return ORC_TEST_FAILED; + } + + sprintf (cmd, "diff -u %s %s", dis_filename, dump_dis_filename); + ret = system (cmd); + if (ret != 0) { + printf("diff failed\n"); + return ORC_TEST_FAILED; + } +#endif + + remove (source_filename); + remove (obj_filename); + remove (dis_filename); + remove (dump_filename); + remove (dump_dis_filename); + + return ORC_TEST_OK; +} + +void +orc_test_random_bits (void *data, int n_bytes) +{ +#if 1 + orc_uint8 *d = data; + int i; + for(i=0;idata, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %4d", *(orc_int8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %5d", *(orc_int16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %10d", *(orc_int32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} + +#ifdef unused +static orc_uint64 +print_array_val_unsigned (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %4u", *(orc_uint8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %5u", *(orc_uint16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %10u", *(orc_uint32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} +#endif + +static orc_uint64 +print_array_val_hex (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %02x", *(orc_uint8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %04x", *(orc_uint16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %08x", *(orc_uint32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} + +static orc_uint64 +print_array_val_float (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 4: + if (isnan(*(float *)ptr)) { + printf(" nan %08x", *(orc_uint32 *)ptr); + /* This is to get around signaling/non-signaling nans in the output */ + return (*(orc_uint32 *)ptr) & 0xffbfffff; + } else { + printf(" %12.5g", *(float *)ptr); + return *(orc_int32 *)ptr; + } + case 8: + printf(" %12.5g", *(double *)ptr); + return *(orc_int64 *)ptr; + default: + printf(" ERROR"); + return -1; + } +} + +int +float_compare (OrcArray *array1, OrcArray *array2, int i, int j) +{ + void *ptr1 = ORC_PTR_OFFSET (array1->data, + i*array1->element_size + j*array1->stride); + void *ptr2 = ORC_PTR_OFFSET (array2->data, + i*array2->element_size + j*array2->stride); + + switch (array1->element_size) { + case 4: + if (isnan(*(float *)ptr1) && isnan(*(float *)ptr2)) return TRUE; + if (*(float *)ptr1 == *(float *)ptr2) return TRUE; + if (fabs(*(float *)ptr1 - *(float *)ptr2) < MIN_NONDENORMAL) return TRUE; + return FALSE; + case 8: + /* FIXME */ + return FALSE; + } + return FALSE; +} + +OrcTestResult +orc_test_compare_output (OrcProgram *program) +{ + return orc_test_compare_output_full (program, 0); +} + +OrcTestResult +orc_test_compare_output_backup (OrcProgram *program) +{ + return orc_test_compare_output_full (program, ORC_TEST_FLAGS_BACKUP); +} + + +OrcTestResult +orc_test_compare_output_full (OrcProgram *program, int flags) +{ + OrcExecutor *ex; + int n; + int m; + OrcArray *dest_exec[4] = { NULL, NULL, NULL, NULL }; + OrcArray *dest_emul[4] = { NULL, NULL, NULL, NULL }; + OrcArray *src[8] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + int i; + int j; + int k; + int have_dest = FALSE; + OrcCompileResult result; + int have_acc = FALSE; + int acc_exec = 0, acc_emul = 0; + int ret = ORC_TEST_OK; + int bad = 0; + int misalignment; + + ORC_DEBUG ("got here"); + + { + OrcTarget *target; + unsigned int flags; + + target = orc_target_get_default (); + flags = orc_target_get_default_flags (target); + + result = orc_program_compile_full (program, target, flags); + if (ORC_COMPILE_RESULT_IS_FATAL(result)) { + ret = ORC_TEST_FAILED; + goto out; + } + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + ret = ORC_TEST_INDETERMINATE; + goto out; + } + } + + if (program->constant_n > 0) { + n = program->constant_n; + } else { + n = 64 + (orc_random(&rand_context)&0xf); + } + + ex = orc_executor_new (program); + orc_executor_set_n (ex, n); + if (program->is_2d) { + if (program->constant_m > 0) { + m = program->constant_m; + } else { + m = 8 + (orc_random(&rand_context)&0xf); + } + } else { + m = 1; + } + orc_executor_set_m (ex, m); + ORC_DEBUG("size %d %d", ex->n, ex->params[ORC_VAR_A1]); + + misalignment = 0; + for(i=0;ivars[i].name == NULL) continue; + + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC) { + src[i-ORC_VAR_S1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_random (src[i-ORC_VAR_S1], &rand_context); + misalignment++; + } else if (program->vars[i].vartype == ORC_VAR_TYPE_DEST) { + dest_exec[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_pattern (dest_exec[i], ORC_OOB_VALUE); + dest_emul[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_pattern (dest_emul[i], ORC_OOB_VALUE); + misalignment++; + } else if (program->vars[i].vartype == ORC_VAR_TYPE_PARAM) { + switch (program->vars[i].param_type) { + case ORC_PARAM_TYPE_INT: + orc_executor_set_param (ex, i, 2); + break; + case ORC_PARAM_TYPE_FLOAT: + orc_executor_set_param_float (ex, i, 2.0); + break; + case ORC_PARAM_TYPE_INT64: + orc_executor_set_param_int64 (ex, i, 2); + break; + case ORC_PARAM_TYPE_DOUBLE: + orc_executor_set_param_double (ex, i, 2.0); + break; + } + } + } + + for(i=0;ivars[i].vartype == ORC_VAR_TYPE_DEST) { + orc_executor_set_array (ex, i, dest_exec[i-ORC_VAR_D1]->data); + orc_executor_set_stride (ex, i, dest_exec[i-ORC_VAR_D1]->stride); + have_dest = TRUE; + } + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC) { + orc_executor_set_array (ex, i, src[i-ORC_VAR_S1]->data); + orc_executor_set_stride (ex, i, src[i-ORC_VAR_S1]->stride); + } + } + ORC_DEBUG ("running"); + if (flags & ORC_TEST_FLAGS_BACKUP) { + orc_executor_run_backup (ex); + } else { + orc_executor_run (ex); + } + ORC_DEBUG ("done running"); + for(i=0;ivars[i].vartype == ORC_VAR_TYPE_ACCUMULATOR) { + acc_exec = ex->accumulators[0]; + have_acc = TRUE; + } + } + + for(i=0;ivars[i].vartype == ORC_VAR_TYPE_DEST) { + orc_executor_set_array (ex, i, dest_emul[i]->data); + orc_executor_set_stride (ex, i, dest_emul[i]->stride); + } + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC) { + ORC_DEBUG("setting array %p", src[i-ORC_VAR_S1]->data); + orc_executor_set_array (ex, i, src[i-ORC_VAR_S1]->data); + orc_executor_set_stride (ex, i, src[i-ORC_VAR_S1]->stride); + } + } + orc_executor_emulate (ex); + for(i=0;ivars[i].vartype == ORC_VAR_TYPE_ACCUMULATOR) { + acc_emul = ex->accumulators[0]; + } + } + + for(k=ORC_VAR_D1;kvars[k].size > 0) { + if (!orc_array_compare (dest_exec[k-ORC_VAR_D1], dest_emul[k-ORC_VAR_D1], flags)) { + printf("dest array %d bad\n", k); + bad = TRUE; + } + if (!orc_array_check_out_of_bounds (dest_exec[k-ORC_VAR_D1])) { + printf("out of bounds failure\n"); + + ret = ORC_TEST_FAILED; + } + } + } + if (bad) { + for(j=0;jvars[l].size > 0) { + if (flags & ORC_TEST_FLAGS_FLOAT) { + print_array_val_float (src[l-ORC_VAR_S1], i, j); + } else { + print_array_val_hex (src[l-ORC_VAR_S1], i, j); + } + } + } + + printf(" ->"); + for(l=ORC_VAR_D1;lvars[l].size > 0) { + if (flags & ORC_TEST_FLAGS_FLOAT) { + a = print_array_val_float (dest_emul[l-ORC_VAR_D1], i, j); + b = print_array_val_float (dest_exec[l-ORC_VAR_D1], i, j); + if (!float_compare (dest_emul[l-ORC_VAR_D1], dest_exec[l-ORC_VAR_D1], i, j) != 0) { + line_bad = TRUE; + } + } else { + a = print_array_val_hex (dest_emul[l-ORC_VAR_D1], i, j); + b = print_array_val_hex (dest_exec[l-ORC_VAR_D1], i, j); + if (a != b) { + line_bad = TRUE; + } + } + } + } + + if (line_bad) { + printf(" *"); + } + + printf("\n"); + } + } + + ret = ORC_TEST_FAILED; + } + + if (have_acc) { + if (acc_emul != acc_exec) { + for(j=0;jvars[k].name == NULL) continue; + if (program->vars[k].vartype == ORC_VAR_TYPE_SRC && + program->vars[k].size > 0) { + if (flags & ORC_TEST_FLAGS_FLOAT) { + print_array_val_float (src[k-ORC_VAR_S1], i, j); + } else { + print_array_val_signed (src[k-ORC_VAR_S1], i, j); + } + } + } + + printf(" -> acc\n"); + } + } + printf("acc %d %d\n", acc_emul, acc_exec); + ret = ORC_TEST_FAILED; + } + } + + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (program)); + } + + for(i=0;i<4;i++){ + if (dest_exec[i]) orc_array_free (dest_exec[i]); + if (dest_emul[i]) orc_array_free (dest_emul[i]); + } + for(i=0;i<8;i++){ + if (src[i]) orc_array_free (src[i]); + } + + orc_executor_free (ex); + +out: + orc_program_reset (program); + + return ret; +} + +OrcProgram * +orc_test_get_program_for_opcode (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int flags = 0; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + if (opcode->src_size[1] == 0) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[0], 1, "c1"); + } else { + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[1], 1, "c1"); + if (opcode->src_size[2] != 0) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[1], 1, "c1"); + } + } + } else { + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + return p; +} + +OrcProgram * +orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int args[4] = { -1, -1, -1, -1 }; + int flags; + int n_args = 0; + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + if (opcode->src_size[1] == 0) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[0], 1, "c1"); + } else { + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[1], 1, "c1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[2], 1, "c2"); + } + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_const_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + return p; +} + +OrcProgram * +orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int args[4] = { -1, -1, -1, -1 }; + int flags; + int n_args = 0; + + if (opcode->src_size[1] == 0) { + return NULL; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[1], "p1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[2], "p2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_p_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + return p; +} + +void +orc_test_performance (OrcProgram *program, int flags) +{ + orc_test_performance_full (program, flags, NULL); +} + +double +orc_test_performance_full (OrcProgram *program, int flags, + const char *target_name) +{ + OrcExecutor *ex; + int n; + int m; + OrcArray *dest_exec[4] = { NULL, NULL, NULL, NULL }; + OrcArray *dest_emul[4] = { NULL, NULL, NULL, NULL }; + OrcArray *src[8] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + int i, j; + OrcCompileResult result; + OrcProfile prof; + double ave, std; + OrcTarget *target; + int misalignment; + + ORC_DEBUG ("got here"); + + target = orc_target_get_by_name (target_name); + + if (!(flags & ORC_TEST_FLAGS_BACKUP)) { + unsigned int flags; + + flags = orc_target_get_default_flags (target); + + result = orc_program_compile_full (program, target, flags); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + //printf("compile failed\n"); + orc_program_reset (program); + return 0; + } + } + + if (program->constant_n > 0) { + n = program->constant_n; + } else { + //n = 64 + (orc_random(&rand_context)&0xf); + n = 1000; + } + + ex = orc_executor_new (program); + orc_executor_set_n (ex, n); + if (program->is_2d) { + if (program->constant_m > 0) { + m = program->constant_m; + } else { + m = 8 + (orc_random(&rand_context)&0xf); + } + } else { + m = 1; + } + orc_executor_set_m (ex, m); + ORC_DEBUG("size %d %d", ex->n, ex->params[ORC_VAR_A1]); + + misalignment = 0; + for(i=0;ivars[i].name == NULL) continue; + + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC) { + src[i-ORC_VAR_S1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_random (src[i-ORC_VAR_S1], &rand_context); + misalignment++; + } else if (program->vars[i].vartype == ORC_VAR_TYPE_DEST) { + dest_exec[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_pattern (dest_exec[i], ORC_OOB_VALUE); + dest_emul[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size, + misalignment); + orc_array_set_pattern (dest_emul[i], ORC_OOB_VALUE); + misalignment++; + } else if (program->vars[i].vartype == ORC_VAR_TYPE_PARAM) { + orc_executor_set_param (ex, i, 2); + } + } + + ORC_DEBUG ("running"); + orc_profile_init (&prof); + for(i=0;i<10;i++){ + orc_executor_set_n (ex, n); + orc_executor_set_m (ex, m); + for(j=0;jvars[j].vartype == ORC_VAR_TYPE_DEST) { + orc_executor_set_array (ex, j, dest_exec[j-ORC_VAR_D1]->data); + orc_executor_set_stride (ex, j, dest_exec[j-ORC_VAR_D1]->stride); + } + if (program->vars[j].vartype == ORC_VAR_TYPE_SRC) { + orc_executor_set_array (ex, j, src[j-ORC_VAR_S1]->data); + orc_executor_set_stride (ex, j, src[j-ORC_VAR_S1]->stride); + } + } + if (flags & ORC_TEST_FLAGS_BACKUP) { + orc_profile_start (&prof); + orc_executor_run_backup (ex); + orc_profile_stop (&prof); + } else if (flags & ORC_TEST_FLAGS_EMULATE) { + orc_profile_start (&prof); + orc_executor_emulate (ex); + orc_profile_stop (&prof); + } else { + orc_profile_start (&prof); + orc_executor_run (ex); + orc_profile_stop (&prof); + } + } + ORC_DEBUG ("done running"); + + orc_profile_get_ave_std (&prof, &ave, &std); + + for(i=0;i<4;i++){ + if (dest_exec[i]) orc_array_free (dest_exec[i]); + if (dest_emul[i]) orc_array_free (dest_emul[i]); + } + for(i=0;i<8;i++){ + if (src[i]) orc_array_free (src[i]); + } + + orc_executor_free (ex); + orc_program_reset (program); + + return ave/(n*m); +} + diff --git a/orc-test/orctest.h b/orc-test/orctest.h new file mode 100644 index 0000000..53d15c9 --- /dev/null +++ b/orc-test/orctest.h @@ -0,0 +1,40 @@ + +#ifndef _ORC_TEST_TEST_H_ +#define _ORC_TEST_TEST_H_ + +#include +#include + +ORC_BEGIN_DECLS + +typedef enum { + ORC_TEST_FAILED = 0, + ORC_TEST_INDETERMINATE = 1, + ORC_TEST_OK = 2 +} OrcTestResult; + +#define ORC_TEST_FLAGS_BACKUP (1<<0) +#define ORC_TEST_FLAGS_FLOAT (1<<1) +#define ORC_TEST_FLAGS_EMULATE (1<<2) + +void orc_test_init (void); +OrcTestResult orc_test_gcc_compile (OrcProgram *p); +OrcTestResult orc_test_gcc_compile_neon (OrcProgram *p); +OrcTestResult orc_test_gcc_compile_c64x (OrcProgram *p); +void orc_test_random_bits (void *data, int n_bytes); +OrcTestResult orc_test_compare_output (OrcProgram *program); +OrcTestResult orc_test_compare_output_full (OrcProgram *program, int flags); +OrcTestResult orc_test_compare_output_backup (OrcProgram *program); + +OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode); +OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode); +OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode); + +void orc_test_performance (OrcProgram *program, int flags); +double orc_test_performance_full (OrcProgram *program, int flags, + const char *target); + +ORC_END_DECLS + +#endif + diff --git a/orc-uninstalled.pc.in b/orc-uninstalled.pc.in new file mode 100644 index 0000000..7c18fc4 --- /dev/null +++ b/orc-uninstalled.pc.in @@ -0,0 +1,12 @@ +prefix= +exec_prefix= +libdir=${pcfiledir}/orc/ +includedir=${pcfiledir}/ + +Name: orc-@ORC_MAJORMINOR@ uninstalled +Description: Library of Optimized Inner Loops Runtime Compiler +Version: @VERSION@ +Libs: -L${libdir} -lorc-@ORC_MAJORMINOR@ @LIBM@ @LIBRT@ +Cflags: -I${includedir} + +orcc=${pcfiledir}/tools/orcc@EXEEXT@ diff --git a/orc.pc.in b/orc.pc.in new file mode 100644 index 0000000..eb8a280 --- /dev/null +++ b/orc.pc.in @@ -0,0 +1,16 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/orc-@ORC_MAJORMINOR@ +toolsdir=${exec_prefix}/bin + + +Name: orc-@ORC_MAJORMINOR@ +Description: Library of Optimized Inner Loops Runtime Compiler +Version: @VERSION@ +Libs: -L${libdir} -lorc-@ORC_MAJORMINOR@ +Libs.private: @LIBM@ @LIBRT@ +Cflags: -I${includedir} + +orcc=${toolsdir}/orcc@EXEEXT@ + diff --git a/orc/Makefile.am b/orc/Makefile.am new file mode 100644 index 0000000..32b9252 --- /dev/null +++ b/orc/Makefile.am @@ -0,0 +1,106 @@ + +pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc + +lib_LTLIBRARIES = liborc-@ORC_MAJORMINOR@.la + +liborc_@ORC_MAJORMINOR@_la_LIBADD = $(LIBM) $(LIBRT) +liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ + -version-info $(ORC_LIBVERSION) \ + -no-undefined -export-symbols-regex 'orc_' +liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ + -DORC_ENABLE_UNSTABLE_API + +liborc_@ORC_MAJORMINOR@_la_SOURCES = \ + orc.c \ + orcemulateopcodes.c \ + orcexecutor.c \ + orcfunctions.c \ + orcutils.c \ + orcrule.c \ + orccodemem.c \ + orcprogram.c \ + orccompiler.c \ + orcprogram-c.c \ + orcprogram.h \ + orcopcodes.c \ + orcparse.c \ + orconce.c \ + orcdebug.c \ + orccode.c + +if ENABLE_BACKEND_SSE +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcsse.c orcrules-sse.c orcprogram-sse.c +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcx86.c +endif +if ENABLE_BACKEND_MMX +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcmmx.c orcrules-mmx.c orcprogram-mmx.c +if ENABLE_BACKEND_SSE +else +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcx86.c +endif +endif +if ENABLE_BACKEND_ALTIVEC +liborc_@ORC_MAJORMINOR@_la_SOURCES += \ + orcrules-altivec.c orcprogram-altivec.c orcpowerpc.c +endif +if ENABLE_BACKEND_NEON +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcprogram-neon.c orcrules-neon.c +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcarm.c +endif +if ENABLE_BACKEND_ARM +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcprogram-arm.c orcrules-arm.c +if ENABLE_BACKEND_NEON +else +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcarm.c +endif +endif +if ENABLE_BACKEND_C64X +liborc_@ORC_MAJORMINOR@_la_SOURCES += orcprogram-c64x-c.c +endif + +if HAVE_I386 +liborc_@ORC_MAJORMINOR@_la_SOURCES += orccpu-x86.c +endif +if HAVE_AMD64 +liborc_@ORC_MAJORMINOR@_la_SOURCES += orccpu-x86.c +endif +if HAVE_POWERPC +liborc_@ORC_MAJORMINOR@_la_SOURCES += orccpu-powerpc.c +endif +if HAVE_ARM +liborc_@ORC_MAJORMINOR@_la_SOURCES += orccpu-arm.c +endif + +pkginclude_HEADERS = \ + orc.h \ + orcdebug.h \ + orcprogram.h \ + orcemulateopcodes.h \ + orcfunctions.h \ + orcutils.h \ + orcparse.h \ + opcodes.h \ + orconce.h \ + orcsse.h \ + orcmmx.h \ + orcneon.h \ + orcx86.h \ + orcpowerpc.h \ + orcarm.h + +nodist_pkginclude_HEADERS = orc-stdint.h + +DISTCLEANFILES = orc-stdint.h + +noinst_PROGRAMS = generate-emulation + +generate_emulation_LDADD = $(ORC_LIBS) +generate_emulation_CFLAGS = $(ORC_CFLAGS) +generate_emulation_DEPENDENCIES = $(builddir)/liborc-0.4.la + +update: generate-emulation + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o orcfunctions.c orcfunctions.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o orcfunctions.h orcfunctions.orc + ./generate-emulation$(EXEEXT) -o orcemulateopcodes.c + ./generate-emulation$(EXEEXT) --header -o orcemulateopcodes.h + diff --git a/orc/Makefile.in b/orc/Makefile.in new file mode 100644 index 0000000..3822530 --- /dev/null +++ b/orc/Makefile.in @@ -0,0 +1,1019 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@ENABLE_BACKEND_SSE_TRUE@am__append_1 = orcsse.c orcrules-sse.c \ +@ENABLE_BACKEND_SSE_TRUE@ orcprogram-sse.c orcx86.c +@ENABLE_BACKEND_MMX_TRUE@am__append_2 = orcmmx.c orcrules-mmx.c orcprogram-mmx.c +@ENABLE_BACKEND_MMX_TRUE@@ENABLE_BACKEND_SSE_FALSE@am__append_3 = orcx86.c +@ENABLE_BACKEND_ALTIVEC_TRUE@am__append_4 = \ +@ENABLE_BACKEND_ALTIVEC_TRUE@ orcrules-altivec.c orcprogram-altivec.c orcpowerpc.c + +@ENABLE_BACKEND_NEON_TRUE@am__append_5 = orcprogram-neon.c \ +@ENABLE_BACKEND_NEON_TRUE@ orcrules-neon.c orcarm.c +@ENABLE_BACKEND_ARM_TRUE@am__append_6 = orcprogram-arm.c orcrules-arm.c +@ENABLE_BACKEND_ARM_TRUE@@ENABLE_BACKEND_NEON_FALSE@am__append_7 = orcarm.c +@ENABLE_BACKEND_C64X_TRUE@am__append_8 = orcprogram-c64x-c.c +@HAVE_I386_TRUE@am__append_9 = orccpu-x86.c +@HAVE_AMD64_TRUE@am__append_10 = orccpu-x86.c +@HAVE_POWERPC_TRUE@am__append_11 = orccpu-powerpc.c +@HAVE_ARM_TRUE@am__append_12 = orccpu-arm.c +noinst_PROGRAMS = generate-emulation$(EXEEXT) +subdir = orc +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" \ + "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +liborc_@ORC_MAJORMINOR@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__liborc_@ORC_MAJORMINOR@_la_SOURCES_DIST = orc.c \ + orcemulateopcodes.c orcexecutor.c orcfunctions.c orcutils.c \ + orcrule.c orccodemem.c orcprogram.c orccompiler.c \ + orcprogram-c.c orcprogram.h orcopcodes.c orcparse.c orconce.c \ + orcdebug.c orccode.c orcsse.c orcrules-sse.c orcprogram-sse.c \ + orcx86.c orcmmx.c orcrules-mmx.c orcprogram-mmx.c \ + orcrules-altivec.c orcprogram-altivec.c orcpowerpc.c \ + orcprogram-neon.c orcrules-neon.c orcarm.c orcprogram-arm.c \ + orcrules-arm.c orcprogram-c64x-c.c orccpu-x86.c \ + orccpu-powerpc.c orccpu-arm.c +@ENABLE_BACKEND_SSE_TRUE@am__objects_1 = \ +@ENABLE_BACKEND_SSE_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcsse.lo \ +@ENABLE_BACKEND_SSE_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo \ +@ENABLE_BACKEND_SSE_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo \ +@ENABLE_BACKEND_SSE_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcx86.lo +@ENABLE_BACKEND_MMX_TRUE@am__objects_2 = \ +@ENABLE_BACKEND_MMX_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcmmx.lo \ +@ENABLE_BACKEND_MMX_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo \ +@ENABLE_BACKEND_MMX_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo +@ENABLE_BACKEND_MMX_TRUE@@ENABLE_BACKEND_SSE_FALSE@am__objects_3 = liborc_@ORC_MAJORMINOR@_la-orcx86.lo +@ENABLE_BACKEND_ALTIVEC_TRUE@am__objects_4 = liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo \ +@ENABLE_BACKEND_ALTIVEC_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo \ +@ENABLE_BACKEND_ALTIVEC_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo +@ENABLE_BACKEND_NEON_TRUE@am__objects_5 = liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo \ +@ENABLE_BACKEND_NEON_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo \ +@ENABLE_BACKEND_NEON_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcarm.lo +@ENABLE_BACKEND_ARM_TRUE@am__objects_6 = liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo \ +@ENABLE_BACKEND_ARM_TRUE@ liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo +@ENABLE_BACKEND_ARM_TRUE@@ENABLE_BACKEND_NEON_FALSE@am__objects_7 = liborc_@ORC_MAJORMINOR@_la-orcarm.lo +@ENABLE_BACKEND_C64X_TRUE@am__objects_8 = liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo +@HAVE_I386_TRUE@am__objects_9 = \ +@HAVE_I386_TRUE@ liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo +@HAVE_AMD64_TRUE@am__objects_10 = \ +@HAVE_AMD64_TRUE@ liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo +@HAVE_POWERPC_TRUE@am__objects_11 = liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo +@HAVE_ARM_TRUE@am__objects_12 = \ +@HAVE_ARM_TRUE@ liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo +am_liborc_@ORC_MAJORMINOR@_la_OBJECTS = \ + liborc_@ORC_MAJORMINOR@_la-orc.lo \ + liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo \ + liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo \ + liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo \ + liborc_@ORC_MAJORMINOR@_la-orcutils.lo \ + liborc_@ORC_MAJORMINOR@_la-orcrule.lo \ + liborc_@ORC_MAJORMINOR@_la-orccodemem.lo \ + liborc_@ORC_MAJORMINOR@_la-orcprogram.lo \ + liborc_@ORC_MAJORMINOR@_la-orccompiler.lo \ + liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo \ + liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo \ + liborc_@ORC_MAJORMINOR@_la-orcparse.lo \ + liborc_@ORC_MAJORMINOR@_la-orconce.lo \ + liborc_@ORC_MAJORMINOR@_la-orcdebug.lo \ + liborc_@ORC_MAJORMINOR@_la-orccode.lo $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) +liborc_@ORC_MAJORMINOR@_la_OBJECTS = \ + $(am_liborc_@ORC_MAJORMINOR@_la_OBJECTS) +liborc_@ORC_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ + $(liborc_@ORC_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ +PROGRAMS = $(noinst_PROGRAMS) +generate_emulation_SOURCES = generate-emulation.c +generate_emulation_OBJECTS = \ + generate_emulation-generate-emulation.$(OBJEXT) +generate_emulation_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(generate_emulation_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(liborc_@ORC_MAJORMINOR@_la_SOURCES) generate-emulation.c +DIST_SOURCES = $(am__liborc_@ORC_MAJORMINOR@_la_SOURCES_DIST) \ + generate-emulation.c +HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgincludedir = $(includedir)/orc-@ORC_MAJORMINOR@/orc +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = liborc-@ORC_MAJORMINOR@.la +liborc_@ORC_MAJORMINOR@_la_LIBADD = $(LIBM) $(LIBRT) +liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ + -version-info $(ORC_LIBVERSION) \ + -no-undefined -export-symbols-regex 'orc_' + +liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ + -DORC_ENABLE_UNSTABLE_API + +liborc_@ORC_MAJORMINOR@_la_SOURCES = orc.c orcemulateopcodes.c \ + orcexecutor.c orcfunctions.c orcutils.c orcrule.c orccodemem.c \ + orcprogram.c orccompiler.c orcprogram-c.c orcprogram.h \ + orcopcodes.c orcparse.c orconce.c orcdebug.c orccode.c \ + $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) $(am__append_5) $(am__append_6) \ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_10) $(am__append_11) $(am__append_12) +pkginclude_HEADERS = \ + orc.h \ + orcdebug.h \ + orcprogram.h \ + orcemulateopcodes.h \ + orcfunctions.h \ + orcutils.h \ + orcparse.h \ + opcodes.h \ + orconce.h \ + orcsse.h \ + orcmmx.h \ + orcneon.h \ + orcx86.h \ + orcpowerpc.h \ + orcarm.h + +nodist_pkginclude_HEADERS = orc-stdint.h +DISTCLEANFILES = orc-stdint.h +generate_emulation_LDADD = $(ORC_LIBS) +generate_emulation_CFLAGS = $(ORC_CFLAGS) +generate_emulation_DEPENDENCIES = $(builddir)/liborc-0.4.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu orc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu orc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +liborc-@ORC_MAJORMINOR@.la: $(liborc_@ORC_MAJORMINOR@_la_OBJECTS) $(liborc_@ORC_MAJORMINOR@_la_DEPENDENCIES) + $(liborc_@ORC_MAJORMINOR@_la_LINK) -rpath $(libdir) $(liborc_@ORC_MAJORMINOR@_la_OBJECTS) $(liborc_@ORC_MAJORMINOR@_la_LIBADD) $(LIBS) + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +generate-emulation$(EXEEXT): $(generate_emulation_OBJECTS) $(generate_emulation_DEPENDENCIES) + @rm -f generate-emulation$(EXEEXT) + $(generate_emulation_LINK) $(generate_emulation_OBJECTS) $(generate_emulation_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_emulation-generate-emulation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcarm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccodemem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccompiler.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-x86.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcdebug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcexecutor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcfunctions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcmmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orconce.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcopcodes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcparse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcpowerpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcsse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcutils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcx86.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +liborc_@ORC_MAJORMINOR@_la-orc.lo: orc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orc.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orc.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orc.lo `test -f 'orc.c' || echo '$(srcdir)/'`orc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orc.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orc.c' object='liborc_@ORC_MAJORMINOR@_la-orc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orc.lo `test -f 'orc.c' || echo '$(srcdir)/'`orc.c + +liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo: orcemulateopcodes.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo `test -f 'orcemulateopcodes.c' || echo '$(srcdir)/'`orcemulateopcodes.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcemulateopcodes.c' object='liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcemulateopcodes.lo `test -f 'orcemulateopcodes.c' || echo '$(srcdir)/'`orcemulateopcodes.c + +liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo: orcexecutor.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcexecutor.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo `test -f 'orcexecutor.c' || echo '$(srcdir)/'`orcexecutor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcexecutor.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcexecutor.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcexecutor.c' object='liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcexecutor.lo `test -f 'orcexecutor.c' || echo '$(srcdir)/'`orcexecutor.c + +liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo: orcfunctions.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcfunctions.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo `test -f 'orcfunctions.c' || echo '$(srcdir)/'`orcfunctions.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcfunctions.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcfunctions.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcfunctions.c' object='liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcfunctions.lo `test -f 'orcfunctions.c' || echo '$(srcdir)/'`orcfunctions.c + +liborc_@ORC_MAJORMINOR@_la-orcutils.lo: orcutils.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcutils.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcutils.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcutils.lo `test -f 'orcutils.c' || echo '$(srcdir)/'`orcutils.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcutils.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcutils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcutils.c' object='liborc_@ORC_MAJORMINOR@_la-orcutils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcutils.lo `test -f 'orcutils.c' || echo '$(srcdir)/'`orcutils.c + +liborc_@ORC_MAJORMINOR@_la-orcrule.lo: orcrule.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrule.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrule.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrule.lo `test -f 'orcrule.c' || echo '$(srcdir)/'`orcrule.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrule.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrule.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrule.c' object='liborc_@ORC_MAJORMINOR@_la-orcrule.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrule.lo `test -f 'orcrule.c' || echo '$(srcdir)/'`orcrule.c + +liborc_@ORC_MAJORMINOR@_la-orccodemem.lo: orccodemem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccodemem.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccodemem.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccodemem.lo `test -f 'orccodemem.c' || echo '$(srcdir)/'`orccodemem.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccodemem.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccodemem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccodemem.c' object='liborc_@ORC_MAJORMINOR@_la-orccodemem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccodemem.lo `test -f 'orccodemem.c' || echo '$(srcdir)/'`orccodemem.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram.lo: orcprogram.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram.lo `test -f 'orcprogram.c' || echo '$(srcdir)/'`orcprogram.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram.lo `test -f 'orcprogram.c' || echo '$(srcdir)/'`orcprogram.c + +liborc_@ORC_MAJORMINOR@_la-orccompiler.lo: orccompiler.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccompiler.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccompiler.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccompiler.lo `test -f 'orccompiler.c' || echo '$(srcdir)/'`orccompiler.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccompiler.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccompiler.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccompiler.c' object='liborc_@ORC_MAJORMINOR@_la-orccompiler.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccompiler.lo `test -f 'orccompiler.c' || echo '$(srcdir)/'`orccompiler.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo: orcprogram-c.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo `test -f 'orcprogram-c.c' || echo '$(srcdir)/'`orcprogram-c.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-c.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-c.lo `test -f 'orcprogram-c.c' || echo '$(srcdir)/'`orcprogram-c.c + +liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo: orcopcodes.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcopcodes.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo `test -f 'orcopcodes.c' || echo '$(srcdir)/'`orcopcodes.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcopcodes.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcopcodes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcopcodes.c' object='liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcopcodes.lo `test -f 'orcopcodes.c' || echo '$(srcdir)/'`orcopcodes.c + +liborc_@ORC_MAJORMINOR@_la-orcparse.lo: orcparse.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcparse.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcparse.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcparse.lo `test -f 'orcparse.c' || echo '$(srcdir)/'`orcparse.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcparse.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcparse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcparse.c' object='liborc_@ORC_MAJORMINOR@_la-orcparse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcparse.lo `test -f 'orcparse.c' || echo '$(srcdir)/'`orcparse.c + +liborc_@ORC_MAJORMINOR@_la-orconce.lo: orconce.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orconce.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orconce.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orconce.lo `test -f 'orconce.c' || echo '$(srcdir)/'`orconce.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orconce.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orconce.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orconce.c' object='liborc_@ORC_MAJORMINOR@_la-orconce.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orconce.lo `test -f 'orconce.c' || echo '$(srcdir)/'`orconce.c + +liborc_@ORC_MAJORMINOR@_la-orcdebug.lo: orcdebug.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcdebug.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcdebug.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcdebug.lo `test -f 'orcdebug.c' || echo '$(srcdir)/'`orcdebug.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcdebug.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcdebug.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcdebug.c' object='liborc_@ORC_MAJORMINOR@_la-orcdebug.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcdebug.lo `test -f 'orcdebug.c' || echo '$(srcdir)/'`orcdebug.c + +liborc_@ORC_MAJORMINOR@_la-orccode.lo: orccode.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccode.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccode.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccode.lo `test -f 'orccode.c' || echo '$(srcdir)/'`orccode.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccode.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccode.c' object='liborc_@ORC_MAJORMINOR@_la-orccode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccode.lo `test -f 'orccode.c' || echo '$(srcdir)/'`orccode.c + +liborc_@ORC_MAJORMINOR@_la-orcsse.lo: orcsse.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcsse.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcsse.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcsse.lo `test -f 'orcsse.c' || echo '$(srcdir)/'`orcsse.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcsse.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcsse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcsse.c' object='liborc_@ORC_MAJORMINOR@_la-orcsse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcsse.lo `test -f 'orcsse.c' || echo '$(srcdir)/'`orcsse.c + +liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo: orcrules-sse.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-sse.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo `test -f 'orcrules-sse.c' || echo '$(srcdir)/'`orcrules-sse.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-sse.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-sse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrules-sse.c' object='liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-sse.lo `test -f 'orcrules-sse.c' || echo '$(srcdir)/'`orcrules-sse.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo: orcprogram-sse.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo `test -f 'orcprogram-sse.c' || echo '$(srcdir)/'`orcprogram-sse.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-sse.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-sse.lo `test -f 'orcprogram-sse.c' || echo '$(srcdir)/'`orcprogram-sse.c + +liborc_@ORC_MAJORMINOR@_la-orcx86.lo: orcx86.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcx86.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcx86.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcx86.lo `test -f 'orcx86.c' || echo '$(srcdir)/'`orcx86.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcx86.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcx86.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcx86.c' object='liborc_@ORC_MAJORMINOR@_la-orcx86.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcx86.lo `test -f 'orcx86.c' || echo '$(srcdir)/'`orcx86.c + +liborc_@ORC_MAJORMINOR@_la-orcmmx.lo: orcmmx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcmmx.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcmmx.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcmmx.lo `test -f 'orcmmx.c' || echo '$(srcdir)/'`orcmmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcmmx.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcmmx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcmmx.c' object='liborc_@ORC_MAJORMINOR@_la-orcmmx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcmmx.lo `test -f 'orcmmx.c' || echo '$(srcdir)/'`orcmmx.c + +liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo: orcrules-mmx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo `test -f 'orcrules-mmx.c' || echo '$(srcdir)/'`orcrules-mmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrules-mmx.c' object='liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-mmx.lo `test -f 'orcrules-mmx.c' || echo '$(srcdir)/'`orcrules-mmx.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo: orcprogram-mmx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo `test -f 'orcprogram-mmx.c' || echo '$(srcdir)/'`orcprogram-mmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-mmx.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-mmx.lo `test -f 'orcprogram-mmx.c' || echo '$(srcdir)/'`orcprogram-mmx.c + +liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo: orcrules-altivec.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo `test -f 'orcrules-altivec.c' || echo '$(srcdir)/'`orcrules-altivec.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrules-altivec.c' object='liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-altivec.lo `test -f 'orcrules-altivec.c' || echo '$(srcdir)/'`orcrules-altivec.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo: orcprogram-altivec.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo `test -f 'orcprogram-altivec.c' || echo '$(srcdir)/'`orcprogram-altivec.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-altivec.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-altivec.lo `test -f 'orcprogram-altivec.c' || echo '$(srcdir)/'`orcprogram-altivec.c + +liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo: orcpowerpc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcpowerpc.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo `test -f 'orcpowerpc.c' || echo '$(srcdir)/'`orcpowerpc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcpowerpc.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcpowerpc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcpowerpc.c' object='liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcpowerpc.lo `test -f 'orcpowerpc.c' || echo '$(srcdir)/'`orcpowerpc.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo: orcprogram-neon.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo `test -f 'orcprogram-neon.c' || echo '$(srcdir)/'`orcprogram-neon.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-neon.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-neon.lo `test -f 'orcprogram-neon.c' || echo '$(srcdir)/'`orcprogram-neon.c + +liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo: orcrules-neon.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-neon.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo `test -f 'orcrules-neon.c' || echo '$(srcdir)/'`orcrules-neon.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-neon.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-neon.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrules-neon.c' object='liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-neon.lo `test -f 'orcrules-neon.c' || echo '$(srcdir)/'`orcrules-neon.c + +liborc_@ORC_MAJORMINOR@_la-orcarm.lo: orcarm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcarm.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcarm.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcarm.lo `test -f 'orcarm.c' || echo '$(srcdir)/'`orcarm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcarm.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcarm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcarm.c' object='liborc_@ORC_MAJORMINOR@_la-orcarm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcarm.lo `test -f 'orcarm.c' || echo '$(srcdir)/'`orcarm.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo: orcprogram-arm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo `test -f 'orcprogram-arm.c' || echo '$(srcdir)/'`orcprogram-arm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-arm.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-arm.lo `test -f 'orcprogram-arm.c' || echo '$(srcdir)/'`orcprogram-arm.c + +liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo: orcrules-arm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-arm.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo `test -f 'orcrules-arm.c' || echo '$(srcdir)/'`orcrules-arm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-arm.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcrules-arm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcrules-arm.c' object='liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcrules-arm.lo `test -f 'orcrules-arm.c' || echo '$(srcdir)/'`orcrules-arm.c + +liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo: orcprogram-c64x-c.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo `test -f 'orcprogram-c64x-c.c' || echo '$(srcdir)/'`orcprogram-c64x-c.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orcprogram-c64x-c.c' object='liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orcprogram-c64x-c.lo `test -f 'orcprogram-c64x-c.c' || echo '$(srcdir)/'`orcprogram-c64x-c.c + +liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo: orccpu-x86.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-x86.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo `test -f 'orccpu-x86.c' || echo '$(srcdir)/'`orccpu-x86.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-x86.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-x86.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccpu-x86.c' object='liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-x86.lo `test -f 'orccpu-x86.c' || echo '$(srcdir)/'`orccpu-x86.c + +liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo: orccpu-powerpc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo `test -f 'orccpu-powerpc.c' || echo '$(srcdir)/'`orccpu-powerpc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccpu-powerpc.c' object='liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-powerpc.lo `test -f 'orccpu-powerpc.c' || echo '$(srcdir)/'`orccpu-powerpc.c + +liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo: orccpu-arm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo -MD -MP -MF $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-arm.Tpo -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo `test -f 'orccpu-arm.c' || echo '$(srcdir)/'`orccpu-arm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-arm.Tpo $(DEPDIR)/liborc_@ORC_MAJORMINOR@_la-orccpu-arm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='orccpu-arm.c' object='liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liborc_@ORC_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liborc_@ORC_MAJORMINOR@_la-orccpu-arm.lo `test -f 'orccpu-arm.c' || echo '$(srcdir)/'`orccpu-arm.c + +generate_emulation-generate-emulation.o: generate-emulation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_emulation_CFLAGS) $(CFLAGS) -MT generate_emulation-generate-emulation.o -MD -MP -MF $(DEPDIR)/generate_emulation-generate-emulation.Tpo -c -o generate_emulation-generate-emulation.o `test -f 'generate-emulation.c' || echo '$(srcdir)/'`generate-emulation.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/generate_emulation-generate-emulation.Tpo $(DEPDIR)/generate_emulation-generate-emulation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-emulation.c' object='generate_emulation-generate-emulation.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_emulation_CFLAGS) $(CFLAGS) -c -o generate_emulation-generate-emulation.o `test -f 'generate-emulation.c' || echo '$(srcdir)/'`generate-emulation.c + +generate_emulation-generate-emulation.obj: generate-emulation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_emulation_CFLAGS) $(CFLAGS) -MT generate_emulation-generate-emulation.obj -MD -MP -MF $(DEPDIR)/generate_emulation-generate-emulation.Tpo -c -o generate_emulation-generate-emulation.obj `if test -f 'generate-emulation.c'; then $(CYGPATH_W) 'generate-emulation.c'; else $(CYGPATH_W) '$(srcdir)/generate-emulation.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/generate_emulation-generate-emulation.Tpo $(DEPDIR)/generate_emulation-generate-emulation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-emulation.c' object='generate_emulation-generate-emulation.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_emulation_CFLAGS) $(CFLAGS) -c -o generate_emulation-generate-emulation.obj `if test -f 'generate-emulation.c'; then $(CYGPATH_W) 'generate-emulation.c'; else $(CYGPATH_W) '$(srcdir)/generate-emulation.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-nodist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-nodist_pkgincludeHEADERS \ + install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES \ + uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man \ + install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ + install-pkgincludeHEADERS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ + uninstall-pkgincludeHEADERS + + +update: generate-emulation + $(top_builddir)/tools/orcc$(EXEEXT) --implementation -o orcfunctions.c orcfunctions.orc + $(top_builddir)/tools/orcc$(EXEEXT) --header -o orcfunctions.h orcfunctions.orc + ./generate-emulation$(EXEEXT) -o orcemulateopcodes.c + ./generate-emulation$(EXEEXT) --header -o orcemulateopcodes.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/orc/generate-emulation.c b/orc/generate-emulation.c new file mode 100644 index 0000000..f375c04 --- /dev/null +++ b/orc/generate-emulation.c @@ -0,0 +1,343 @@ + +#include "config.h" + +#include +#include + +#include +#include +#include +#include + +void output_code_emulate (OrcProgram *p, FILE *output); + +int verbose = 0; +int error = 0; +int compat; + +char *target = "sse"; + +#define ORC_VERSION(a,b,c,d) ((a)*1000000 + (b)*10000 + (c)*100 + (d)) +#define REQUIRE(a,b,c,d) do { \ + if (ORC_VERSION((a),(b),(c),(d)) > compat) { \ + fprintf(stderr, "Feature used that is incompatible with --compat\n"); \ + exit (1); \ + } \ +} while (0) + +void help (void) +{ + printf("Usage:\n"); + printf(" generate-emulation [OPTION...]\n"); + printf("\n"); + printf("Help Options:\n"); + printf(" -h, --help Show help options\n"); + printf("\n"); + printf("Application Options:\n"); + printf(" -o, --output FILE Write output to FILE\n"); + printf("\n"); + + exit (0); +} + +int +main (int argc, char *argv[]) +{ + char *output_file = NULL; + char *input_file = NULL; + char *include_file = NULL; + FILE *output; + int i; + OrcOpcodeSet *opcode_set; + int output_header = FALSE; + + orc_init (); + + for(i=1;in_opcodes;i++){ + OrcStaticOpcode *opcode = opcode_set->opcodes + i; + + fprintf(output, + "void emulate_%s (OrcOpcodeExecutor *ex, int i, int n);\n", + opcode->name); + } + fprintf(output, "\n"); + fprintf(output, "#endif\n"); + fprintf(output, "\n"); + } else { + + fprintf(output, "#ifdef HAVE_CONFIG_H\n"); + fprintf(output, "#include \"config.h\"\n"); + fprintf(output, "#endif\n"); + fprintf(output, "#include \n"); + fprintf(output, "#include \n"); + if (include_file) { + fprintf(output, "#include <%s>\n", include_file); + } + fprintf(output, "\n"); + fprintf(output, "%s", orc_target_get_asm_preamble ("c")); + fprintf(output, "\n"); + + for(i=0;in_opcodes;i++){ + char s[40]; + OrcProgram *program; + OrcStaticOpcode *opcode = opcode_set->opcodes + i; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + program = orc_program_new (); + + sprintf(s, "emulate_%s", opcode->name); + orc_program_set_name (program, s); + + if (opcode->dest_size[0] != 0) { + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (program, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (program, opcode->dest_size[0], "d1"); + } + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (program, opcode->dest_size[1], "d2"); + } + if (opcode->src_size[0] != 0) { + if (opcode->src_size[1] == 0 && + opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + args[n_args++] = + orc_program_add_parameter (program, opcode->src_size[0], "s1"); + } else { + args[n_args++] = + orc_program_add_source (program, opcode->src_size[0], "s1"); + } + } + if (opcode->src_size[1] != 0) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + args[n_args++] = + orc_program_add_parameter (program, opcode->src_size[1], "s2"); + } else { + args[n_args++] = + orc_program_add_source (program, opcode->src_size[1], "s2"); + } + } + if (opcode->src_size[2] != 0) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + args[n_args++] = + orc_program_add_parameter (program, opcode->src_size[2], "s3"); + } else { + args[n_args++] = + orc_program_add_source (program, opcode->src_size[2], "s3"); + } + } + + orc_program_append_2 (program, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + output_code_emulate (program, output); + } + } + + fclose (output); + + if (error) exit(1); + + return 0; +} + + +const char *varnames[] = { + "d1", "d2", "d3", "d4", + "s1", "s2", "s3", "s4", + "s5", "s6", "s7", "s8", + "a1", "a2", "a3", "d4", + "c1", "c2", "c3", "c4", + "c5", "c6", "c7", "c8", + "p1", "p2", "p3", "p4", + "p5", "p6", "p7", "p8", + "t1", "t2", "t3", "t4", + "t5", "t6", "t7", "t8", + "t9", "t10", "t11", "t12", + "t13", "t14", "t15", "t16" +}; + +const char *enumnames[] = { + "ORC_VAR_D1", "ORC_VAR_D2", "ORC_VAR_D3", "ORC_VAR_D4", + "ORC_VAR_S1", "ORC_VAR_S2", "ORC_VAR_S3", "ORC_VAR_S4", + "ORC_VAR_S5", "ORC_VAR_S6", "ORC_VAR_S7", "ORC_VAR_S8", + "ORC_VAR_A1", "ORC_VAR_A2", "ORC_VAR_A3", "ORC_VAR_A4", + "ORC_VAR_C1", "ORC_VAR_C2", "ORC_VAR_C3", "ORC_VAR_C4", + "ORC_VAR_C5", "ORC_VAR_C6", "ORC_VAR_C7", "ORC_VAR_C8", + "ORC_VAR_P1", "ORC_VAR_P2", "ORC_VAR_P3", "ORC_VAR_P4", + "ORC_VAR_P5", "ORC_VAR_P6", "ORC_VAR_P7", "ORC_VAR_P8", + "ORC_VAR_T1", "ORC_VAR_T2", "ORC_VAR_T3", "ORC_VAR_T4", + "ORC_VAR_T5", "ORC_VAR_T6", "ORC_VAR_T7", "ORC_VAR_T8", + "ORC_VAR_T9", "ORC_VAR_T10", "ORC_VAR_T11", "ORC_VAR_T12", + "ORC_VAR_T13", "ORC_VAR_T14", "ORC_VAR_T15", "ORC_VAR_T16" +}; + +#if 0 +void +output_prototype (OrcProgram *p, FILE *output) +{ + OrcVariable *var; + int i; + int need_comma; + + fprintf(output, "%s (", p->name); + need_comma = FALSE; + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "%s * %s", var->type_name, + varnames[ORC_VAR_D1 + i]); + } else { + fprintf(output, "orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_D1 + i]); + } + if (p->is_2d) { + fprintf(output, ", int %s_stride", varnames[ORC_VAR_D1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "%s * %s", var->type_name, + varnames[ORC_VAR_A1 + i]); + } else { + fprintf(output, "orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_A1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "const %s * %s", var->type_name, + varnames[ORC_VAR_S1 + i]); + } else { + fprintf(output, "const orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_S1 + i]); + } + if (p->is_2d) { + fprintf(output, ", int %s_stride", varnames[ORC_VAR_S1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->is_float_param) { + REQUIRE(0,4,5,1); + } + fprintf(output, "%s %s", + var->is_float_param ? "float" : "int", + varnames[ORC_VAR_P1 + i]); + need_comma = TRUE; + } + } + if (p->constant_n == 0) { + if (need_comma) fprintf(output, ", "); + fprintf(output, "int n"); + need_comma = TRUE; + } + if (p->is_2d && p->constant_m == 0) { + if (need_comma) fprintf(output, ", "); + fprintf(output, "int m"); + } + fprintf(output, ")"); +} + +void +output_code_header (OrcProgram *p, FILE *output) +{ + fprintf(output, "void "); + output_prototype (p, output); + fprintf(output, ";\n"); +} +#endif + +void +output_code_emulate (OrcProgram *p, FILE *output) +{ + + fprintf(output, "void\n"); + if (p->constant_n) { + fprintf(output, "%s (OrcOpcodeExecutor *ex, int offset)\n", p->name); + } else { + fprintf(output, "%s (OrcOpcodeExecutor *ex, int offset, int n)\n", p->name); + } + fprintf(output, "{\n"); + { + OrcCompileResult result; + + result = orc_program_compile_full (p, orc_target_get_by_name("c"), + ORC_TARGET_C_BARE | ORC_TARGET_C_OPCODE); + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + fprintf(output, "%s\n", orc_program_get_asm_code (p)); + } else { + printf("Failed to compile %s\n", p->name); + error = TRUE; + } + } + fprintf(output, "}\n"); + fprintf(output, "\n"); + +} + + diff --git a/orc/opcodes.h b/orc/opcodes.h new file mode 100644 index 0000000..b05cc6e --- /dev/null +++ b/orc/opcodes.h @@ -0,0 +1,160 @@ +UNARY_SB(absb, "ORC_ABS(%s)") +BINARY_SB(addb, "%s + %s") +BINARY_SB(addssb, "ORC_CLAMP_SB(%s + %s)") +BINARY_UB(addusb, "ORC_CLAMP_UB((orc_uint8)%s + (orc_uint8)%s)") +BINARY_SB(andb, "%s & %s") +BINARY_SB(andnb, "(~%s) & %s") +BINARY_SB(avgsb, "(%s + %s + 1)>>1") +BINARY_UB(avgub, "((orc_uint8)%s + (orc_uint8)%s + 1)>>1") +BINARY_SB(cmpeqb, "(%s == %s) ? (~0) : 0") +BINARY_SB(cmpgtsb, "(%s > %s) ? (~0) : 0") +UNARY_SB(copyb, "%s") +BINARY_SB(maxsb, "ORC_MAX(%s, %s)") +BINARY_UB(maxub, "ORC_MAX((orc_uint8)%s, (orc_uint8)%s)") +BINARY_SB(minsb, "ORC_MIN(%s, %s)") +BINARY_UB(minub, "ORC_MIN((orc_uint8)%s, (orc_uint8)%s)") +BINARY_SB(mullb, "(%s * %s) & 0xff") +BINARY_SB(mulhsb, "(%s * %s) >> 8") +BINARY_UB(mulhub, "((orc_uint32)(orc_uint8)%s * (orc_uint32)(orc_uint8)%s) >> 8") +BINARY_SB(orb, "%s | %s") +BINARY_SB(shlb, "%s << %s") +BINARY_SB(shrsb, "%s >> %s") +BINARY_UB(shrub, "((orc_uint8)%s) >> %s") +UNARY_SB(signb, "ORC_CLAMP(%s,-1,1)") +BINARY_SB(subb, "%s - %s") +BINARY_SB(subssb, "ORC_CLAMP_SB(%s - %s)") +BINARY_UB(subusb, "ORC_CLAMP_UB((orc_uint8)%s - (orc_uint8)%s)") +BINARY_SB(xorb, "%s ^ %s") + +UNARY_SW(absw, "ORC_ABS(%s)") +BINARY_SW(addw, "%s + %s") +BINARY_SW(addssw, "ORC_CLAMP_SW(%s + %s)") +BINARY_UW(addusw, "ORC_CLAMP_UW((orc_uint16)%s + (orc_uint16)%s)") +BINARY_SW(andw, "%s & %s") +BINARY_SW(andnw, "(~%s) & %s") +BINARY_SW(avgsw, "(%s + %s + 1)>>1") +BINARY_UW(avguw, "((orc_uint16)%s + (orc_uint16)%s + 1)>>1") +BINARY_SW(cmpeqw, "(%s == %s) ? (~0) : 0") +BINARY_SW(cmpgtsw, "(%s > %s) ? (~0) : 0") +UNARY_SW(copyw, "%s") +BINARY_SW(maxsw, "ORC_MAX(%s, %s)") +BINARY_UW(maxuw, "ORC_MAX((orc_uint16)%s, (orc_uint16)%s)") +BINARY_SW(minsw, "ORC_MIN(%s, %s)") +BINARY_UW(minuw, "ORC_MIN((orc_uint16)%s, (orc_uint16)%s)") +BINARY_SW(mullw, "(%s * %s) & 0xffff") +BINARY_SW(mulhsw, "(%s * %s) >> 16") +BINARY_UW(mulhuw, "((orc_uint32)((orc_uint16)%s) * (orc_uint32)((orc_uint16)%s)) >> 16") +BINARY_SW(orw, "%s | %s") +BINARY_SW(shlw, "%s << %s") +BINARY_SW(shrsw, "%s >> %s") +BINARY_UW(shruw, "((orc_uint16)%s) >> %s") +UNARY_SW(signw, "ORC_CLAMP(%s,-1,1)") +BINARY_SW(subw, "%s - %s") +BINARY_SW(subssw, "ORC_CLAMP_SW(%s - %s)") +BINARY_UW(subusw, "ORC_CLAMP_UW((orc_uint16)%s - (orc_uint16)%s)") +BINARY_SW(xorw, "%s ^ %s") + +UNARY_SL(absl, "ORC_ABS(%s)") +BINARY_SL(addl, "%s + %s") +BINARY_SL(addssl, "ORC_CLAMP_SL((orc_int64)%s + (orc_int64)%s)") +BINARY_UL(addusl, "ORC_CLAMP_UL((orc_int64)(orc_uint32)%s + (orc_int64)(orc_uint32)%s)") +BINARY_SL(andl, "%s & %s") +BINARY_SL(andnl, "(~%s) & %s") +BINARY_SL(avgsl, "((orc_int64)%s + (orc_int64)%s + 1)>>1") +BINARY_UL(avgul, "((orc_uint64)(orc_uint32)%s + (orc_uint64)(orc_uint32)%s + 1)>>1") +BINARY_SL(cmpeql, "(%s == %s) ? (~0) : 0") +BINARY_SL(cmpgtsl, "(%s > %s) ? (~0) : 0") +UNARY_SL(copyl, "%s") +BINARY_SL(maxsl, "ORC_MAX(%s, %s)") +BINARY_UL(maxul, "ORC_MAX((orc_uint32)%s, (orc_uint32)%s)") +BINARY_SL(minsl, "ORC_MIN(%s, %s)") +BINARY_UL(minul, "ORC_MIN((orc_uint32)%s, (orc_uint32)%s)") +BINARY_SL(mulll, "(%s * %s) & 0xffffffff") +BINARY_SL(mulhsl, "((orc_int64)%s * (orc_int64)%s) >> 32") +BINARY_UL(mulhul, "((orc_uint64)(orc_uint32)%s * (orc_uint64)(orc_uint32)%s) >> 32") +BINARY_SL(orl, "%s | %s") +BINARY_SL(shll, "%s << %s") +BINARY_SL(shrsl, "%s >> %s") +BINARY_UL(shrul, "((orc_uint32)%s) >> %s") +UNARY_SL(signl, "ORC_CLAMP(%s,-1,1)") +BINARY_SL(subl, "%s - %s") +BINARY_SL(subssl, "ORC_CLAMP_SL((orc_int64)%s - (orc_int64)%s)") +BINARY_UL(subusl, "ORC_CLAMP_UL((orc_int64)(orc_uint32)%s - (orc_int64)(orc_uint32)%s)") +BINARY_SL(xorl, "%s ^ %s") + +UNARY_SQ(copyq, "%s") +BINARY_SQ(cmpeqq, "(%s == %s) ? (~0) : 0") +BINARY_SQ(cmpgtsq, "(%s > %s) ? (~0) : 0") +BINARY_SQ(andq, "%s & %s") +BINARY_SQ(andnq, "(~%s) & %s") +BINARY_SQ(orq, "%s | %s") +BINARY_SQ(xorq, "%s ^ %s") +BINARY_SQ(addq, "%s + %s") +BINARY_SQ(subq, "%s - %s") +BINARY_SQ(shlq, "%s << %s") +BINARY_SQ(shrsq, "%s >> %s") +BINARY_UQ(shruq, "((orc_uint64)%s) >> %s") + +UNARY_BW(convsbw, "%s") +UNARY_BW(convubw, "(orc_uint8)%s") +UNARY_WB(convwb, "%s") +UNARY_WB(convhwb, "((orc_uint16)%s)>>8") +UNARY_WB(convssswb, "ORC_CLAMP_SB(%s)") +UNARY_WB(convsuswb, "ORC_CLAMP_UB(%s)") +UNARY_WB(convusswb, "ORC_MIN((orc_uint16)%s,ORC_SB_MAX)") +UNARY_WB(convuuswb, "ORC_MIN((orc_uint16)%s,ORC_UB_MAX)") + +UNARY_WL(convswl, "%s") +UNARY_WL(convuwl, "(orc_uint16)%s") +UNARY_LW(convlw, "%s") +UNARY_WB(convhlw, "((orc_uint32)%s)>>16") +UNARY_LW(convssslw, "ORC_CLAMP_SW(%s)") +UNARY_LW(convsuslw, "ORC_CLAMP_UW(%s)") +UNARY_LW(convusslw, "ORC_CLAMP((orc_uint32)%s,0,ORC_SW_MAX)") +UNARY_LW(convuuslw, "ORC_CLAMP_UW((orc_uint32)%s)") + +UNARY_LQ(convslq, "%s") +UNARY_LQ(convulq, "(orc_uint32)%s") +UNARY_LW(convql, "%s") +UNARY_LW(convsssql, "ORC_CLAMP_SL(%s)") +UNARY_LW(convsusql, "ORC_CLAMP_UL(%s)") +UNARY_LW(convussql, "ORC_CLAMP_SL((orc_uint64)%s)") +UNARY_LW(convuusql, "ORC_CLAMP_UL((orc_uint64)%s)") + +BINARY_BW(mulsbw, "%s * %s") +BINARY_BW(mulubw, "((orc_uint8)%s) * ((orc_uint8)%s)") +BINARY_WL(mulswl, "%s * %s") +BINARY_WL(muluwl, "((orc_uint16)%s) * ((orc_uint16)%s)") +BINARY_LQ(mulslq, "((orc_int64)%s) * ((orc_int64)%s)") +BINARY_LQ(mululq, "((orc_uint64)((orc_uint32)%s)) * ((orc_uint64)((orc_uint32)%s))") + +BINARY_LQ(mergelq, "((orc_uint64)%s & ORC_UINT64_C(0xffffffff)) | ((orc_uint64)%s << 32)") +BINARY_WL(mergewl, "((orc_uint16)%s & 0x0000ffff) | ((orc_uint16)%s << 16)") +BINARY_BW(mergebw, "((orc_uint8)%s & 0x00ff) | ((orc_uint8)%s << 8)") +UNARY_WB(select0wb, "(orc_uint16)%s & 0xff") +UNARY_WB(select1wb, "((orc_uint16)%s >> 8)&0xff") +UNARY_LW(select0lw, "(orc_uint32)%s & 0xffff") +UNARY_LW(select1lw, "((orc_uint32)%s >> 16)&0xffff") +UNARY_QL(select0ql, "(orc_uint64)%s & 0xffffffff") +UNARY_QL(select1ql, "((orc_uint64)%s >> 32)&0xffffffff") +UNARY_UW(swapw, "ORC_SWAP_W(%s)") +UNARY_UL(swapl, "ORC_SWAP_L(%s)") +UNARY_UQ(swapq, "ORC_SWAP_Q(%s)") + +BINARY_F(addf, "%s + %s") +BINARY_F(subf, "%s - %s") +BINARY_F(mulf, "%s * %s") +BINARY_F(divf, "%s / %s") +UNARY_F(sqrtf, "sqrt(%s)") +BINARY_FL(cmpeqf, "(%s == %s) ? (~0) : 0") +BINARY_FL(cmpltf, "(%s < %s) ? (~0) : 0") +BINARY_FL(cmplef, "(%s <= %s) ? (~0) : 0") + +BINARY_D(addd, "%s + %s") +BINARY_D(subd, "%s - %s") +BINARY_D(muld, "%s * %s") +BINARY_D(divd, "%s / %s") +UNARY_D(sqrtd, "sqrt(%s)") +BINARY_DQ(cmpeqd, "(%s == %s) ? ORC_UINT64_C(~0) : 0") +BINARY_DQ(cmpltd, "(%s < %s) ? ORC_UINT64_C(~0) : 0") +BINARY_DQ(cmpled, "(%s <= %s) ? ORC_UINT64_C(~0) : 0") diff --git a/orc/orc.c b/orc/orc.c new file mode 100644 index 0000000..d90abe9 --- /dev/null +++ b/orc/orc.c @@ -0,0 +1,62 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include + +/** + * SECTION:orc + * @title: Orc + * @short_description: Library Initialization + */ + +void _orc_debug_init(void); +void _orc_once_init(void); +void _orc_compiler_init(void); + +/** + * orc_init: + * + * This function initializes the Orc library, and + * should be called before using any other Orc function. + * Subsequent calls to this function have no effect. + */ +void +orc_init (void) +{ + static int _inited = 0; + if (_inited) return; + + _inited = 1; + + ORC_ASSERT(sizeof(OrcExecutor) == sizeof(OrcExecutorAlt)); + + _orc_debug_init(); + _orc_once_init(); + _orc_compiler_init(); + orc_opcode_init(); + orc_c_init(); +#ifdef ENABLE_BACKEND_C64X + orc_c64x_c_init(); +#endif +#ifdef ENABLE_BACKEND_MMX + orc_mmx_init(); +#endif +#ifdef ENABLE_BACKEND_SSE + orc_sse_init(); +#endif +#ifdef ENABLE_BACKEND_ALTIVEC + orc_powerpc_init(); +#endif +#ifdef ENABLE_BACKEND_ARM + orc_arm_init(); +#endif +#ifdef ENABLE_BACKEND_NEON + orc_neon_init(); +#endif +} + diff --git a/orc/orc.h b/orc/orc.h new file mode 100644 index 0000000..3f711be --- /dev/null +++ b/orc/orc.h @@ -0,0 +1,20 @@ + +#ifndef _ORC_ORC_H_ +#define _ORC_ORC_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + diff --git a/orc/orcarm.c b/orc/orcarm.c new file mode 100644 index 0000000..bfdc246 --- /dev/null +++ b/orc/orcarm.c @@ -0,0 +1,741 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include + +#include +#include +#include +#include + +/** + * SECTION:orcarm + * @title: ARM + * @short_description: code generation for ARM + */ + +const char * +orc_arm_cond_name (OrcArmCond cond) +{ + static const char *cond_names[] = { + "eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", + "hi", "ls", "ge", "lt", "gt", "le", "", "" + }; + if (cond < 0 || cond >= 16) { + return "ERROR"; + } + return cond_names[cond&0xf]; +} + +const char * +orc_arm_reg_name (int reg) +{ +#if 0 + static const char *gp_regs[] = { + "a1", "a2", "a3", "a4", + "v1", "v2", "v3", "v4", + "v5", "v6", "v7", "v8", + "ip", "sp", "lr", "pc" }; +#else + static const char *gp_regs[] = { + "r0", "r1", "r2", "r3", + "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", + "ip", "sp", "lr", "pc" }; + //"r12", "r13", "r14", "r15" }; +#endif + + if (reg < ORC_GP_REG_BASE || reg >= ORC_GP_REG_BASE+16) { + return "ERROR"; + } + + return gp_regs[reg&0xf]; +} + +void +orc_arm_emit (OrcCompiler *compiler, orc_uint32 insn) +{ + ORC_WRITE_UINT32_LE (compiler->codeptr, insn); + compiler->codeptr+=4; +} + +void +orc_arm_emit_bx_lr (OrcCompiler *compiler) +{ + ORC_ASM_CODE(compiler," bx lr\n"); + orc_arm_emit (compiler, 0xe12fff1e); +} + +void +orc_arm_emit_push (OrcCompiler *compiler, int regs) +{ + int i; + int x = 0; + + ORC_ASM_CODE(compiler," push {"); + for(i=0;i<16;i++){ + if (regs & (1<labels[label] = compiler->codeptr; +} + +void +orc_arm_add_fixup (OrcCompiler *compiler, int label, int type) +{ + ORC_ASSERT (compiler->n_fixups < ORC_N_FIXUPS); + + compiler->fixups[compiler->n_fixups].ptr = compiler->codeptr; + compiler->fixups[compiler->n_fixups].label = label; + compiler->fixups[compiler->n_fixups].type = type; + compiler->n_fixups++; +} + +void +orc_arm_do_fixups (OrcCompiler *compiler) +{ + int i; + for(i=0;in_fixups;i++){ + unsigned char *label = compiler->labels[compiler->fixups[i].label]; + unsigned char *ptr = compiler->fixups[i].ptr; + orc_uint32 code; + int diff; + + if (compiler->fixups[i].type == 0) { + code = ORC_READ_UINT32_LE (ptr); + diff = code; + diff = (diff << 8) >> 8; + diff += ((label - ptr) >> 2); + if (diff != (diff << 8)>>8) { + ORC_COMPILER_ERROR(compiler, "fixup out of range"); + } + ORC_WRITE_UINT32_LE(ptr, (code&0xff000000) | (diff&0x00ffffff)); + } else { + code = ORC_READ_UINT32_LE (ptr); + diff = code; + /* We store the offset in the code as signed, but the CPU considers + * it unsigned */ + diff = (diff << 24) >> 24; + diff += ((label - ptr) >> 2); + if (diff != (diff & 0xff)) { + ORC_COMPILER_ERROR(compiler, "fixup out of range (%d > 255)", diff); + } + ORC_WRITE_UINT32_LE(ptr, (code&0xffffff00) | (diff&0x000000ff)); + } + } +} + +void +orc_arm_emit_align (OrcCompiler *compiler, int align_shift) +{ + int diff; + + diff = (compiler->code - compiler->codeptr)&((1<>= 2; + shift2++; + } + if (x > 0xff) { + ORC_PROGRAM_ERROR(compiler, "bad immediate value"); + } + } + + code = 0xe3a00000; + code |= (dest&0xf) << 12; + code |= (((16-shift2)&0xf) << 8); + code |= (x&0xff); + + ORC_ASM_CODE(compiler," mov %s, #0x%08x\n", orc_arm_reg_name (dest), imm); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_add_imm (OrcCompiler *compiler, int dest, int src1, int imm) +{ + orc_uint32 code; + int shift2; + unsigned int x; + + if ((imm & 0xff) == imm) { + shift2 = 0; + x = imm; + } else { + shift2 = 0; + x = imm & 0xffffffff; + while ((x & 3) == 0) { + x >>= 2; + shift2++; + } + if (x > 0xff) { + ORC_PROGRAM_ERROR(compiler, "bad immediate value"); + } + } + + code = 0xe2800000; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (((16-shift2)&0xf) << 8); + code |= (x&0xff); + + ORC_ASM_CODE(compiler," add %s, %s, #0x%08x\n", orc_arm_reg_name (dest), + orc_arm_reg_name(src1), imm); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_and_imm (OrcCompiler *compiler, int dest, int src1, int value) +{ + orc_uint32 code; + + code = 0xe2000000; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (value) << 0; + + ORC_ASM_CODE(compiler," and %s, %s, #%d\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), + value); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_cmp (OrcCompiler *compiler, int src1, int src2) +{ + orc_uint32 code; + + code = 0xe1500000; + code |= (src1&0xf) << 16; + code |= (src2&0xf) << 0; + + ORC_ASM_CODE(compiler," cmp %s, %s\n", + orc_arm_reg_name (src1), + orc_arm_reg_name (src2)); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_asr_imm (OrcCompiler *compiler, int dest, int src1, int value) +{ + orc_uint32 code; + + if (value == 0) { + ORC_ERROR("bad immediate value"); + } + code = 0xe1a00040; + code |= (src1&0xf) << 0; + code |= (dest&0xf) << 12; + code |= (value) << 7; + + ORC_ASM_CODE(compiler," asr %s, %s, #%d\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), + value); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_lsl_imm (OrcCompiler *compiler, int dest, int src1, int value) +{ + orc_uint32 code; + + if (value == 0) { + ORC_ERROR("bad immediate value"); + } + code = 0xe1a00000; + code |= (src1&0xf) << 0; + code |= (dest&0xf) << 12; + code |= (value) << 7; + + ORC_ASM_CODE(compiler," lsl %s, %s, #%d\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), + value); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_load_reg (OrcCompiler *compiler, int dest, int src1, int offset) +{ + orc_uint32 code; + + code = 0xe5900000; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= offset&0xfff; + + ORC_ASM_CODE(compiler," ldr %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_store_reg (OrcCompiler *compiler, int src1, int dest, int offset) +{ + orc_uint32 code; + + code = 0xe5800000; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= offset&0xfff; + + ORC_ASM_CODE(compiler," str %s, [%s, #%d]\n", + orc_arm_reg_name (src1), + orc_arm_reg_name (dest), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_mov (OrcCompiler *compiler, int dest, int src) +{ + if (dest == src) return; + orc_arm_emit_mov_r(compiler, ORC_ARM_COND_AL, 0, dest, src); +} + +void +orc_arm_emit_sub (OrcCompiler *compiler, int dest, int src1, int src2) +{ + orc_arm_emit_sub_r (compiler, ORC_ARM_COND_AL, 0, dest, src1, src2); +} + +void +orc_arm_emit_sub_imm (OrcCompiler *compiler, int dest, int src1, int value, + int record) +{ + orc_arm_emit_sub_i (compiler, ORC_ARM_COND_AL, record, dest, src1, value); +} + +void +orc_arm_emit_add (OrcCompiler *compiler, int dest, int src1, int src2) +{ + orc_arm_emit_add_r (compiler, ORC_ARM_COND_AL, 0, dest, src1, src2); +} + +void +orc_arm_emit_cmp_imm (OrcCompiler *compiler, int src1, int value) +{ + orc_arm_emit_cmp_i (compiler, ORC_ARM_COND_AL, src1, value); +} + + +/* shifter operands */ +/* 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+ + * |rotimm | immed_8 | + * +-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_so_i(rot,imm) ((((rot)&15)<<8)|((imm)&255)) +/* 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+ + * | Si | St|0| Rm | + * +-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_so_rsi(Si,St,Rm) ((((Si)&31)<<7)|(((St)&3)<<5)|((Rm)&15)) +#define arm_so_rrx(Rm) arm_so_rsi(0,ORC_ARM_ROR,Rm) +#define arm_so_r(Rm) ((Rm)&15) +/* 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+ + * | Rs |0| St|1| Rm | + * +-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_so_rsr(Rs,St,Rm) (0x010|(((Rs)&15)<<8)|(((St)&3)<<5)|((Rm)&15)) + +/* data processing instructions */ +/* 3 2 2 2 2 2 2 2 1 1 1 1 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | cond |0 0|I| opcode|S| Rn | Rd | shifter_operand | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_code_dp(cond,I,opcode,S,Rn,Rd,So) ((((cond)&15)<<28) | (((I)&1)<<25) | \ + (((opcode)&15)<<21) | (((S)&1)<<20) | \ + (((Rn)&15)<<16) | (((Rd)&15)<<12) | \ + ((So)&0xfff)) + +/* + * type 0: {}{s} {}, , #imm (imm = (val>>(shift*2))|(val<<(32-(shift*2)))) + * type 1: {}{s} {}, , + * type 2: {}{s} {}, , , [LSL|LSR|ASR] #imm + * type 3: {}{s} {}, , , [LSL|LSR|ASR] + * type 4: {}{s} {,} , , RRX + */ +void +orc_arm_emit_dp (OrcCompiler *p, int type, OrcArmCond cond, OrcArmDP opcode, + int S, int Rd, int Rn, int Rm, int shift, orc_uint32 val) +{ + orc_uint32 code; + int I = 0; + int shifter_op; + char shifter[64]; + orc_uint32 imm; + static const char *shift_names[] = { + "LSL", "LSR", "ASR", "ROR" + }; + /* opcodes with Rd */ + static const int op_Rd[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1 + }; + /* opcodes using Rn */ + static const int op_Rn[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0 + }; + static const char *dp_insn_names[] = { + "and", "eor", "sub", "rsb", "add", "adc", "sbc", "rsc", + "tst", "teq", "cmp", "cmn", "orr", "mov", "bic", "mvn" + }; + + switch (type) { + case 0: + /* #imm */ + imm = (orc_uint32) val; + /* if imm <= 0xff we're done. It's recommanded that we choose the + * smallest shifter value. Impossible values will overflow the shifter. */ + while (imm > 0xff && shift < 16) { + imm = (imm << 2) | (imm >> 30); + shift++; + } + if (shift > 15) { + ORC_COMPILER_ERROR(p,"invalid ARM immediate %08x", val); + return; + } + shifter_op = arm_so_i (shift, imm); + sprintf (shifter, "#0x%08x", val); + I = 1; + break; + case 1: + /* */ + shifter_op = arm_so_r (Rm); + sprintf (shifter, "%s", orc_arm_reg_name (Rm)); + break; + case 2: + /* , [LSL|LSR|ASR] #imm */ + shifter_op = arm_so_rsi (val,shift,Rm); + sprintf (shifter, "%s, %s #%d", + orc_arm_reg_name (Rm), shift_names[shift], val); + break; + case 3: + /* , [LSL|LSR|ASR] */ + shifter_op = arm_so_rsr (val,shift,Rm); + sprintf (shifter, "%s, %s %s", + orc_arm_reg_name (Rm), shift_names[shift], orc_arm_reg_name (val)); + break; + case 4: + /* , RRX */ + shifter_op = arm_so_rrx (Rm); + sprintf (shifter, "%s, RRX", + orc_arm_reg_name (Rm)); + break; + default: + ORC_COMPILER_ERROR(p,"unknown data processing type %d", type); + return; + } + + if (op_Rd[opcode]) { + if (op_Rn[opcode]) { + /* opcode using Rn */ + code = arm_code_dp (cond, I, opcode, S, Rn, Rd, shifter_op); + ORC_ASM_CODE(p," %s%s%s %s, %s, %s\n", + dp_insn_names[opcode], orc_arm_cond_name(cond), (S ? "s" : ""), + orc_arm_reg_name (Rd), orc_arm_reg_name (Rn), shifter); + } else { + /* opcode using Rd and val (mov, mvn) */ + code = arm_code_dp (cond, I, opcode, S, Rn, Rd, shifter_op); + ORC_ASM_CODE(p," %s%s%s %s, %s\n", + dp_insn_names[opcode], orc_arm_cond_name(cond), (S ? "s" : ""), + orc_arm_reg_name (Rd), shifter); + } + } else { + /* opcode does not change Rd, change status register (cmp, tst, ..) */ + code = arm_code_dp (cond, I, opcode, 1, Rn, 0, shifter_op); + ORC_ASM_CODE(p," %s%s %s, %s\n", + dp_insn_names[opcode], orc_arm_cond_name(cond), orc_arm_reg_name (Rn), shifter); + } + orc_arm_emit (p, code); +} + +/* parallel instructions */ +/* 3 2 2 2 2 2 2 2 1 1 1 1 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | cond | mode | Rn | Rd |0 0 0 0| op | Rm | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_code_par(cond,mode,Rn,Rd,op,Rm) (((cond)<<28)|((mode)<<20)|(((Rn)&0xf)<<16)|(((Rd)&0xf)<<12)|((op)<<4)|((Rm)&0xf)|0xf00) + +void +orc_arm_emit_par (OrcCompiler *p, int op, int mode, OrcArmCond cond, + int Rd, int Rn, int Rm) +{ + orc_uint32 code; + static const int par_op[] = { + 1, 3, 5, 7, 9, 15, 11, 5, 5 + }; + static const char *par_op_names[] = { + "add16", "addsubx", "subaddx", "sub16", "add8", "sub8", "sel", "add", "sub" + }; + static const int par_mode[] = { + 0x61, 0x62, 0x63, 0x65, 0x66, 0x67, 0x68, 0x10, 0x12, 0x14, 0x16 + }; + static const char *par_mode_names[] = { + "s", "q", "sh", "u", "uq", "uh", "", "q", "q", "qd", "qd" + }; + + code = arm_code_par (cond, par_mode[mode], Rn, Rd, par_op[op], Rm); + if (op == 7) { + int tmp; + /* gas does something screwy here */ + code &= ~0xf00; + tmp = Rn; + Rn = Rm; + Rm = tmp; + } + ORC_ASM_CODE(p," %s%s%s %s, %s, %s\n", + par_mode_names[mode], par_op_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), + orc_arm_reg_name (Rn), + orc_arm_reg_name (Rm)); + orc_arm_emit (p, code); +} + +/* extend instructions */ +/* 3 2 2 2 2 2 2 2 1 1 1 1 1 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | cond |0 1 1 0 0 0 0 0| Rn | Rd |rot|0 0|0 1 1 1| Rm | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_code_xt(op,cond,Rn,Rd,r8,Rm) (op|((cond)<<28)|(((Rn)&0xf)<<16)|(((Rd)&0xf)<<12)|((((r8)&0xf)&0x18)<<7)|((Rm)&0xf)) + +void +orc_arm_emit_xt (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rn, int Rm, int r8) +{ + orc_uint32 code; + char shifter[64]; + static const orc_uint32 xt_opcodes[] = { + 0x06800070, 0x06a00070, 0x06b00070, 0x06c00070, 0x06e00070, 0x06f00070 + }; + static const char *xt_insn_names[] = { + "sxtb16", "sxtb", "sxth", "uxtb16", "uxtb", "uxth", + "sxtab16", "sxtab", "sxtah", "uxtab16", "uxtab", "uxtah", + }; + + if (r8 & 0x18) + sprintf (shifter, ", ROR #%d", r8 & 0x18); + else + shifter[0] = '\0'; + + code = arm_code_xt (xt_opcodes[op], cond, Rn, Rd, r8, Rm); + if (Rn < 15) { + /* with Rn */ + ORC_ASM_CODE(p," %s%s %s, %s, %s%s\n", + xt_insn_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), + orc_arm_reg_name (Rn), + orc_arm_reg_name (Rm), + shifter); + } else { + ORC_ASM_CODE(p," %s%s %s, %s%s\n", + xt_insn_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), + orc_arm_reg_name (Rm), + shifter); + } + orc_arm_emit (p, code); +} + +#define arm_code_pkh(op,cond,Rn,Rd,sh,Rm) (op|((cond)<<28)|(((Rn)&0xf)<<16)|(((Rd)&0xf)<<12)|((sh)<<7)|((Rm)&0xf)) +void +orc_arm_emit_pkh (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rn, int Rm, int sh) +{ + orc_uint32 code; + char shifter[64]; + static const orc_uint32 pkh_opcodes[] = { 0x06800010, 0x06800050 }; + static const char *pkh_insn_names[] = { "pkhbt", "pkhtb" }; + + if (sh > 0) { + sprintf (shifter, ", %s #%d", + (op == 0 ? "LSL" : "ASR"), sh); + } else { + shifter[0] = '\0'; + } + + code = arm_code_pkh (pkh_opcodes[op], cond, Rn, Rd, sh, Rm); + ORC_ASM_CODE(p," %s%s %s, %s, %s%s\n", + pkh_insn_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), + orc_arm_reg_name (Rn), + orc_arm_reg_name (Rm), + shifter); + orc_arm_emit (p, code); +} + +/* extend instructions */ +/* 3 2 2 2 2 1 1 1 1 1 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | cond |0 1 1 0|x x x| sat | Rd | sh |a|0 1| Rm | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define arm_code_sat(op,cond,sat,Rd,sh,a,Rm) (op|(((cond)&15)<<28)|(((sat)&31)<<16)|\ + (((Rd)&15)<<12)|(((sh)&31)<<7)|(((a)&1)<<6)|\ + ((Rm)&15)) +void +orc_arm_emit_sat (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int sat, int Rm, int sh, int asr) +{ + orc_uint32 code; + char shifter[64]; + static const orc_uint32 sat_opcodes[] = { 0x06a00010, 0x06e00010, 0, 0 }; + static const char *sat_insn_names[] = { "ssat", "usat", "ssat16", "usat16" }; + static const int par_mode[] = { 0, 0, 0x6a, 0x6e }; + static const int par_op[] = { 0, 0, 3, 3 }; + + if (sh > 0) { + sprintf (shifter, ", %s #%d", + (asr&1 ? "ASR" : "LSL"), sh); + } else { + shifter[0] = '\0'; + } + + if (op < 2) { + code = arm_code_sat (sat_opcodes[op], cond, sat, Rd, sh, asr, Rm); + } else { + if (op == 3) { + code = arm_code_par (cond, par_mode[op], sat, Rd, par_op[op], Rm); + } else { + code = arm_code_par (cond, par_mode[op], sat - 1, Rd, par_op[op], Rm); + } + } + ORC_ASM_CODE(p," %s%s %s, #%d, %s%s\n", + sat_insn_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), + sat, + orc_arm_reg_name (Rm), + shifter); + orc_arm_emit (p, code); +} + +#define arm_code_rv(op,cond,Rd,Rm) (op|(((cond)&15)<<28)|(((Rd)&15)<<12)|((Rm)&15)) +void +orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rm) +{ + orc_uint32 code; + static const orc_uint32 rv_opcodes[] = { 0x06bf0f30, 0x06bf0fb0 }; + static const char *rv_insn_names[] = { "rev", "rev16" }; + + code = arm_code_rv (rv_opcodes[op], cond, Rd, Rm); + ORC_ASM_CODE(p," %s%s %s, %s\n", + rv_insn_names[op], orc_arm_cond_name(cond), + orc_arm_reg_name (Rd), orc_arm_reg_name (Rm)); + orc_arm_emit (p, code); +} + +void +orc_arm_flush_cache (OrcCode *code) +{ +#ifdef HAVE_ARM + __clear_cache (code->code, code->code + code->code_size); +#endif +} + +void +orc_arm_emit_data (OrcCompiler *compiler, orc_uint32 data) +{ + if (compiler->target_flags & ORC_TARGET_CLEAN_COMPILE) { + orc_arm_emit_nop (compiler); + } else { + ORC_ASM_CODE(compiler," .word 0x%08x\n", data); + orc_arm_emit (compiler, data); + } +} + diff --git a/orc/orcarm.h b/orc/orcarm.h new file mode 100644 index 0000000..9d53040 --- /dev/null +++ b/orc/orcarm.h @@ -0,0 +1,322 @@ + +#ifndef _ORC_ARM_H_ +#define _ORC_ARM_H_ + +#include + + +typedef enum { + ORC_ARM_A1 = ORC_GP_REG_BASE+0, + ORC_ARM_A2, + ORC_ARM_A3, + ORC_ARM_A4, + ORC_ARM_V1, + ORC_ARM_V2, + ORC_ARM_V3, + ORC_ARM_V4, + ORC_ARM_V5, + ORC_ARM_V6, + ORC_ARM_V7, + ORC_ARM_V8, + ORC_ARM_IP, + ORC_ARM_SP, + ORC_ARM_LR, + ORC_ARM_PC +} OrcArmRegister; + +typedef enum { + ORC_ARM_DP_AND = 0, + ORC_ARM_DP_EOR, + ORC_ARM_DP_SUB, + ORC_ARM_DP_RSB, + ORC_ARM_DP_ADD, + ORC_ARM_DP_ADC, + ORC_ARM_DP_SBC, + ORC_ARM_DP_RSC, + ORC_ARM_DP_TST, + ORC_ARM_DP_TEQ, + ORC_ARM_DP_CMP, + ORC_ARM_DP_CMN, + ORC_ARM_DP_ORR, + ORC_ARM_DP_MOV, + ORC_ARM_DP_BIC, + ORC_ARM_DP_MVN +} OrcArmDP; + +typedef enum { + ORC_ARM_COND_EQ = 0, + ORC_ARM_COND_NE, + ORC_ARM_COND_CS, + ORC_ARM_COND_CC, + ORC_ARM_COND_MI, + ORC_ARM_COND_PL, + ORC_ARM_COND_VS, + ORC_ARM_COND_VC, + ORC_ARM_COND_HI, + ORC_ARM_COND_LS, + ORC_ARM_COND_GE, + ORC_ARM_COND_LT, + ORC_ARM_COND_GT, + ORC_ARM_COND_LE, + ORC_ARM_COND_AL, +} OrcArmCond; + +typedef enum { + ORC_ARM_LSL, + ORC_ARM_LSR, + ORC_ARM_ASR, + ORC_ARM_ROR +} OrcArmShift; + +unsigned long orc_arm_get_cpu_flags (void); + +void orc_arm_emit (OrcCompiler *compiler, orc_uint32 insn); +void orc_arm_emit_bx_lr (OrcCompiler *compiler); +const char * orc_arm_reg_name (int reg); +const char * orc_arm_cond_name (OrcArmCond cond); +void orc_arm_emit_load_imm (OrcCompiler *compiler, int dest, int imm); + +void orc_arm_emit_add (OrcCompiler *compiler, int dest, int src1, int src2); +void orc_arm_emit_sub (OrcCompiler *compiler, int dest, int src1, int src2); +void orc_arm_emit_add_imm (OrcCompiler *compiler, int dest, int src1, int value); +void orc_arm_emit_and_imm (OrcCompiler *compiler, int dest, int src1, int value); +void orc_arm_emit_sub_imm (OrcCompiler *compiler, int dest, int src1, int value, int record); +void orc_arm_emit_asr_imm (OrcCompiler *compiler, int dest, int src1, int value); +void orc_arm_emit_lsl_imm (OrcCompiler *compiler, int dest, int src1, int value); +void orc_arm_emit_cmp_imm (OrcCompiler *compiler, int src1, int value); +void orc_arm_emit_cmp (OrcCompiler *compiler, int src1, int src2); +void orc_arm_emit_mov (OrcCompiler *compiler, int dest, int src); + +void orc_arm_emit_align (OrcCompiler *compiler, int align_shift); +void orc_arm_emit_label (OrcCompiler *compiler, int label); +void orc_arm_emit_push (OrcCompiler *compiler, int regs); +void orc_arm_emit_pop (OrcCompiler *compiler, int regs); +void orc_arm_emit_branch (OrcCompiler *compiler, int cond, int label); +void orc_arm_emit_data (OrcCompiler *compiler, orc_uint32 data); + +void orc_arm_loadb (OrcCompiler *compiler, int dest, int src1, int offset); +void orc_arm_storeb (OrcCompiler *compiler, int dest, int offset, int src1); +void orc_arm_loadw (OrcCompiler *compiler, int dest, int src1, int offset); +void orc_arm_storew (OrcCompiler *compiler, int dest, int offset, int src1); +void orc_arm_loadl (OrcCompiler *compiler, int dest, int src1, int offset); +void orc_arm_storel (OrcCompiler *compiler, int dest, int offset, int src1); + +void orc_arm_emit_load_reg (OrcCompiler *compiler, int dest, int src1, int offset); +void orc_arm_emit_store_reg (OrcCompiler *compiler, int src, int dest, int offset); + +void orc_arm_add_fixup (OrcCompiler *compiler, int label, int type); +void orc_arm_do_fixups (OrcCompiler *compiler); + +void orc_arm_emit_dp (OrcCompiler *p, int type, OrcArmCond cond, OrcArmDP opcode, + int S, int Rd, int Rn, int Rm, int shift, orc_uint32 val); +void orc_arm_emit_par (OrcCompiler *p, int op, int mode, OrcArmCond cond, + int Rd, int Rn, int Rm); +void orc_arm_emit_xt (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rn, int Rm, int r8); +void orc_arm_emit_pkh (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rn, int Rm, int sh); +void orc_arm_emit_sat (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int sat, int Rm, int sh, int asr); +void orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond, + int Rd, int Rm); +void orc_arm_emit_nop (OrcCompiler *compiler); + +void orc_arm_flush_cache (OrcCode *code); + +/* ALL cpus */ +/* data procesing instructions */ +/* {}{s} {}, , #imm */ +#define orc_arm_emit_and_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_AND,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_eor_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_EOR,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_sub_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_SUB,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_rsb_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_RSB,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_add_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_ADD,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_adc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_ADC,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_sbc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_SBC,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_rsc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_RSC,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_tst_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_TST,1, 0,Rn,0,0,imm) +#define orc_arm_emit_teq_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_TEQ,1, 0,Rn,0,0,imm) +#define orc_arm_emit_cmp_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_CMP,1, 0,Rn,0,0,imm) +#define orc_arm_emit_cmn_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_CMN,1, 0,Rn,0,0,imm) +#define orc_arm_emit_orr_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_ORR,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_mov_i(p,cond,S,Rd,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_MOV,S,Rd, 0,0,0,imm) +#define orc_arm_emit_bic_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_BIC,S,Rd,Rn,0,0,imm) +#define orc_arm_emit_mvn_i(p,cond,S,Rd,imm) orc_arm_emit_dp(p,0,cond,ORC_ARM_DP_MVN,S,Rd, 0,0,0,imm) + +/* {}{s} {}, , */ +#define orc_arm_emit_and_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_eor_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_sub_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_rsb_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_add_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_adc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_sbc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_rsc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_tst_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_TST,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_teq_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_cmp_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_cmn_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_orr_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_mov_r(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,0,0) +#define orc_arm_emit_bic_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_mvn_r(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,1,cond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,0,0) + +/* {}{s} {}, , , [LSL|LSR|ASR] #imm */ +#define orc_arm_emit_and_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_eor_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_sub_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_rsb_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_add_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_adc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_sbc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_rsc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_tst_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_TST,1, 0,Rn,Rm,sh,im) +#define orc_arm_emit_teq_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,sh,im) +#define orc_arm_emit_cmp_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,sh,im) +#define orc_arm_emit_cmn_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,sh,im) +#define orc_arm_emit_orr_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_mov_rsi(p,cond,S,Rd,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,sh,im) +#define orc_arm_emit_bic_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,sh,im) +#define orc_arm_emit_mvn_rsi(p,cond,S,Rd,Rm,sh,im) orc_arm_emit_dp(p,2,cond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,sh,im) + +/* {}{s} {}, , , [LSL|LSR|ASR] */ +#define orc_arm_emit_and_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_eor_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_sub_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_rsb_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_add_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_adc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_sbc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_rsc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_tst_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_TST,1, 0,Rn,Rm,sh,Rs) +#define orc_arm_emit_teq_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,sh,Rs) +#define orc_arm_emit_cmp_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,sh,Rs) +#define orc_arm_emit_cmn_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,sh,Rs) +#define orc_arm_emit_orr_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_mov_rsr(p,cond,S,Rd,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,sh,Rs) +#define orc_arm_emit_bic_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,sh,Rs) +#define orc_arm_emit_mvn_rsr(p,cond,S,Rd,Rm,sh,Rs) orc_arm_emit_dp(p,3,cond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,sh,Rs) + +/* {}{s} {,} , , RRX */ +#define orc_arm_emit_and_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_eor_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_sub_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_rsb_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_add_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_adc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_sbc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_rsc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_tst_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_TST,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_teq_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_cmp_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_cmn_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,0,0) +#define orc_arm_emit_orr_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_mov_rrx(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,0,0) +#define orc_arm_emit_bic_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,0,0) +#define orc_arm_emit_mvn_rrx(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,4,cond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,0,0) + +/* parallel instructions */ +#define orc_arm_emit_sadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_uadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,5,cond,Rd,Rn,Rm) + +#define orc_arm_emit_saddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_uaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,5,cond,Rd,Rn,Rm) + +#define orc_arm_emit_ssubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_usubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,5,cond,Rd,Rn,Rm) + +#define orc_arm_emit_ssub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_usub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,5,cond,Rd,Rn,Rm) + +#define orc_arm_emit_sadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_uadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,5,cond,Rd,Rn,Rm) + +#define orc_arm_emit_ssub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,0,cond,Rd,Rn,Rm) +#define orc_arm_emit_qsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,1,cond,Rd,Rn,Rm) +#define orc_arm_emit_shsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,2,cond,Rd,Rn,Rm) +#define orc_arm_emit_usub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,3,cond,Rd,Rn,Rm) +#define orc_arm_emit_uqsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,4,cond,Rd,Rn,Rm) +#define orc_arm_emit_uhsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,5,cond,Rd,Rn,Rm) + +/* selection */ +#define orc_arm_emit_sel(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,6,6,cond,Rd,Rn,Rm) + +/* saturating add */ +#define orc_arm_emit_qadd(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,7,7, cond,Rd,Rn,Rm) +#define orc_arm_emit_qsub(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,8,8, cond,Rd,Rn,Rm) +#define orc_arm_emit_qdadd(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,7,9, cond,Rd,Rn,Rm) +#define orc_arm_emit_qdsub(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,8,10,cond,Rd,Rn,Rm) + +/* extend instructions */ +/* with ROR #r8, r8 should be a multiple of 8 */ +#define orc_arm_emit_sxtb16_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,0, cond,Rd,15,Rm,r8) +#define orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,1, cond,Rd,15,Rm,r8) +#define orc_arm_emit_sxth_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,2, cond,Rd,15,Rm,r8) +#define orc_arm_emit_uxtb16_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,3, cond,Rd,15,Rm,r8) +#define orc_arm_emit_uxtb_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,4, cond,Rd,15,Rm,r8) +#define orc_arm_emit_uxth_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,5, cond,Rd,15,Rm,r8) +#define orc_arm_emit_sxtab16_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,6, cond,Rd,Rn,Rm,r8) +#define orc_arm_emit_sxtab_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,7, cond,Rd,Rn,Rm,r8) +#define orc_arm_emit_sxtah_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,8, cond,Rd,Rn,Rm,r8) +#define orc_arm_emit_uxtab16_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,9, cond,Rd,Rn,Rm,r8) +#define orc_arm_emit_uxtab_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,10,cond,Rd,Rn,Rm,r8) +#define orc_arm_emit_uxtah_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,11,cond,Rd,Rn,Rm,r8) +/* with out rotate */ +#define orc_arm_emit_sxtb16(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_sxtb(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_sxth(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxtb16(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxtb(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxth(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_sxtab16(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_sxtab(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_sxtah(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxtab16(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxtab(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) +#define orc_arm_emit_uxtah(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,0) + +/* misc instructions */ + +/* packing */ +#define orc_arm_emit_pkhbt(p,cond,Rd,Rn,Rm) orc_arm_emit_pkh(p,0,cond,Rd,Rn,Rm,0) +#define orc_arm_emit_pkhtb(p,cond,Rd,Rn,Rm) orc_arm_emit_pkh(p,1,cond,Rd,Rn,Rm,0) +/* with [LSL|ASR] #imm */ +#define orc_arm_emit_pkhbt_s(p,cond,Rd,Rn,Rm,lsl) orc_arm_emit_pkh(p,0,cond,Rd,Rn,Rm,lsl) +#define orc_arm_emit_pkhtb_s(p,cond,Rd,Rn,Rm,asr) orc_arm_emit_pkh(p,1,cond,Rd,Rn,Rm,asr) + +/* saturation */ +#define orc_arm_emit_ssat(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,0,cond,Rd,sat,Rm,0, 0) +#define orc_arm_emit_usat(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,1,cond,Rd,sat,Rm,0, 0) +#define orc_arm_emit_ssat_lsl(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,0,cond,Rd,sat,Rm,sh,0) +#define orc_arm_emit_usat_lsl(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,1,cond,Rd,sat,Rm,sh,0) +#define orc_arm_emit_ssat_asr(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,0,cond,Rd,sat,Rm,sh,1) +#define orc_arm_emit_usat_asr(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,1,cond,Rd,sat,Rm,sh,1) +#define orc_arm_emit_ssat16(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,2,cond,Rd,sat,Rm,0, 0) +#define orc_arm_emit_usat16(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,3,cond,Rd,sat,Rm,0, 0) + +/* reversing */ +#define orc_arm_emit_rev(p,cond,Rd,Rm) orc_arm_emit_rv (p,0,cond,Rd,Rm) +#define orc_arm_emit_rev16(p,cond,Rd,Rm) orc_arm_emit_rv (p,1,cond,Rd,Rm) + +#endif + diff --git a/orc/orccode.c b/orc/orccode.c new file mode 100644 index 0000000..ca5946c --- /dev/null +++ b/orc/orccode.c @@ -0,0 +1,41 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include + + +OrcCode * +orc_code_new (void) +{ + OrcCode *code; + code = malloc(sizeof(OrcCode)); + memset (code, 0, sizeof(OrcCode)); + return code; +} + +void +orc_code_free (OrcCode *code) +{ + if (code->insns) { + free (code->insns); + code->insns = NULL; + } + if (code->vars) { + free (code->vars); + code->vars = NULL; + } + if (code->chunk) { + orc_code_chunk_free (code->chunk); + code->chunk = NULL; + } + + free (code); +} + + + diff --git a/orc/orccodemem.c b/orc/orccodemem.c new file mode 100644 index 0000000..eee7f2f --- /dev/null +++ b/orc/orccodemem.c @@ -0,0 +1,295 @@ + +#include "config.h" + +#include +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#ifdef HAVE_CODEMEM_MMAP +#include +#endif +#ifdef HAVE_CODEMEM_VIRTUALALLOC +#include +#endif + +#include +#include + + +#define SIZE 65536 + +typedef struct _OrcCodeRegion OrcCodeRegion; + +struct _OrcCodeRegion { + orc_uint8 *write_ptr; + orc_uint8 *exec_ptr; + int size; + + OrcCodeChunk *chunks; +}; + +struct _OrcCodeChunk { + /*< private >*/ + struct _OrcCodeChunk *next; + struct _OrcCodeChunk *prev; + struct _OrcCodeRegion *region; + int used; + + int offset; + int size; +}; + + +void orc_code_region_allocate_codemem (OrcCodeRegion *region); + +static OrcCodeRegion **orc_code_regions; +static int orc_code_n_regions; + + +OrcCodeRegion * +orc_code_region_new (void) +{ + OrcCodeRegion *region; + OrcCodeChunk *chunk; + + region = malloc(sizeof(OrcCodeRegion)); + memset (region, 0, sizeof(OrcCodeRegion)); + + orc_code_region_allocate_codemem (region); + + chunk = malloc(sizeof(OrcCodeChunk)); + memset (chunk, 0, sizeof(OrcCodeChunk)); + + chunk->offset = 0; + chunk->used = FALSE; + chunk->region = region; + chunk->size = region->size; + + region->chunks = chunk; + + return region; +} + +OrcCodeChunk * +orc_code_chunk_split (OrcCodeChunk *chunk, int size) +{ + OrcCodeChunk *newchunk; + + newchunk = malloc(sizeof(OrcCodeChunk)); + memset (newchunk, 0, sizeof(OrcCodeChunk)); + + newchunk->region = chunk->region; + newchunk->offset = chunk->offset + size; + newchunk->size = chunk->size - size; + newchunk->next = chunk->next; + newchunk->prev = chunk->prev; + + chunk->size = size; + if (chunk->next) { + chunk->next->prev = newchunk; + } + chunk->next = newchunk; + + return newchunk; +} + +void +orc_code_chunk_merge (OrcCodeChunk *chunk) +{ + OrcCodeChunk *chunk2 = chunk->next; + + chunk->next = chunk2->next; + if (chunk2->next) { + chunk2->next->prev = chunk; + } + chunk->size += chunk2->size; + + free(chunk2); +} + +OrcCodeChunk * +orc_code_region_get_free_chunk (int size) +{ + int i; + OrcCodeRegion *region; + OrcCodeChunk *chunk; + + for(i=0;ichunks; chunk; chunk = chunk->next) { + if (!chunk->used && size <= chunk->size) { + return chunk; + } + } + } + + orc_code_regions = realloc (orc_code_regions, + sizeof(void *)*(orc_code_n_regions+1)); + orc_code_regions[orc_code_n_regions] = orc_code_region_new (); + region = orc_code_regions[orc_code_n_regions]; + orc_code_n_regions++; + + for(chunk = region->chunks; chunk; chunk = chunk->next) { + if (!chunk->used && size <= chunk->size){ + return chunk; + } + } + + ORC_ASSERT(0); + + return NULL; +} + +void +orc_code_allocate_codemem (OrcCode *code, int size) +{ + OrcCodeRegion *region; + OrcCodeChunk *chunk; + int aligned_size = (size + 15) & (~15); + + chunk = orc_code_region_get_free_chunk (aligned_size); + region = chunk->region; + + if (chunk->size > aligned_size) { + orc_code_chunk_split (chunk, aligned_size); + } + + chunk->used = TRUE; + + code->chunk = chunk; + code->code = ORC_PTR_OFFSET(region->write_ptr, chunk->offset); + code->exec = ORC_PTR_OFFSET(region->exec_ptr, chunk->offset); + code->code_size = size; + //compiler->codeptr = ORC_PTR_OFFSET(region->write_ptr, chunk->offset); +} + +void +orc_code_chunk_free (OrcCodeChunk *chunk) +{ + if (_orc_compiler_flag_debug) { + /* If debug is turned on, don't free code */ + return; + } + + chunk->used = FALSE; + if (chunk->next && !chunk->next->used) { + orc_code_chunk_merge (chunk); + } + if (chunk->prev && !chunk->prev->used) { + orc_code_chunk_merge (chunk->prev); + } +} + +#ifdef HAVE_CODEMEM_MMAP +int +orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region, + const char *dir, int force_unlink) +{ + int fd; + int n; + char *filename; + + filename = malloc (strlen ("/orcexec..") + + strlen (dir) + 6 + 1); + sprintf(filename, "%s/orcexec.XXXXXX", dir); + fd = mkstemp (filename); + if (fd == -1) { + ORC_WARNING ("failed to create temp file"); + return FALSE; + } + if (force_unlink || !_orc_compiler_flag_debug) { + unlink (filename); + } + free (filename); + + n = ftruncate (fd, SIZE); + + region->exec_ptr = mmap (NULL, SIZE, PROT_READ|PROT_EXEC, + MAP_SHARED, fd, 0); + if (region->exec_ptr == MAP_FAILED) { + ORC_WARNING("failed to create exec map"); + close (fd); + return FALSE; + } + region->write_ptr = mmap (NULL, SIZE, PROT_READ|PROT_WRITE, + MAP_SHARED, fd, 0); + if (region->write_ptr == MAP_FAILED) { + ORC_WARNING ("failed to create write map"); + close (fd); + return FALSE; + } + region->size = SIZE; + + close (fd); + return TRUE; +} + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +int +orc_code_region_allocate_codemem_anon_map (OrcCodeRegion *region) +{ + region->exec_ptr = mmap (NULL, SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, + MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if (region->exec_ptr == MAP_FAILED) { + ORC_WARNING("failed to create write/exec map"); + return FALSE; + } + region->write_ptr = region->exec_ptr; + region->size = SIZE; + return TRUE; +} + +void +orc_code_region_allocate_codemem (OrcCodeRegion *region) +{ + int ret; + const char *tmpdir; + + tmpdir = getenv ("TMPDIR"); + ret = orc_code_region_allocate_codemem_dual_map (region, + tmpdir ? tmpdir : "/tmp", FALSE); + if (!ret) { + ret = orc_code_region_allocate_codemem_dual_map (region, + getenv ("HOME"), TRUE); + } + if (!ret) { + ret = orc_code_region_allocate_codemem_anon_map (region); + } + if (!ret) { + ORC_ERROR("Failed to create write and exec mmap regions. This " + "is probably because SELinux execmem check is enabled (good) " + "and $TMPDIR and $HOME are mounted noexec (bad)."); + } +} + +#endif + +#ifdef HAVE_CODEMEM_VIRTUALALLOC +void +orc_code_region_allocate_codemem (OrcCodeRegion *region) +{ + region->write_ptr = VirtualAlloc(NULL, SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE); + region->exec_ptr = region->write_ptr; + region->size = SIZE; +} +#endif + +#ifdef HAVE_CODEMEM_MALLOC +void +orc_code_region_allocate_codemem (OrcCodeRegion *region) +{ + region->write_ptr = malloc(SIZE); + region->exec_ptr = region->write_ptr; + region->size = SIZE; +} +#endif + diff --git a/orc/orccompiler.c b/orc/orccompiler.c new file mode 100644 index 0000000..a9b2ada --- /dev/null +++ b/orc/orccompiler.c @@ -0,0 +1,1171 @@ + +#include "config.h" + +#include +#include +#include +#include + +#include +#include + +#ifdef HAVE_VALGRIND_VALGRIND_H +#include +#endif + +/** + * SECTION:orccompiler + * @title: OrcCompiler + * @short_description: Compile Orc programs + * + * OrcCompiler is the object used to convert Orc programs contained + * in an OrcProgram object into assembly code and object code. + * + * The OrcCompileResult enum is used to indicate whether or not + * a compilation attempt was successful or not. The macros + * ORC_COMPILE_RESULT_IS_SUCCESSFUL() and ORC_COMPILE_RESULT_IS_FATAL() + * should be used instead of checking values directly. + * + * When a program is compiled, the compiler calls the functions + * contained in various OrcRule structures. These functions generate + * assembly and object instructions by calling ORC_ASM_CODE() + * or functions that use ORC_ASM_CODE() internally. + */ + +void orc_compiler_assign_rules (OrcCompiler *compiler); +void orc_compiler_global_reg_alloc (OrcCompiler *compiler); +void orc_compiler_rewrite_insns (OrcCompiler *compiler); +void orc_compiler_rewrite_vars (OrcCompiler *compiler); +void orc_compiler_rewrite_vars2 (OrcCompiler *compiler); +int orc_compiler_dup_temporary (OrcCompiler *compiler, int var, int j); +int orc_compiler_new_temporary (OrcCompiler *compiler, int size); +void orc_compiler_check_sizes (OrcCompiler *compiler); + +static char **_orc_compiler_flag_list; +int _orc_compiler_flag_backup; +int _orc_compiler_flag_emulate; +int _orc_compiler_flag_debug; + +void +_orc_compiler_init (void) +{ + const char *envvar; + + envvar = getenv ("ORC_CODE"); + if (envvar != NULL) { + _orc_compiler_flag_list = strsplit (envvar, ','); + } + + _orc_compiler_flag_backup = orc_compiler_flag_check ("backup"); + _orc_compiler_flag_emulate = orc_compiler_flag_check ("emulate"); + _orc_compiler_flag_debug = orc_compiler_flag_check ("debug"); +} + +int +orc_compiler_flag_check (const char *flag) +{ + int i; + + if (_orc_compiler_flag_list == NULL) return FALSE; + + for (i=0;_orc_compiler_flag_list[i];i++){ + if (strcmp (_orc_compiler_flag_list[i], flag) == 0) return TRUE; + } + return FALSE; +} + +int +orc_compiler_allocate_register (OrcCompiler *compiler, int data_reg) +{ + int i; + int roff; + int reg; + int offset; + + if (data_reg) { + offset = compiler->target->data_register_offset; + } else { + offset = ORC_GP_REG_BASE; + } + + roff = 0; +#if 0 + /* for testing */ + roff = rand()&0xf; +#endif + + for(i=0;i<32;i++){ + reg = offset + ((roff + i)&0x1f); + if (compiler->valid_regs[reg] && + !compiler->save_regs[reg] && + compiler->alloc_regs[reg] == 0) { + compiler->alloc_regs[reg]++; + compiler->used_regs[reg] = 1; + return reg; + } + } + for(i=0;i<32;i++){ + reg = offset + ((roff + i)&0x1f); + if (compiler->valid_regs[reg] && + compiler->alloc_regs[reg] == 0) { + compiler->alloc_regs[reg]++; + compiler->used_regs[reg] = 1; + return reg; + } + } + + if (data_reg || !compiler->allow_gp_on_stack) { + ORC_COMPILER_ERROR (compiler, "register overflow for %s reg", + data_reg ? "vector" : "gp"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } + + return 0; +} + +/** + * orc_program_compile: + * @program: the OrcProgram to compile + * + * Compiles an Orc program for the current CPU. If successful, + * executable code for the program was generated and can be + * executed. + * + * The return value indicates various levels of success or failure. + * Success can be determined by checking for a true value of the + * macro ORC_COMPILE_RESULT_IS_SUCCESSFUL() on the return value. This + * indicates that executable code was generated. If the macro + * ORC_COMPILE_RESULT_IS_FATAL() on the return value evaluates to + * true, then there was a syntactical error in the program. If the + * result is neither successful nor fatal, the program can still be + * emulated. + * + * Returns: an OrcCompileResult + */ +OrcCompileResult +orc_program_compile (OrcProgram *program) +{ + return orc_program_compile_for_target (program, orc_target_get_default ()); +} + +/** + * orc_program_compile_for_target: + * @program: the OrcProgram to compile + * + * Compiles an Orc program for the given target, using the + * default target flags for that target. + * + * Returns: an OrcCompileResult + */ +OrcCompileResult +orc_program_compile_for_target (OrcProgram *program, OrcTarget *target) +{ + unsigned int flags; + + if (target) { + flags = target->get_default_flags (); + } else { + flags = 0; + } + + return orc_program_compile_full (program, target, flags); +} + +/** + * orc_program_compile_full: + * @program: the OrcProgram to compile + * + * Compiles an Orc program for the given target, using the + * given target flags. + * + * Returns: an OrcCompileResult + */ +OrcCompileResult +orc_program_compile_full (OrcProgram *program, OrcTarget *target, + unsigned int flags) +{ + OrcCompiler *compiler; + int i; + OrcCompileResult result; + + ORC_INFO("initializing compiler for program \"%s\"", program->name); + compiler = malloc (sizeof(OrcCompiler)); + memset (compiler, 0, sizeof(OrcCompiler)); + + if (program->backup_func) { + program->code_exec = program->backup_func; + } else { + program->code_exec = (void *)orc_executor_emulate; + } + + compiler->program = program; + compiler->target = target; + compiler->target_flags = flags; + + if (program->backup_func && _orc_compiler_flag_backup) { + ORC_COMPILER_ERROR(compiler, "Compilation disabled"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + goto error; + } + + { + ORC_LOG("variables"); + for(i=0;ivars[i].size > 0) { + ORC_LOG("%d: %s size %d type %d alloc %d", i, + program->vars[i].name, + program->vars[i].size, + program->vars[i].vartype, + program->vars[i].alloc); + } + } + ORC_LOG("instructions"); + for(i=0;in_insns;i++){ + ORC_LOG("%d: %s %d %d %d %d", i, + program->insns[i].opcode->name, + program->insns[i].dest_args[0], + program->insns[i].dest_args[1], + program->insns[i].src_args[0], + program->insns[i].src_args[1]); + } + } + + memcpy (compiler->insns, program->insns, + program->n_insns * sizeof(OrcInstruction)); + compiler->n_insns = program->n_insns; + + memcpy (compiler->vars, program->vars, + ORC_N_VARIABLES * sizeof(OrcVariable)); + memset (compiler->vars + ORC_N_VARIABLES, 0, + (ORC_N_COMPILER_VARIABLES - ORC_N_VARIABLES) * sizeof(OrcVariable)); + compiler->n_temp_vars = program->n_temp_vars; + compiler->n_dup_vars = 0; + + for(i=0;i<32;i++) { + compiler->valid_regs[i] = 1; + } + + orc_compiler_check_sizes (compiler); + if (compiler->error) goto error; + + if (compiler->target) { + compiler->target->compiler_init (compiler); + } + + orc_compiler_rewrite_insns (compiler); + if (compiler->error) goto error; + + orc_compiler_rewrite_vars (compiler); + if (compiler->error) goto error; + + if (compiler->target) { + orc_compiler_global_reg_alloc (compiler); + + orc_compiler_rewrite_vars2 (compiler); + } + +#if 0 + { + ORC_ERROR("variables"); + for(i=0;ivars[i].size > 0) { + ORC_ERROR("%d: %s size %d type %d alloc %d [%d,%d]", i, + compiler->vars[i].name, + compiler->vars[i].size, + compiler->vars[i].vartype, + compiler->vars[i].alloc, + compiler->vars[i].first_use, + compiler->vars[i].last_use); + } + } + ORC_ERROR("instructions"); + for(i=0;in_insns;i++){ + ORC_ERROR("%d: %s %d %d %d %d", i, + compiler->insns[i].opcode->name, + compiler->insns[i].dest_args[0], + compiler->insns[i].dest_args[1], + compiler->insns[i].src_args[0], + compiler->insns[i].src_args[1]); + } + } +#endif + + if (compiler->error) goto error; + + program->orccode = orc_code_new (); + + program->orccode->is_2d = program->is_2d; + program->orccode->constant_n = program->constant_n; + program->orccode->constant_m = program->constant_m; + + program->orccode->n_insns = compiler->n_insns; + program->orccode->insns = malloc(sizeof(OrcInstruction) * compiler->n_insns); + memcpy (program->orccode->insns, compiler->insns, + sizeof(OrcInstruction) * compiler->n_insns); + + program->orccode->vars = malloc (sizeof(OrcCodeVariable) * ORC_N_COMPILER_VARIABLES); + memset (program->orccode->vars, 0, + sizeof(OrcCodeVariable) * ORC_N_COMPILER_VARIABLES); + for(i=0;iorccode->vars[i].vartype = compiler->vars[i].vartype; + program->orccode->vars[i].size = compiler->vars[i].size; + program->orccode->vars[i].value = compiler->vars[i].value; + } + + if (_orc_compiler_flag_emulate || target == NULL) { + program->code_exec = (void *)orc_executor_emulate; + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + goto error; + } + + orc_compiler_assign_rules (compiler); + if (compiler->error) goto error; + + ORC_INFO("allocating code memory"); + compiler->code = malloc(65536); + compiler->codeptr = compiler->code; + + if (compiler->error) goto error; + + ORC_INFO("compiling for target \"%s\"", compiler->target->name); + compiler->target->compile (compiler); + if (compiler->error) { + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + goto error; + } + + program->orccode->code_size = compiler->codeptr - compiler->code; + orc_code_allocate_codemem (program->orccode, program->orccode->code_size); + + memcpy (program->orccode->code, compiler->code, program->orccode->code_size); + +#ifdef VALGRIND_DISCARD_TRANSLATIONS + VALGRIND_DISCARD_TRANSLATIONS (program->orccode->exec, + program->orccode->code_size); +#endif + + if (compiler->target->flush_cache) { + compiler->target->flush_cache (program->orccode); + } + + program->code_exec = program->orccode->exec; + + program->asm_code = compiler->asm_code; + + result = compiler->result; + for (i=0;in_dup_vars;i++){ + free(compiler->vars[ORC_VAR_T1 + compiler->n_temp_vars + i].name); + compiler->vars[ORC_VAR_T1 + compiler->n_temp_vars + i].name = NULL; + } + free (compiler->code); + compiler->code = NULL; + free (compiler); + ORC_INFO("finished compiling (success)"); + + return result; +error: + + ORC_WARNING("program %s failed to compile, reason %d", + program->name, compiler->result); + result = compiler->result; + if (result == 0) { + result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } + if (compiler->asm_code) { + free (compiler->asm_code); + compiler->asm_code = NULL; + } + for (i=0;in_dup_vars;i++){ + free(compiler->vars[ORC_VAR_T1 + compiler->n_temp_vars + i].name); + compiler->vars[ORC_VAR_T1 + compiler->n_temp_vars + i].name = NULL; + } + free (compiler->code); + compiler->code = NULL; + free (compiler); + ORC_INFO("finished compiling (fail)"); + return result; +} + +void +orc_compiler_check_sizes (OrcCompiler *compiler) +{ + int i; + int j; + int max_size = 1; + + for(i=0;in_insns;i++) { + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + int multiplier = 1; + + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + multiplier = 2; + } else if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + multiplier = 4; + } + + for(j=0;jdest_size[j] == 0) continue; + if (multiplier * opcode->dest_size[j] != + compiler->vars[insn->dest_args[j]].size) { + ORC_COMPILER_ERROR(compiler, "size mismatch, opcode %s dest[%d] is %d should be %d", + opcode->name, j, compiler->vars[insn->dest_args[j]].size, + multiplier * opcode->dest_size[j]); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + return; + } + max_size = MAX(max_size, multiplier * opcode->dest_size[j]); + } + for(j=0;jsrc_size[j] == 0) continue; + if (multiplier * opcode->src_size[j] != + compiler->vars[insn->src_args[j]].size && + compiler->vars[insn->src_args[j]].vartype != ORC_VAR_TYPE_PARAM && + compiler->vars[insn->src_args[j]].vartype != ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler, "size mismatch, opcode %s src[%d] is %d should be %d", + opcode->name, j, compiler->vars[insn->src_args[j]].size, + multiplier * opcode->src_size[j]); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + return; + } + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR && j >= 1 && + compiler->vars[insn->src_args[j]].vartype != ORC_VAR_TYPE_PARAM && + compiler->vars[insn->src_args[j]].vartype != ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler, "opcode %s requires const or param source", + opcode->name); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + return; + } + max_size = MAX(max_size, multiplier * opcode->src_size[j]); + } + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR && + opcode->src_size[1] == 0 && + compiler->vars[insn->src_args[0]].vartype != ORC_VAR_TYPE_PARAM && + compiler->vars[insn->src_args[0]].vartype != ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler, "opcode %s requires const or param source", + opcode->name); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + return; + } + } + compiler->max_var_size = max_size; +} + +static OrcStaticOpcode * +get_load_opcode_for_size (int size) +{ + switch (size) { + case 1: + return orc_opcode_find_by_name ("loadb"); + case 2: + return orc_opcode_find_by_name ("loadw"); + case 4: + return orc_opcode_find_by_name ("loadl"); + case 8: + return orc_opcode_find_by_name ("loadq"); + default: + ORC_ASSERT(0); + } + return NULL; +} + +static OrcStaticOpcode * +get_loadp_opcode_for_size (int size) +{ + switch (size) { + case 1: + return orc_opcode_find_by_name ("loadpb"); + case 2: + return orc_opcode_find_by_name ("loadpw"); + case 4: + return orc_opcode_find_by_name ("loadpl"); + case 8: + return orc_opcode_find_by_name ("loadpq"); + default: + ORC_ASSERT(0); + } + return NULL; +} + +static OrcStaticOpcode * +get_store_opcode_for_size (int size) +{ + switch (size) { + case 1: + return orc_opcode_find_by_name ("storeb"); + case 2: + return orc_opcode_find_by_name ("storew"); + case 4: + return orc_opcode_find_by_name ("storel"); + case 8: + return orc_opcode_find_by_name ("storeq"); + default: + ORC_ASSERT(0); + } + return NULL; +} + +void +orc_compiler_rewrite_insns (OrcCompiler *compiler) +{ + int i; + int j; + OrcStaticOpcode *opcode; + OrcProgram *program = compiler->program; + + compiler->n_insns = 0; + for(j=0;jn_insns;j++){ + OrcInstruction insn; + OrcInstruction *xinsn; + + memcpy (&insn, program->insns + j, sizeof(OrcInstruction)); + opcode = insn.opcode; + + if (!(opcode->flags & ORC_STATIC_OPCODE_LOAD)) { + for(i=0;isrc_size[i] == 0) continue; + if (i > 0 && (opcode->flags & ORC_STATIC_OPCODE_SCALAR)) continue; + + var = compiler->vars + insn.src_args[i]; + if (var->vartype == ORC_VAR_TYPE_SRC || + var->vartype == ORC_VAR_TYPE_DEST) { + OrcInstruction *cinsn; + + cinsn = compiler->insns + compiler->n_insns; + compiler->n_insns++; + + cinsn->flags = insn.flags; + cinsn->flags |= ORC_INSN_FLAG_ADDED; + cinsn->flags &= ~(ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4); + cinsn->opcode = get_load_opcode_for_size (var->size); + cinsn->dest_args[0] = orc_compiler_new_temporary (compiler, + var->size); + cinsn->src_args[0] = insn.src_args[i]; + insn.src_args[i] = cinsn->dest_args[0]; + } else if (var->vartype == ORC_VAR_TYPE_CONST || + var->vartype == ORC_VAR_TYPE_PARAM) { + OrcInstruction *cinsn; + int multiplier; + + cinsn = compiler->insns + compiler->n_insns; + compiler->n_insns++; + + multiplier = 1; + if (insn.flags & ORC_INSTRUCTION_FLAG_X2) { + multiplier = 2; + } + if (insn.flags & ORC_INSTRUCTION_FLAG_X4) { + multiplier = 4; + } + + cinsn->flags = insn.flags; + cinsn->flags |= ORC_INSN_FLAG_ADDED; + cinsn->opcode = get_loadp_opcode_for_size (opcode->src_size[i]); + cinsn->dest_args[0] = orc_compiler_new_temporary (compiler, + opcode->src_size[i] * multiplier); + cinsn->src_args[0] = insn.src_args[i]; + insn.src_args[i] = cinsn->dest_args[0]; + + } + } + } + + xinsn = compiler->insns + compiler->n_insns; + memcpy (xinsn, &insn, sizeof(OrcInstruction)); + compiler->n_insns++; + + if (!(opcode->flags & ORC_STATIC_OPCODE_STORE)) { + for(i=0;idest_size[i] == 0) continue; + + var = compiler->vars + insn.dest_args[i]; + if (var->vartype == ORC_VAR_TYPE_DEST) { + OrcInstruction *cinsn; + + cinsn = compiler->insns + compiler->n_insns; + compiler->n_insns++; + + cinsn->flags = xinsn->flags; + cinsn->flags |= ORC_INSN_FLAG_ADDED; + cinsn->flags &= ~(ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4); + cinsn->opcode = get_store_opcode_for_size (var->size); + cinsn->src_args[0] = orc_compiler_new_temporary (compiler, var->size); + cinsn->dest_args[0] = xinsn->dest_args[i]; + xinsn->dest_args[i] = cinsn->src_args[0]; + } + } + } + + } +} + +void +orc_compiler_assign_rules (OrcCompiler *compiler) +{ + int i; + + for(i=0;in_insns;i++) { + OrcInstruction *insn = compiler->insns + i; + + insn->rule = orc_target_get_rule (compiler->target, insn->opcode, + compiler->target_flags); + + if (insn->rule == NULL || insn->rule->emit == NULL) { + ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", + insn->opcode->name, compiler->target->name); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + return; + } + } +} + +int +orc_compiler_get_temp_reg (OrcCompiler *compiler) +{ + int j; + + for(j=0;jalloc_regs[j] = 0; + } + for(j=0;jvars[j].alloc) continue; + + ORC_DEBUG("var %d: %d %d %d", j, compiler->vars[j].alloc, + compiler->vars[j].first_use, + compiler->vars[j].last_use); + + if (compiler->vars[j].first_use == -1) { + compiler->alloc_regs[compiler->vars[j].alloc] = 1; + } else if (compiler->vars[j].first_use <= compiler->insn_index && + compiler->vars[j].last_use >= compiler->insn_index) { + compiler->alloc_regs[compiler->vars[j].alloc] = 1; + } + } + for(j=0;jn_constants;j++){ + if (compiler->constants[j].alloc_reg) { + compiler->alloc_regs[compiler->constants[j].alloc_reg] = 1; + } + } + + ORC_DEBUG("at insn %d %s", compiler->insn_index, + compiler->insns[compiler->insn_index].opcode->name); + for(j=0;j<8;j++){ + ORC_DEBUG("xmm%d: %d %d", j, compiler->valid_regs[ORC_VEC_REG_BASE + j], + compiler->alloc_regs[ORC_VEC_REG_BASE + j]); + } + + for(j=compiler->min_temp_reg;jvalid_regs[j] && !compiler->alloc_regs[j]) { + compiler->min_temp_reg = j+1; + if (compiler->max_used_temp_reg < j) compiler->max_used_temp_reg = j; + return j; + } + } + + ORC_COMPILER_ERROR(compiler,"no temporary register available"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + + return 0; +} + +void +orc_compiler_rewrite_vars (OrcCompiler *compiler) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + int var; + int actual_var; + + for(j=0;jvars[j].alloc) continue; + compiler->vars[j].last_use = -1; + } + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + /* set up args */ + for(k=0;ksrc_size[k] == 0) continue; + + var = insn->src_args[k]; + if (compiler->vars[var].vartype == ORC_VAR_TYPE_DEST) { + compiler->vars[var].load_dest = TRUE; + } + if (compiler->vars[var].vartype == ORC_VAR_TYPE_SRC || + compiler->vars[var].vartype == ORC_VAR_TYPE_DEST || + compiler->vars[var].vartype == ORC_VAR_TYPE_CONST || + compiler->vars[var].vartype == ORC_VAR_TYPE_PARAM) { + continue; + } + + actual_var = var; + if (compiler->vars[var].replaced) { + actual_var = compiler->vars[var].replacement; + insn->src_args[k] = actual_var; + } + + if (!compiler->vars[var].used) { + if (compiler->vars[var].vartype == ORC_VAR_TYPE_TEMP) { + ORC_COMPILER_ERROR(compiler, "using uninitialized temp var"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + compiler->vars[var].used = TRUE; + compiler->vars[var].first_use = j; + } + compiler->vars[actual_var].last_use = j; + } + + for(k=0;kdest_size[k] == 0) continue; + + var = insn->dest_args[k]; + + if (compiler->vars[var].vartype == ORC_VAR_TYPE_DEST) { + continue; + } + if (compiler->vars[var].vartype == ORC_VAR_TYPE_SRC) { + ORC_COMPILER_ERROR(compiler,"using src var as dest"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + if (compiler->vars[var].vartype == ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler,"using const var as dest"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + if (compiler->vars[var].vartype == ORC_VAR_TYPE_PARAM) { + ORC_COMPILER_ERROR(compiler,"using param var as dest"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + if (compiler->vars[var].vartype != ORC_VAR_TYPE_ACCUMULATOR) { + ORC_COMPILER_ERROR(compiler,"accumulating opcode to non-accumulator dest"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + } else { + if (compiler->vars[var].vartype == ORC_VAR_TYPE_ACCUMULATOR) { + ORC_COMPILER_ERROR(compiler,"non-accumulating opcode to accumulator dest"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } + } + + actual_var = var; + if (compiler->vars[var].replaced) { + actual_var = compiler->vars[var].replacement; + insn->dest_args[k] = actual_var; + } + + if (!compiler->vars[var].used) { + compiler->vars[actual_var].used = TRUE; + compiler->vars[actual_var].first_use = j; + } else { +#if 0 + if (compiler->vars[var].vartype == ORC_VAR_TYPE_DEST) { + ORC_COMPILER_ERROR(compiler,"writing dest more than once"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + } +#endif + if (compiler->vars[var].vartype == ORC_VAR_TYPE_TEMP) { + actual_var = orc_compiler_dup_temporary (compiler, var, j); + compiler->vars[var].replaced = TRUE; + compiler->vars[var].replacement = actual_var; + insn->dest_args[k] = actual_var; + compiler->vars[actual_var].used = TRUE; + compiler->vars[actual_var].first_use = j; + } + } + compiler->vars[actual_var].last_use = j; + } + } +} + +void +orc_compiler_global_reg_alloc (OrcCompiler *compiler) +{ + int i; + OrcVariable *var; + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + var->ptr_register = orc_compiler_allocate_register (compiler, FALSE); + if (compiler->need_mask_regs) { + var->mask_alloc = orc_compiler_allocate_register (compiler, TRUE); + var->ptr_offset = orc_compiler_allocate_register (compiler, FALSE); + var->aligned_data = orc_compiler_allocate_register (compiler, TRUE); + } + if (var->need_offset_reg) { + var->ptr_offset = orc_compiler_allocate_register (compiler, FALSE); + } + break; + case ORC_VAR_TYPE_DEST: + var->ptr_register = orc_compiler_allocate_register (compiler, FALSE); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + var->first_use = -1; + var->last_use = -1; + var->alloc = orc_compiler_allocate_register (compiler, TRUE); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler, "bad vartype"); + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; + break; + } + + if (compiler->error) break; + } + + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + if (opcode->flags & ORC_STATIC_OPCODE_INVARIANT) { + var = compiler->vars + insn->dest_args[0]; + + var->first_use = -1; + var->last_use = -1; + var->alloc = orc_compiler_allocate_register (compiler, TRUE); + insn->flags |= ORC_INSN_FLAG_INVARIANT; + } + + if (opcode->flags & ORC_STATIC_OPCODE_ITERATOR) { + compiler->has_iterator_opcode = TRUE; + } + } + + if (compiler->alloc_loop_counter && !compiler->error) { + compiler->loop_counter = orc_compiler_allocate_register (compiler, FALSE); + /* FIXME massive hack */ + if (compiler->loop_counter == 0) { + compiler->error = FALSE; + compiler->result = ORC_COMPILE_RESULT_OK; + } + } +} + +void +orc_compiler_rewrite_vars2 (OrcCompiler *compiler) +{ + int i; + int j; + int k; + + for(j=0;jn_insns;j++){ +#if 1 + /* must be true to chain src1 to dest: + * - rule must handle it + * - src1 must be last_use + * - only one dest + */ + if (compiler->insns[j].flags & ORC_INSN_FLAG_INVARIANT) continue; + + if (!(compiler->insns[j].opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) + && compiler->insns[j].opcode->dest_size[1] == 0) { + int src1 = compiler->insns[j].src_args[0]; + int dest = compiler->insns[j].dest_args[0]; + + if (compiler->vars[src1].last_use == j) { + if (compiler->vars[src1].first_use == j) { + k = orc_compiler_allocate_register (compiler, TRUE); + compiler->vars[src1].alloc = k; + } + compiler->alloc_regs[compiler->vars[src1].alloc]++; + compiler->vars[dest].alloc = compiler->vars[src1].alloc; + } + } +#endif + + if (0) { + /* immediate operand, don't load */ + int src2 = compiler->insns[j].src_args[1]; + compiler->vars[src2].alloc = 1; + } else { + int src2 = compiler->insns[j].src_args[1]; + if (compiler->vars[src2].alloc == 1) { + compiler->vars[src2].alloc = 0; + } + } + + for(i=0;ivars[i].name == NULL) continue; + if (compiler->vars[i].last_use == -1) continue; + if (compiler->vars[i].first_use == j) { + if (compiler->vars[i].alloc) continue; + k = orc_compiler_allocate_register (compiler, TRUE); + compiler->vars[i].alloc = k; + } + } + for(i=0;ivars[i].name == NULL) continue; + if (compiler->vars[i].last_use == j) { + compiler->alloc_regs[compiler->vars[i].alloc]--; + } + } + } + +} + +int +orc_compiler_dup_temporary (OrcCompiler *compiler, int var, int j) +{ + int i = ORC_VAR_T1 + compiler->n_temp_vars + compiler->n_dup_vars; + + compiler->vars[i].vartype = ORC_VAR_TYPE_TEMP; + compiler->vars[i].size = compiler->vars[var].size; + compiler->vars[i].name = malloc (strlen(compiler->vars[var].name) + 10); + sprintf(compiler->vars[i].name, "%s.dup%d", compiler->vars[var].name, j); + compiler->n_dup_vars++; + + return i; +} + +int +orc_compiler_new_temporary (OrcCompiler *compiler, int size) +{ + int i = ORC_VAR_T1 + compiler->n_temp_vars + compiler->n_dup_vars; + + compiler->vars[i].vartype = ORC_VAR_TYPE_TEMP; + compiler->vars[i].size = size; + compiler->vars[i].name = malloc (10); + sprintf(compiler->vars[i].name, "tmp%d", i); + compiler->n_dup_vars++; + + return i; +} + +void +orc_compiler_dump_asm (OrcCompiler *compiler) +{ + printf("%s", compiler->asm_code); +} + +/** + * orc_compiler_append_code: + * @p: an OrcCompiler object + * @fmt: a printf-style format string + * @...: optional printf-style arguments + * + * Generates a string using sprintf() on the given format and + * arguments, and appends that string to the generated assembly + * code for the compiler. + * + * This function is used by the ORC_ASM_CODE() macro. + * + * This function is useful in a function implementing an OrcRule + * or implementing a target. + */ +void +orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...) +{ + char tmp[200]; + va_list varargs; + int n; + + va_start (varargs, fmt); + vsnprintf(tmp, 200 - 1, fmt, varargs); + va_end (varargs); + + n = strlen (tmp); + p->asm_code = realloc (p->asm_code, p->asm_code_len + n + 1); + memcpy (p->asm_code + p->asm_code_len, tmp, n + 1); + p->asm_code_len += n; +} + +int +orc_compiler_label_new (OrcCompiler *compiler) +{ + return compiler->n_labels++; +} + +void +orc_compiler_load_constant (OrcCompiler *compiler, int reg, int size, + int value) +{ + compiler->target->load_constant (compiler, reg, size, value); +} + +void +orc_compiler_load_constant_long (OrcCompiler *compiler, int reg, + OrcConstant *constant) +{ + compiler->target->load_constant_long (compiler, reg, constant); +} + +int +orc_compiler_get_temp_constant (OrcCompiler *compiler, int size, int value) +{ + int tmp; + + tmp = orc_compiler_get_temp_reg (compiler); + orc_compiler_load_constant (compiler, tmp, size, value); + return tmp; +} + +int +orc_compiler_get_constant (OrcCompiler *compiler, int size, int value) +{ + int i; + int tmp; + + if (size < 4) { + if (size < 2) { + value &= 0xff; + value |= (value<<8); + } + value &= 0xffff; + value |= (value<<16); + } + + for(i=0;in_constants;i++){ + if (compiler->constants[i].is_long == FALSE && + compiler->constants[i].value == value) { + break; + } + } + if (i == compiler->n_constants) { + compiler->n_constants++; + compiler->constants[i].value = value; + compiler->constants[i].alloc_reg = 0; + compiler->constants[i].use_count = 0; + compiler->constants[i].is_long = FALSE; + } + + compiler->constants[i].use_count++; + + if (compiler->constants[i].alloc_reg != 0) {; + return compiler->constants[i].alloc_reg; + } + tmp = orc_compiler_get_temp_reg (compiler); + orc_compiler_load_constant (compiler, tmp, size, value); + return tmp; +} + +int +orc_compiler_get_constant_long (OrcCompiler *compiler, + orc_uint32 a, orc_uint32 b, orc_uint32 c, orc_uint32 d) +{ + int i; + int tmp; + + for(i=0;in_constants;i++){ + if (compiler->constants[i].is_long == TRUE && + compiler->constants[i].full_value[0] == a && + compiler->constants[i].full_value[1] == b && + compiler->constants[i].full_value[2] == c && + compiler->constants[i].full_value[3] == d) { + break; + } + } + if (i == compiler->n_constants) { + compiler->n_constants++; + compiler->constants[i].full_value[0] = a; + compiler->constants[i].full_value[1] = b; + compiler->constants[i].full_value[2] = c; + compiler->constants[i].full_value[3] = d; + compiler->constants[i].is_long = TRUE; + compiler->constants[i].alloc_reg = 0; + compiler->constants[i].use_count = 0; + } + + compiler->constants[i].use_count++; + + if (compiler->constants[i].alloc_reg != 0) {; + return compiler->constants[i].alloc_reg; + } + tmp = orc_compiler_get_temp_reg (compiler); + orc_compiler_load_constant_long (compiler, tmp, &compiler->constants[i]); + return tmp; +} + +int +orc_compiler_try_get_constant_long (OrcCompiler *compiler, + orc_uint32 a, orc_uint32 b, orc_uint32 c, orc_uint32 d) +{ + int i; + + for(i=0;in_constants;i++){ + if (compiler->constants[i].is_long == TRUE && + compiler->constants[i].full_value[0] == a && + compiler->constants[i].full_value[1] == b && + compiler->constants[i].full_value[2] == c && + compiler->constants[i].full_value[3] == d) { + break; + } + } + if (i == compiler->n_constants) { + compiler->n_constants++; + compiler->constants[i].full_value[0] = a; + compiler->constants[i].full_value[1] = b; + compiler->constants[i].full_value[2] = c; + compiler->constants[i].full_value[3] = d; + compiler->constants[i].is_long = TRUE; + compiler->constants[i].alloc_reg = 0; + compiler->constants[i].use_count = 0; + } + + compiler->constants[i].use_count++; + + if (compiler->constants[i].alloc_reg != 0) {; + return compiler->constants[i].alloc_reg; + } + return ORC_REG_INVALID; +} + + +int +orc_compiler_get_constant_reg (OrcCompiler *compiler) +{ + int j; + + for(j=0;jalloc_regs[j] = 0; + } + for(j=0;jvars[j].alloc) continue; + + ORC_DEBUG("var %d: %d %d %d", j, compiler->vars[j].alloc, + compiler->vars[j].first_use, + compiler->vars[j].last_use); + + if (compiler->vars[j].first_use == -1) { + compiler->alloc_regs[compiler->vars[j].alloc] = 1; + } else if (compiler->vars[j].last_use != -1) { + compiler->alloc_regs[compiler->vars[j].alloc] = 1; + } + } + for(j=0;jn_constants;j++){ + if (compiler->constants[j].alloc_reg) { + compiler->alloc_regs[compiler->constants[j].alloc_reg] = 1; + } + } + for(j=ORC_VEC_REG_BASE;j<=compiler->max_used_temp_reg;j++) { + compiler->alloc_regs[j] = 1; + } + + for(j=0;j<8;j++){ + ORC_DEBUG("xmm%d: %d %d", j, compiler->valid_regs[ORC_VEC_REG_BASE + j], + compiler->alloc_regs[ORC_VEC_REG_BASE + j]); + } + + for(j=compiler->max_used_temp_reg;jvalid_regs[j] && !compiler->alloc_regs[j]) { + return j; + } + } + + return 0; +} + diff --git a/orc/orccpu-arm.c b/orc/orccpu-arm.c new file mode 100644 index 0000000..cb013c3 --- /dev/null +++ b/orc/orccpu-arm.c @@ -0,0 +1,221 @@ +/* + * ORC - Oil Runtime Compiler + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(__linux__) +#include +#endif + +/***** arm *****/ + +#ifdef __arm__ +#if 0 +static unsigned long +orc_profile_stamp_xscale(void) +{ + unsigned int ts; + __asm__ __volatile__ ( + " mrc p14, 0, %0, c1, c0, 0 \n" + : "=r" (ts)); + return ts; +} +#endif + +#if defined(__linux__) +static unsigned long +orc_check_neon_proc_auxv (void) +{ + unsigned long flags = 0; + unsigned long aux[2]; + ssize_t count; + int fd; + + fd = open("/proc/self/auxv", O_RDONLY); + if (fd < 0) { + return 0; + } + + while (1) { + count = read(fd, aux, sizeof(aux)); + if (count < sizeof(aux)) { + break; + } + + if (aux[0] == AT_HWCAP) { + //if (aux[1] & 64) flags |= ORC_TARGET_NEON_VFP; + //if (aux[1] & 512) flags |= ORC_TARGET_NEON_IWMMXT; + if (aux[1] & 4096) flags |= ORC_TARGET_NEON_NEON; + if (aux[1] & 128) flags |= ORC_TARGET_ARM_EDSP; + ORC_INFO("arm hwcap %08x", aux[1]); + } if (aux[0] == AT_PLATFORM) { + ORC_INFO("arm platform %s", (char *)aux[1]); + } else if (aux[0] == AT_NULL) { + break; + } + } + + close(fd); + + return flags; +} +#endif + +#ifdef unused +static void +orc_cpu_arm_getflags_cpuinfo (char *cpuinfo) +{ + char *cpuinfo_flags; + char **flags; + char **f; + + cpuinfo_flags = get_cpuinfo_line(cpuinfo, "Features"); + if (cpuinfo_flags == NULL) { + free (cpuinfo); + return; + } + + flags = strsplit(cpuinfo_flags, ' '); + for (f = flags; *f; f++) { +#if 0 + if (strcmp (*f, "edsp") == 0) { + ORC_DEBUG ("cpu feature %s", *f); + orc_cpu_flags |= ORC_CPU_FLAG_EDSP; + } + if (strcmp (*f, "vfp") == 0) { + ORC_DEBUG ("cpu feature %s", *f); + orc_cpu_flags |= ORC_CPU_FLAG_VFP; + } +#endif + + free (*f); + } + free (flags); + free (cpuinfo_flags); +} + +static char * +get_proc_cpuinfo (void) +{ + char *cpuinfo; + int fd; + int n; + + cpuinfo = malloc(4096); + if (cpuinfo == NULL) return NULL; + + fd = open("/proc/cpuinfo", O_RDONLY); + if (fd < 0) { + free (cpuinfo); + return NULL; + } + + n = read(fd, cpuinfo, 4095); + if (n < 0) { + free (cpuinfo); + close (fd); + return NULL; + } + cpuinfo[n] = 0; + + close (fd); + + return cpuinfo; +} +#endif + +unsigned long +orc_arm_get_cpu_flags (void) +{ + unsigned long neon_flags = 0; + +#ifdef __linux__ + neon_flags = orc_check_neon_proc_auxv (); +#endif +#ifdef unused +#ifdef __linux__ + int arm_implementer = 0; + char *cpuinfo; + char *s; + + cpuinfo = get_proc_cpuinfo(); + if (cpuinfo == NULL) return; + + s = get_cpuinfo_line(cpuinfo, "CPU implementer"); + if (s) { + arm_implementer = strtoul (s, NULL, 0); + free(s); + } + + switch(arm_implementer) { + case 0x69: /* Intel */ + case 0x41: /* ARM */ + /* ARM chips are known to not have timestamping available from + * user space */ + break; + default: + break; + } + +#if 0 + s = get_cpuinfo_line(cpuinfo, "CPU architecture"); + if (s) { + int arm_arch; + arm_arch = strtoul (s, NULL, 0); + if (arm_arch >= 6) + orc_cpu_flags |= ORC_CPU_FLAG_ARM6; + free(s); + } +#endif + + orc_cpu_arm_getflags_cpuinfo (cpuinfo); + free (cpuinfo); +#endif +#endif + if (orc_compiler_flag_check ("-neon")) { + neon_flags &= ~ORC_TARGET_NEON_NEON; + } + + return neon_flags; +} +#endif + + diff --git a/orc/orccpu-powerpc.c b/orc/orccpu-powerpc.c new file mode 100644 index 0000000..93c9910 --- /dev/null +++ b/orc/orccpu-powerpc.c @@ -0,0 +1,207 @@ +/* + * LIBORC - Library of Optimized Inner Loops + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include + +#if defined(__linux__) +#include +#include +#include +#include +#include +#include + +#ifndef PPC_FEATURE_HAS_ALTIVEC +/* From linux-2.6/include/asm-powerpc/cputable.h */ +#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 +#endif + +#endif + +#if defined(__FreeBSD__) || defined(__APPLE__) +#include +#include +#endif + +#if defined(__OpenBSD__) +#include +#include +#include +#endif + +/***** powerpc *****/ + +#if 0 +static unsigned long +orc_profile_stamp_tb(void) +{ + unsigned long ts; + __asm__ __volatile__("mftb %0\n" : "=r" (ts)); + return ts; +} +#endif + +#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__linux__) +static void +test_altivec (void * ignored) +{ + asm volatile ("vor v0, v0, v0\n"); +} +#endif + +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if defined(__APPLE__) +#define SYSCTL "hw.vectorunit" +#else +#define SYSCTL "hw.altivec" +#endif + +static unsigned long +orc_check_altivec_sysctl_bsd (void) +{ + unsigned long cpu_flags = 0; + int ret, vu; + size_t len; + + len = sizeof(vu); + ret = sysctlbyname(SYSCTL, &vu, &len, NULL, 0); + if (!ret && vu) { + cpu_flags |= ORC_TARGET_ALTIVEC_ALTIVEC; + } + + return cpu_flags; +} +#endif + +#if defined(__OpenBSD__) +static unsigned long +orc_check_altivec_sysctl_openbsd (void) +{ + unsigned long cpu_flags = 0; + int mib[2], ret, vu; + size_t len; + + mib[0] = CTL_MACHDEP; + mib[1] = CPU_ALTIVEC; + + len = sizeof(vu); + ret = sysctl(mib, 2, &vu, &len, NULL, 0); + if (!ret && vu) { + cpu_flags |= ORC_TARGET_ALTIVEC_ALTIVEC; + } + + return cpu_flags; +} +#endif + +#if defined(__linux__) +static unsigned long +orc_check_altivec_proc_auxv (void) +{ + unsigned long cpu_flags = 0; + static int available = -1; + int new_avail = 0; + unsigned long buf[64]; + ssize_t count; + int fd, i; + + /* Flags already set */ + if (available != -1) { + return 0; + } + + fd = open("/proc/self/auxv", O_RDONLY); + if (fd < 0) { + goto out; + } + +more: + count = read(fd, buf, sizeof(buf)); + if (count < 0) { + goto out_close; + } + + for (i=0; i < (count / sizeof(unsigned long)); i += 2) { + if (buf[i] == AT_HWCAP) { + new_avail = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC); + goto out_close; + } else if (buf[i] == AT_NULL) { + goto out_close; + } + } + + if (count == sizeof(buf)) { + goto more; + } + +out_close: + close(fd); + +out: + available = new_avail; + if (available) { + cpu_flags |= ORC_TARGET_ALTIVEC_ALTIVEC; + } + + return cpu_flags; +} +#endif + +#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__linux__) +static void +orc_check_altivec_fault (void) +{ + orc_fault_check_enable (); + if (orc_fault_check_try(test_altivec, NULL)) { + ORC_DEBUG ("cpu flag altivec"); + orc_cpu_flags |= ORC_IMPL_FLAG_ALTIVEC; + } + orc_fault_check_disable (); +} +#endif + +void +orc_cpu_detect_arch(void) +{ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) + orc_check_altivec_sysctl_bsd(); +#elif defined(__OpenBSD__) + orc_check_altivec_sysctl_openbsd(); +#elif defined(__linux__) + orc_check_altivec_proc_auxv(); +#else + orc_check_altivec_fault(); +#endif + + //_orc_profile_stamp = orc_profile_stamp_tb; +} + + + diff --git a/orc/orccpu-x86.c b/orc/orccpu-x86.c new file mode 100644 index 0000000..b71e6da --- /dev/null +++ b/orc/orccpu-x86.c @@ -0,0 +1,557 @@ +/* + * ORC - Library of Optimized Inner Loops + * Copyright (c) 2003,2004,2010 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +orc_uint32 orc_x86_vendor; +int orc_x86_sse_flags; +int orc_x86_mmx_flags; +int orc_x86_microarchitecture; + + +#if defined(_MSC_VER) +static void +get_cpuid (orc_uint32 op, orc_uint32 *a, orc_uint32 *b, orc_uint32 *c, orc_uint32 *d) +{ + int tmp[4]; + __cpuid(tmp, op); + *a = tmp[0]; + *b = tmp[1]; + *c = tmp[2]; + *d = tmp[3]; +} + +static void +get_cpuid_ecx (orc_uint32 op, orc_uint32 init_ecx, orc_uint32 *a, orc_uint32 *b, orc_uint32 *c, orc_uint32 *d) +{ + int tmp[4]; + __cpuidex(tmp, op, init_ecx); + *a = tmp[0]; + *b = tmp[1]; + *c = tmp[2]; + *d = tmp[3]; +} +#elif defined(__GNUC__) + +static void +get_cpuid_ecx (orc_uint32 op, orc_uint32 init_ecx, orc_uint32 *a, orc_uint32 *b, + orc_uint32 *c, orc_uint32 *d) +{ + *a = op; + *c = init_ecx; +#ifdef __i386__ + __asm__ ( + " pushl %%ebx\n" + " cpuid\n" + " mov %%ebx, %%esi\n" + " popl %%ebx\n" + : "+a" (*a), "=S" (*b), "+c" (*c), "=d" (*d)); +#elif defined(__amd64__) + __asm__ ( + " cpuid\n" + : "+a" (*a), "=b" (*b), "+c" (*c), "=d" (*d)); +#endif +} + +static void +get_cpuid (orc_uint32 op, orc_uint32 *a, orc_uint32 *b, + orc_uint32 *c, orc_uint32 *d) +{ + get_cpuid_ecx (op, 0, a, b, c, d); +} + +#else + +/* FIXME generate a get_cpuid() function at runtime. */ +#error Need get_cpuid() function. + +#endif + + +struct desc_struct { + int desc; + int level; + int size; +}; +struct desc_struct cache_descriptors[] = { + { 0x0a, 1, 8*1024 }, + { 0x0c, 1, 16*1024 }, + { 0x0d, 1, 16*1024 }, + { 0x0e, 1, 24*1024 }, + { 0x21, 2, 256*1024 }, + { 0x22, 3, 512*1024 }, + { 0x23, 3, 1024*1024 }, + { 0x25, 3, 2*1024*1024 }, + { 0x29, 3, 4*1024*1024 }, + { 0x2c, 1, 32*1024 }, + { 0x41, 2, 128*1024 }, + { 0x42, 2, 256*1024 }, + { 0x43, 2, 512*1024 }, + { 0x44, 2, 1*1024*1024 }, + { 0x45, 2, 2*1024*1024 }, + { 0x46, 3, 4*1024*1024 }, + { 0x47, 3, 8*1024*1024 }, + { 0x48, 2, 3*1024*1024 }, + { 0x49, 2, 4*1024*1024 }, /* special case */ + { 0x4a, 3, 6*1024*1024 }, + { 0x4b, 3, 8*1024*1024 }, + { 0x4c, 3, 12*1024*1024 }, + { 0x4d, 3, 16*1024*1024 }, + { 0x4e, 2, 6*1024*1024 }, + { 0x60, 1, 16*1024 }, + { 0x66, 1, 8*1024 }, + { 0x67, 1, 16*1024 }, + { 0x68, 1, 32*1024 }, + { 0x78, 2, 1*1024*1024 }, + { 0x79, 2, 128*1024 }, + { 0x7a, 2, 256*1024 }, + { 0x7b, 2, 512*1024 }, + { 0x7c, 2, 1*1024*1024 }, + { 0x7d, 2, 2*1024*1024 }, + { 0x7f, 2, 512*1024 }, + { 0x80, 2, 512*1024 }, + { 0x82, 2, 256*1024 }, + { 0x83, 2, 512*1024 }, + { 0x84, 2, 1*1024*1024 }, + { 0x85, 2, 2*1024*1024 }, + { 0x86, 2, 512*1024 }, + { 0x87, 2, 1*1024*1024 }, + { 0xe4, 3, 8*1024*1024 } +}; + +static void +handle_cache_descriptor (unsigned int desc) +{ + int i; + + if (desc == 0) return; + + /* special case */ + if (desc == 0x49 && _orc_cpu_family == 0xf && _orc_cpu_model == 0x6) { + ORC_DEBUG("level %d size %d", 3, 4*1024*1024); + _orc_data_cache_size_level3 = 4*1024*1024; + return; + } + + for(i=0;i>8)&0xf; + model_id = (eax>>4)&0xf; + ext_family_id = (eax>>20)&0xff; + ext_model_id = (eax>>16)&0xf; + + _orc_cpu_family = family_id + ext_family_id; + _orc_cpu_model = (ext_model_id << 4) | model_id; + _orc_cpu_stepping = eax&0xf; + + ORC_INFO ("family_id %d model_id %d stepping %d", + _orc_cpu_family, _orc_cpu_model, _orc_cpu_stepping); +} + +static void +orc_sse_detect_cpuid_generic (orc_uint32 level) +{ + if (level >= 1) { + orc_x86_cpuid_handle_standard_flags (); + orc_x86_cpuid_handle_family_model_stepping (); + } +} + +static void +orc_sse_detect_cpuid_intel (orc_uint32 level) +{ + orc_uint32 eax, ebx, ecx, edx; + + if (level >= 1) { + + orc_x86_cpuid_handle_standard_flags (); + orc_x86_cpuid_handle_family_model_stepping (); + + orc_x86_microarchitecture = ORC_X86_UNKNOWN; + if (_orc_cpu_family == 6) { + switch (_orc_cpu_model) { + case 6: /* Mendocino */ + case 11: /* Tualatin-256 */ + orc_x86_microarchitecture = ORC_X86_P6; + break; + case 15: + case 22: + orc_x86_microarchitecture = ORC_X86_CORE; + break; + case 23: + case 29: + orc_x86_microarchitecture = ORC_X86_PENRYN; + break; + case 26: + orc_x86_microarchitecture = ORC_X86_NEHALEM; + break; + case 28: + orc_x86_microarchitecture = ORC_X86_BONNELL; + break; + //orc_x86_microarchitecture = ORC_X86_WESTMERE; + //orc_x86_microarchitecture = ORC_X86_SANDY_BRIDGE; + } + } else if (_orc_cpu_family == 15) { + orc_x86_microarchitecture = ORC_X86_NETBURST; + } + + } + + if (level >= 2) { + get_cpuid (0x00000002, &eax, &ebx, &ecx, &edx); + + if ((eax&0x80000000) == 0) { + handle_cache_descriptor ((eax>>8)&0xff); + handle_cache_descriptor ((eax>>16)&0xff); + handle_cache_descriptor ((eax>>24)&0xff); + } + if ((ebx&0x80000000) == 0) { + handle_cache_descriptor (ebx&0xff); + handle_cache_descriptor ((ebx>>8)&0xff); + handle_cache_descriptor ((ebx>>16)&0xff); + handle_cache_descriptor ((ebx>>24)&0xff); + } + if ((ecx&0x80000000) == 0) { + handle_cache_descriptor (ecx&0xff); + handle_cache_descriptor ((ecx>>8)&0xff); + handle_cache_descriptor ((ecx>>16)&0xff); + handle_cache_descriptor ((ecx>>24)&0xff); + } + if ((edx&0x80000000) == 0) { + handle_cache_descriptor (edx&0xff); + handle_cache_descriptor ((edx>>8)&0xff); + handle_cache_descriptor ((edx>>16)&0xff); + handle_cache_descriptor ((edx>>24)&0xff); + } + } + + if (level >= 4) { + int i; + for(i=0;i<10;i++){ + int type; + int level; + int l; + int p; + int w; + int s; + + get_cpuid_ecx (0x00000004, i, &eax, &ebx, &ecx, &edx); + type = eax&0xf; + if (type == 0) break; + + level = (eax>>5)&0x7; + l = ((ebx>>0)&0xfff)+1; + p = ((ebx>>12)&0x3ff)+1; + w = ((ebx>>22)&0x3ff)+1; + s = ecx + 1; + + ORC_INFO ("type %d level %d line size %d partitions %d ways %d sets %d", + type, level, l, p, w, s); + if (type == 1 || type == 3) { + switch (level) { + case 1: + _orc_data_cache_size_level1 = l*p*w*s; + break; + case 2: + _orc_data_cache_size_level2 = l*p*w*s; + break; + case 3: + _orc_data_cache_size_level3 = l*p*w*s; + break; + } + } + } + + } + + get_cpuid (0x80000000, &level, &ebx, &ecx, &edx); + + if (level >= 4) { + orc_x86_cpuid_get_branding_string (); + } + +} + +static void +orc_sse_detect_cpuid_amd (orc_uint32 level) +{ + orc_uint32 eax, ebx, ecx, edx; + + if (level >= 1) { + orc_x86_cpuid_handle_standard_flags (); + orc_x86_cpuid_handle_family_model_stepping (); + + orc_x86_microarchitecture = ORC_X86_UNKNOWN; + switch (_orc_cpu_family) { + case 5: + /* Don't know if 8 is correct */ + if (_orc_cpu_model < 8) { + orc_x86_microarchitecture = ORC_X86_K5; + } else { + orc_x86_microarchitecture = ORC_X86_K6; + } + break; + case 6: + orc_x86_microarchitecture = ORC_X86_K7; + break; + case 0xf: + orc_x86_microarchitecture = ORC_X86_K8; + break; + case 0x10: + orc_x86_microarchitecture = ORC_X86_K10; + break; + default: + break; + } + } + + get_cpuid (0x80000000, &level, &ebx, &ecx, &edx); + + if (level >= 1) { + get_cpuid (0x80000001, &eax, &ebx, &ecx, &edx); + + /* AMD flags */ + if (ecx & (1<<6)) { + orc_x86_sse_flags |= ORC_TARGET_SSE_SSE4A; + } + if (ecx & (1<<11)) { + orc_x86_sse_flags |= ORC_TARGET_SSE_SSE5; + } + if (edx & (1<<22)) { + orc_x86_mmx_flags |= ORC_TARGET_MMX_MMXEXT; + } + if (edx & (1<<31)) { + orc_x86_mmx_flags |= ORC_TARGET_MMX_3DNOW; + } + if (edx & (1<<30)) { + orc_x86_mmx_flags |= ORC_TARGET_MMX_3DNOWEXT; + } + } + + if (level >= 4) { + orc_x86_cpuid_get_branding_string (); + } + + if (level >= 6) { + get_cpuid (0x80000005, &eax, &ebx, &ecx, &edx); + + _orc_data_cache_size_level1 = ((ecx>>24)&0xff) * 1024; + ORC_INFO ("L1 D-cache: %d kbytes, %d-way, %d lines/tag, %d line size", + (ecx>>24)&0xff, (ecx>>16)&0xff, (ecx>>8)&0xff, ecx&0xff); + ORC_INFO ("L1 I-cache: %d kbytes, %d-way, %d lines/tag, %d line size", + (edx>>24)&0xff, (edx>>16)&0xff, (edx>>8)&0xff, edx&0xff); + + get_cpuid (0x80000006, &eax, &ebx, &ecx, &edx); + _orc_data_cache_size_level2 = ((ecx>>16)&0xffff) * 1024; + ORC_INFO ("L2 cache: %d kbytes, %d assoc, %d lines/tag, %d line size", + (ecx>>16)&0xffff, (ecx>>12)&0xf, (ecx>>8)&0xf, ecx&0xff); + } +} + +unsigned int +orc_sse_get_cpu_flags(void) +{ + orc_x86_detect_cpuid (); + return orc_x86_sse_flags; +} + +unsigned int +orc_mmx_get_cpu_flags(void) +{ + orc_x86_detect_cpuid (); + return orc_x86_mmx_flags; +} + + + diff --git a/orc/orcdebug.c b/orc/orcdebug.c new file mode 100644 index 0000000..c4aa7be --- /dev/null +++ b/orc/orcdebug.c @@ -0,0 +1,141 @@ +/* + * ORC - Library of Optimized Inner Loops + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include + +#include +#include +#include +#include + +/** + * SECTION:orcdebug + * @title: OrcDebug + * @short_description: Printing and formatting debug information + */ + +static void orc_debug_print_valist (int level, const char *file, + const char *func, int line, const char *format, va_list args); + +static int _orc_debug_level = ORC_DEBUG_ERROR; + +static OrcDebugPrintFunc _orc_debug_print_func = orc_debug_print_valist; + +void +_orc_debug_init(void) +{ + const char *envvar; + + envvar = getenv ("ORC_DEBUG"); + if (envvar != NULL) { + char *end = NULL; + int level; + level = strtol (envvar, &end, 0); + if (end > envvar) { + _orc_debug_level = level; + } + } + + ORC_INFO ("orc-" VERSION " debug init"); +} + +static void +orc_debug_print_valist (int level, const char *file, const char *func, + int line, const char *format, va_list args) +{ + static const char *level_names[] = { "NONE", "ERROR", "WARNING", "INFO", + "DEBUG", "LOG" }; + const char *level_name = "unknown"; + + if (level > _orc_debug_level) return; + + if(level>=ORC_DEBUG_NONE && level<=ORC_DEBUG_LOG){ + level_name = level_names[level]; + } + + fprintf (stderr, "ORC: %s: %s(%d): %s(): ", level_name, file, line, func); + vfprintf (stderr, format, args); + fprintf (stderr, "\n"); +} + +void +orc_debug_print (int level, const char *file, const char *func, + int line, const char *format, ...) +{ + va_list var_args; + + va_start (var_args, format); + _orc_debug_print_func (level, file, func, line, format, var_args); + va_end (var_args); +} + +/** + * orc_debug_get_level: + * + * Gets the current debug level. + * + * Returns: the current debug level + */ +int +orc_debug_get_level (void) +{ + return _orc_debug_level; +} + +/** + * orc_debug_set_level: + * @level: the new debug level + * + * Sets the current debug level. + */ +void +orc_debug_set_level (int level) +{ + _orc_debug_level = level; +} + +/** + * orc_debug_set_print_function: + * @func: the function to call + * + * Sets the function to call when outputting debugging information. + * A value of NULL for @func will restore the default handler, + * which prints debugging information to stderr. + */ +void +orc_debug_set_print_function (OrcDebugPrintFunc func) +{ + if (func) { + _orc_debug_print_func = func; + } else { + _orc_debug_print_func = orc_debug_print_valist; + } +} + diff --git a/orc/orcdebug.h b/orc/orcdebug.h new file mode 100644 index 0000000..fe09605 --- /dev/null +++ b/orc/orcdebug.h @@ -0,0 +1,159 @@ +/* + * ORC - Library of Optimized Inner Loops + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ORC_DEBUG_H_ +#define _ORC_DEBUG_H_ + +#include +#include + +ORC_BEGIN_DECLS + +/** + * OrcDebugPrintFunc: + * @level: the debug level + * @file: name of the file where the debug message occurs + * @func: name of the function where the debug message occurs + * @line: line in the file where the debug message occurs + * @format: a printf format + * @varargs: varargs for the printf format + * + * Typedef describing functions that can be registered using + * orc_debug_set_print_function() so that it is called to + * print debugging messages. + */ +typedef void (*OrcDebugPrintFunc) (int level, const char *file, + const char *func, int line, const char *format, va_list varargs); + +/** + * OrcDebugLevel: + * @ORC_DEBUG_NONE: No debugging. Used to disable debugging output. + * @ORC_DEBUG_ERROR: The level for messages indicating that an error + * has occurred that causes Orc to produce incorrect results. Also + * used temporarily by developers for testing code. + * @ORC_DEBUG_WARNING: Messages at this level indicate something has + * occurred that a developer looking into an application problem may + * want to know. + * @ORC_DEBUG_INFO: Messages at this level provide high-level + * information about Orc internals. + * @ORC_DEBUG_DEBUG: The default level for logging messages. + * @ORC_DEBUG_LOG: The level for messages that probably don't need to + * be logged at all. + * + * Enumeration describing debug levels in Orc. + */ +typedef enum { + ORC_DEBUG_NONE = 0, + ORC_DEBUG_ERROR, + ORC_DEBUG_WARNING, + ORC_DEBUG_INFO, + ORC_DEBUG_DEBUG, + ORC_DEBUG_LOG +} OrcDebugLevel; + +/** + * ORC_ERROR: + * @...: printf-style format and arguments + * + * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_ERROR. + */ +#define ORC_ERROR(...) ORC_DEBUG_PRINT(ORC_DEBUG_ERROR, __VA_ARGS__) +/** + * ORC_WARNING: + * @...: printf-style format and arguments + * + * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_WARNING. + */ +#define ORC_WARNING(...) ORC_DEBUG_PRINT(ORC_DEBUG_WARNING, __VA_ARGS__) +/** + * ORC_INFO: + * @...: printf-style format and arguments + * + * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_INFO. + */ +#define ORC_INFO(...) ORC_DEBUG_PRINT(ORC_DEBUG_INFO, __VA_ARGS__) +/** + * ORC_DEBUG: + * @...: printf-style format and arguments + * + * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_DEBUG. + */ +#define ORC_DEBUG(...) ORC_DEBUG_PRINT(ORC_DEBUG_DEBUG, __VA_ARGS__) +/** + * ORC_LOG: + * @...: printf-style format and arguments + * + * Macro to call ORC_DEBUG_PRINT() with a level of #ORC_DEBUG_LOG. + */ +#define ORC_LOG(...) ORC_DEBUG_PRINT(ORC_DEBUG_LOG, __VA_ARGS__) + +/** + * ORC_FUNCTION: + * + * Internal macro that points to __PRETTY_FUNCTION__ or __func__ + * if the former is not available. + */ +#if defined (__GNUC__) || defined (__PRETTY_FUNCTION__) +#define ORC_FUNCTION __PRETTY_FUNCTION__ +#elif defined(__func__) +#define ORC_FUNCTION __func__ +#else +#define ORC_FUNCTION "" +#endif + +/** + * ORC_DEBUG_PRINT: + * @level: debug level of message + * @Varargs: printf-style format and arguments + * + * Macro to call orc_debug_print() with the correct values for + * the name of the source file, line of source file, and function. + */ +#define ORC_DEBUG_PRINT(level, ...) do { \ + orc_debug_print((level), __FILE__, ORC_FUNCTION, __LINE__, __VA_ARGS__); \ +}while(0) + +#define ORC_ASSERT(test) do { \ + if (!(test)) { \ + ORC_ERROR("assertion failed: " #test ); \ + abort(); \ + } \ +} while(0) + +void orc_debug_set_print_function (OrcDebugPrintFunc func); +int orc_debug_get_level (void); +void orc_debug_set_level (int level); + +void _orc_debug_init (void); + +void orc_debug_print (int level, const char *file, const char *func, + int line, const char *format, ...); + +ORC_END_DECLS + +#endif + diff --git a/orc/orcemulateopcodes.c b/orc/orcemulateopcodes.c new file mode 100644 index 0000000..c618eee --- /dev/null +++ b/orc/orcemulateopcodes.c @@ -0,0 +1,5320 @@ + +/* autogenerated by generate-emulation */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +#include + + +/* begin Orc C target preamble */ +#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) +#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) +#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) +#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b)) +#define ORC_SB_MAX 127 +#define ORC_SB_MIN (-1-ORC_SB_MAX) +#define ORC_UB_MAX 255 +#define ORC_UB_MIN 0 +#define ORC_SW_MAX 32767 +#define ORC_SW_MIN (-1-ORC_SW_MAX) +#define ORC_UW_MAX 65535 +#define ORC_UW_MIN 0 +#define ORC_SL_MAX 2147483647 +#define ORC_SL_MIN (-1-ORC_SL_MAX) +#define ORC_UL_MAX 4294967295U +#define ORC_UL_MIN 0 +#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX) +#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX) +#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX) +#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX) +#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX) +#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX) +#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8)) +#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24)) +#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56)) +#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) +#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff)) +#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0)) +#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff))) +#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0)) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define ORC_RESTRICT restrict +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define ORC_RESTRICT __restrict__ +#else +#define ORC_RESTRICT +#endif +/* end Orc C target preamble */ + + +void +emulate_absb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: absb */ + var33 = ORC_ABS(var32); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_addb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: addb */ + var34 = var32 + var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_addssb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: addssb */ + var34 = ORC_CLAMP_SB(var32 + var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_addusb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: addusb */ + var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_andb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: andb */ + var34 = var32 & var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_andnb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: andnb */ + var34 = (~var32) & var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_avgsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgsb */ + var34 = (var32 + var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_avgub (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpeqb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: cmpeqb */ + var34 = (var32 == var33) ? (~0) : 0; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpgtsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: cmpgtsb */ + var34 = (var32 > var33) ? (~0) : 0; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_copyb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_loadb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[offset + i]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_loadoffb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadoffb */ + var32 = ptr4[offset + i + ((orc_union64 *)(ex->src_ptrs[1]))->i]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_loadupdb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadupdb */ + var32 = ptr4[(offset + i)>>1]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_loadupib (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadupib */ + var32 = ((offset + i)&1) ? ((orc_uint8)ptr4[(offset + i)>>1] + (orc_uint8)ptr4[((offset + i)>>1)+1] + 1)>>1 : ptr4[(offset + i)>>1]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_loadpb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + + /* 0: loadpb */ + var32 = ((orc_union64 *)(ex->src_ptrs[0]))->i; + + for (i = 0; i < n; i++) { + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_ldresnearb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: ldresnearb */ + var32 = ptr4[(((orc_union64 *)(ex->src_ptrs[1]))->i + (offset + i)*((orc_union64 *)(ex->src_ptrs[2]))->i)>>16]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_ldresnearl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: ldresnearl */ + var32 = ptr4[(((orc_union64 *)(ex->src_ptrs[1]))->i + (offset + i)*((orc_union64 *)(ex->src_ptrs[2]))->i)>>16]; + /* 1: storel */ + ptr0[i] = var32; + } + +} + +void +emulate_ldreslinb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: ldreslinb */ + { + int tmp = ((orc_union64 *)(ex->src_ptrs[1]))->i + (offset + i) * ((orc_union64 *)(ex->src_ptrs[2]))->i; + var32 = ((orc_uint8)ptr4[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr4[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8; + } + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +emulate_ldreslinl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: ldreslinl */ + { + int tmp = ((orc_union64 *)(ex->src_ptrs[1]))->i + (offset + i) * ((orc_union64 *)(ex->src_ptrs[2]))->i; + orc_union32 a = ptr4[tmp>>16]; + orc_union32 b = ptr4[(tmp>>16)+1]; + var32.x4[0] = ((orc_uint8)a.x4[0] * (256-((tmp>>8)&0xff)) + (orc_uint8)b.x4[0] * ((tmp>>8)&0xff))>>8; + var32.x4[1] = ((orc_uint8)a.x4[1] * (256-((tmp>>8)&0xff)) + (orc_uint8)b.x4[1] * ((tmp>>8)&0xff))>>8; + var32.x4[2] = ((orc_uint8)a.x4[2] * (256-((tmp>>8)&0xff)) + (orc_uint8)b.x4[2] * ((tmp>>8)&0xff))>>8; + var32.x4[3] = ((orc_uint8)a.x4[3] * (256-((tmp>>8)&0xff)) + (orc_uint8)b.x4[3] * ((tmp>>8)&0xff))>>8; + } + /* 1: storel */ + ptr0[i] = var32; + } + +} + +void +emulate_maxsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: maxsb */ + var34 = ORC_MAX(var32, var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_maxub (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: maxub */ + var34 = ORC_MAX((orc_uint8)var32, (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_minsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: minsb */ + var34 = ORC_MIN(var32, var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_minub (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: minub */ + var34 = ORC_MIN((orc_uint8)var32, (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_mullb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mullb */ + var34 = (var32 * var33) & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mulhsb */ + var34 = (var32 * var33) >> 8; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhub (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mulhub */ + var34 = ((orc_uint32)(orc_uint8)var32 * (orc_uint32)(orc_uint8)var33) >> 8; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_orb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: orb */ + var34 = var32 | var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_shlb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: shlb */ + var33 = var32 << ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_shrsb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: shrsb */ + var33 = var32 >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_shrub (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: shrub */ + var33 = ((orc_uint8)var32) >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_signb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: signb */ + var33 = ORC_CLAMP(var32,-1,1); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_storeb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: storeb */ + ptr0[offset + i] = var32; + } + +} + +void +emulate_subb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: subb */ + var34 = var32 - var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_subssb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: subssb */ + var34 = ORC_CLAMP_SB(var32 - var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_subusb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: subusb */ + var34 = ORC_CLAMP_UB((orc_uint8)var32 - (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_xorb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: xorb */ + var34 = var32 ^ var33; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +emulate_absw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: absw */ + var33.i = ORC_ABS(var32.i); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_addw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_addssw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addssw */ + var34.i = ORC_CLAMP_SW(var32.i + var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_addusw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addusw */ + var34.i = ORC_CLAMP_UW((orc_uint16)var32.i + (orc_uint16)var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_andw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: andw */ + var34.i = var32.i & var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_andnw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: andnw */ + var34.i = (~var32.i) & var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_avgsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: avgsw */ + var34.i = (var32.i + var33.i + 1)>>1; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_avguw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: avguw */ + var34.i = ((orc_uint16)var32.i + (orc_uint16)var33.i + 1)>>1; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpeqw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: cmpeqw */ + var34.i = (var32.i == var33.i) ? (~0) : 0; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpgtsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: cmpgtsw */ + var34.i = (var32.i > var33.i) ? (~0) : 0; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_copyw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_div255w (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: div255w */ + var33.i = ((uint16_t)(((orc_uint16)(var32.i+128)) + (((orc_uint16)(var32.i+128))>>8)))>>8; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_divluw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: divluw */ + var34.i = ((var33.i&0xff) == 0) ? 255 : ORC_CLAMP_UB(((uint16_t)var32.i)/((uint16_t)var33.i&0xff)); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_loadw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[offset + i]; + /* 1: storew */ + ptr0[i] = var32; + } + +} + +void +emulate_loadoffw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadoffw */ + var32 = ptr4[offset + i + ((orc_union64 *)(ex->src_ptrs[1]))->i]; + /* 1: storew */ + ptr0[i] = var32; + } + +} + +void +emulate_loadpw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + + /* 0: loadpw */ + var32.i = ((orc_union64 *)(ex->src_ptrs[0]))->i; + + for (i = 0; i < n; i++) { + /* 1: storew */ + ptr0[i] = var32; + } + +} + +void +emulate_maxsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: maxsw */ + var34.i = ORC_MAX(var32.i, var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_maxuw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: maxuw */ + var34.i = ORC_MAX((orc_uint16)var32.i, (orc_uint16)var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_minsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: minsw */ + var34.i = ORC_MIN(var32.i, var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_minuw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: minuw */ + var34.i = ORC_MIN((orc_uint16)var32.i, (orc_uint16)var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_mullw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mullw */ + var34.i = (var32.i * var33.i) & 0xffff; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mulhsw */ + var34.i = (var32.i * var33.i) >> 16; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhuw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mulhuw */ + var34.i = ((orc_uint32)((orc_uint16)var32.i) * (orc_uint32)((orc_uint16)var33.i)) >> 16; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_orw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: orw */ + var34.i = var32.i | var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_shlw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_shrsw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shrsw */ + var33.i = var32.i >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_shruw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shruw */ + var33.i = ((orc_uint16)var32.i) >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_signw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: signw */ + var33.i = ORC_CLAMP(var32.i,-1,1); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_storew (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: storew */ + ptr0[offset + i] = var32; + } + +} + +void +emulate_subw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_subssw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subssw */ + var34.i = ORC_CLAMP_SW(var32.i - var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_subusw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subusw */ + var34.i = ORC_CLAMP_UW((orc_uint16)var32.i - (orc_uint16)var33.i); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_xorw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: xorw */ + var34.i = var32.i ^ var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_absl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: absl */ + var33.i = ORC_ABS(var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_addl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addl */ + var34.i = var32.i + var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_addssl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addssl */ + var34.i = ORC_CLAMP_SL((orc_int64)var32.i + (orc_int64)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_addusl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addusl */ + var34.i = ORC_CLAMP_UL((orc_int64)(orc_uint32)var32.i + (orc_int64)(orc_uint32)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_andl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: andl */ + var34.i = var32.i & var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_andnl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: andnl */ + var34.i = (~var32.i) & var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_avgsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: avgsl */ + var34.i = ((orc_int64)var32.i + (orc_int64)var33.i + 1)>>1; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_avgul (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: avgul */ + var34.i = ((orc_uint64)(orc_uint32)var32.i + (orc_uint64)(orc_uint32)var33.i + 1)>>1; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpeql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: cmpeql */ + var34.i = (var32.i == var33.i) ? (~0) : 0; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpgtsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: cmpgtsl */ + var34.i = (var32.i > var33.i) ? (~0) : 0; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_copyl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_loadl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[offset + i]; + /* 1: storel */ + ptr0[i] = var32; + } + +} + +void +emulate_loadoffl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadoffl */ + var32 = ptr4[offset + i + ((orc_union64 *)(ex->src_ptrs[1]))->i]; + /* 1: storel */ + ptr0[i] = var32; + } + +} + +void +emulate_loadpl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + + /* 0: loadpl */ + var32.i = ((orc_union64 *)(ex->src_ptrs[0]))->i; + + for (i = 0; i < n; i++) { + /* 1: storel */ + ptr0[i] = var32; + } + +} + +void +emulate_maxsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: maxsl */ + var34.i = ORC_MAX(var32.i, var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_maxul (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: maxul */ + var34.i = ORC_MAX((orc_uint32)var32.i, (orc_uint32)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_minsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: minsl */ + var34.i = ORC_MIN(var32.i, var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_minul (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: minul */ + var34.i = ORC_MIN((orc_uint32)var32.i, (orc_uint32)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mulll (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mulll */ + var34.i = (var32.i * var33.i) & 0xffffffff; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mulhsl */ + var34.i = ((orc_int64)var32.i * (orc_int64)var33.i) >> 32; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mulhul (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mulhul */ + var34.i = ((orc_uint64)(orc_uint32)var32.i * (orc_uint64)(orc_uint32)var33.i) >> 32; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_orl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: orl */ + var34.i = var32.i | var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_shll (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: shll */ + var33.i = var32.i << ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_shrsl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: shrsl */ + var33.i = var32.i >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_shrul (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: shrul */ + var33.i = ((orc_uint32)var32.i) >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_signl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: signl */ + var33.i = ORC_CLAMP(var32.i,-1,1); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_storel (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: storel */ + ptr0[offset + i] = var32; + } + +} + +void +emulate_subl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: subl */ + var34.i = var32.i - var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_subssl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: subssl */ + var34.i = ORC_CLAMP_SL((orc_int64)var32.i - (orc_int64)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_subusl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: subusl */ + var34.i = ORC_CLAMP_UL((orc_int64)(orc_uint32)var32.i - (orc_int64)(orc_uint32)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_xorl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: xorl */ + var34.i = var32.i ^ var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_loadq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[offset + i]; + /* 1: storeq */ + ptr0[i] = var32; + } + +} + +void +emulate_loadpq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + + /* 0: loadpq */ + var32.i = ((orc_union64 *)(ex->src_ptrs[0]))->i; + + for (i = 0; i < n; i++) { + /* 1: storeq */ + ptr0[i] = var32; + } + +} + +void +emulate_storeq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: storeq */ + ptr0[offset + i] = var32; + } + +} + +void +emulate_splatw3q (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: splatw3q */ + var33.i = ((((orc_uint64)var32.i)>>48) << 48) | ((((orc_uint64)var32.i)>>48)<<32) | ((((orc_uint64)var32.i)>>48) << 16) | ((((orc_uint64)var32.i)>>48)); + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_copyq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_cmpeqq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: cmpeqq */ + var34.i = (var32.i == var33.i) ? (~0) : 0; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpgtsq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: cmpgtsq */ + var34.i = (var32.i > var33.i) ? (~0) : 0; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_andq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: andq */ + var34.i = var32.i & var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_andnq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: andnq */ + var34.i = (~var32.i) & var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_orq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: orq */ + var34.i = var32.i | var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_xorq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: xorq */ + var34.i = var32.i ^ var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_addq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: addq */ + var34.i = var32.i + var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_subq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: subq */ + var34.i = var32.i - var33.i; + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_shlq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: shlq */ + var33.i = var32.i << ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_shrsq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: shrsq */ + var33.i = var32.i >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_shruq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: shruq */ + var33.i = ((orc_uint64)var32.i) >> ((orc_union64 *)(ex->src_ptrs[1]))->i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_convsbw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: convsbw */ + var33.i = var32; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convubw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: convubw */ + var33.i = (orc_uint8)var32; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_splatbw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: splatbw */ + var33.i = ((var32&0xff) << 8) | (var32&0xff); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_splatbl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: splatbl */ + var33.i = ((var32&0xff) << 24) | ((var32&0xff)<<16) | ((var32&0xff) << 8) | (var32&0xff); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convswl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convswl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convuwl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convuwl */ + var33.i = (orc_uint16)var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convslq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convslq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_convulq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convulq */ + var33.i = (orc_uint32)var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_convwb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convwb */ + var33 = var32.i; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convhwb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convhwb */ + var33 = ((orc_uint16)var32.i)>>8; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convssswb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convssswb */ + var33 = ORC_CLAMP_SB(var32.i); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convsuswb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convsuswb */ + var33 = ORC_CLAMP_UB(var32.i); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convusswb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convusswb */ + var33 = ORC_MIN((orc_uint16)var32.i,ORC_SB_MAX); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convuuswb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convuuswb */ + var33 = ORC_MIN((orc_uint16)var32.i,ORC_UB_MAX); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_convlw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convlw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convhlw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convhlw */ + var33.i = ((orc_uint32)var32.i)>>16; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convssslw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convssslw */ + var33.i = ORC_CLAMP_SW(var32.i); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convsuslw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convsuslw */ + var33.i = ORC_CLAMP_UW(var32.i); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convusslw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convusslw */ + var33.i = ORC_CLAMP((orc_uint32)var32.i,0,ORC_SW_MAX); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convuuslw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convuuslw */ + var33.i = ORC_CLAMP_UW((orc_uint32)var32.i); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_convql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convql */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convsssql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convsssql */ + var33.i = ORC_CLAMP_SL(var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convsusql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convsusql */ + var33.i = ORC_CLAMP_UL(var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convussql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convussql */ + var33.i = ORC_CLAMP_SL((orc_uint64)var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convuusql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convuusql */ + var33.i = ORC_CLAMP_UL((orc_uint64)var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_mulsbw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mulsbw */ + var34.i = var32 * var33; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_mulubw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mulubw */ + var34.i = ((orc_uint8)var32) * ((orc_uint8)var33); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_mulswl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mulswl */ + var34.i = var32.i * var33.i; + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_muluwl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: muluwl */ + var34.i = ((orc_uint16)var32.i) * ((orc_uint16)var33.i); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mulslq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mulslq */ + var34.i = ((orc_int64)var32.i) * ((orc_int64)var33.i); + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_mululq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mululq */ + var34.i = ((orc_uint64)((orc_uint32)var32.i)) * ((orc_uint64)((orc_uint32)var33.i)); + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_accw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var12 = { 0 }; + orc_union16 var32; + + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: accw */ + var12.i = var12.i + var32.i; + } + ((orc_union32 *)ex->dest_ptrs[0])->i = (var12.i + ((orc_union32 *)ex->dest_ptrs[0])->i) & 0xffff; + +} + +void +emulate_accl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union32 var32; + + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: accl */ + var12.i = var12.i + var32.i; + } + ((orc_union32 *)ex->dest_ptrs[0])->i += var12.i; + +} + +void +emulate_accsadubl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + ((orc_union32 *)ex->dest_ptrs[0])->i += var12.i; + +} + +void +emulate_swapw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: swapw */ + var33.i = ORC_SWAP_W(var32.i); + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_swapl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: swapl */ + var33.i = ORC_SWAP_L(var32.i); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_swapwl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: swapwl */ + var33.i = ((var32.i&0x0000ffff) << 16) | ((var32.i&0xffff0000) >> 16); + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_swapq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: swapq */ + var33.i = ORC_SWAP_Q(var32.i); + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_swaplq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: swaplq */ + var33.i = (ORC_UINT64_C(var32.i&0x00000000ffffffff) << 32) | (ORC_UINT64_C(var32.i&0xffffffff00000000) >> 32); + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_select0wb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select0wb */ + var33 = (orc_uint16)var32.i & 0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_select1wb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select1wb */ + var33 = ((orc_uint16)var32.i >> 8)&0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +emulate_select0lw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: select0lw */ + var33.i = (orc_uint32)var32.i & 0xffff; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_select1lw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: select1lw */ + var33.i = ((orc_uint32)var32.i >> 16)&0xffff; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +emulate_select0ql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: select0ql */ + var33.i = (orc_uint64)var32.i & 0xffffffff; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_select1ql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: select1ql */ + var33.i = ((orc_uint64)var32.i >> 32)&0xffffffff; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_mergelq (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mergelq */ + var34.i = ((orc_uint64)var32.i & ORC_UINT64_C(0xffffffff)) | ((orc_uint64)var33.i << 32); + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_mergewl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + ptr5 = (orc_union16 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mergewl */ + var34.i = ((orc_uint16)var32.i & 0x0000ffff) | ((orc_uint16)var33.i << 16); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mergebw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr4 = (orc_int8 *)ex->src_ptrs[0]; + ptr5 = (orc_int8 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: mergebw */ + var34.i = ((orc_uint8)var32 & 0x00ff) | ((orc_uint8)var33 << 8); + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +emulate_splitql (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 * ORC_RESTRICT ptr1; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr1 = (orc_union32 *)ex->dest_ptrs[1]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: splitql */ + var33.i = (var32.i >> 32) & 0xffffffff; + var34.i = var32.i & 0xffffffff; + /* 2: storel */ + ptr0[i] = var33; + /* 3: storel */ + ptr1[i] = var34; + } + +} + +void +emulate_splitlw (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->dest_ptrs[0]; + ptr1 = (orc_union16 *)ex->dest_ptrs[1]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: splitlw */ + var33.i = (var32.i >> 16) & 0xffff; + var34.i = var32.i & 0xffff; + /* 2: storew */ + ptr0[i] = var33; + /* 3: storew */ + ptr1[i] = var34; + } + +} + +void +emulate_splitwb (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->dest_ptrs[0]; + ptr1 = (orc_int8 *)ex->dest_ptrs[1]; + ptr4 = (orc_union16 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: splitwb */ + var33 = (var32.i >> 8) & 0xff; + var34 = var32.i & 0xff; + /* 2: storeb */ + ptr0[i] = var33; + /* 3: storeb */ + ptr1[i] = var34; + } + +} + +void +emulate_addf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + _dest1.f = _src1.f + _src2.f; + var34.i = ORC_DENORMAL(_dest1.i); + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_subf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: subf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + _dest1.f = _src1.f - _src2.f; + var34.i = ORC_DENORMAL(_dest1.i); + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_mulf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: mulf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + _dest1.f = _src1.f * _src2.f; + var34.i = ORC_DENORMAL(_dest1.i); + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_divf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: divf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + _dest1.f = _src1.f / _src2.f; + var34.i = ORC_DENORMAL(_dest1.i); + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_sqrtf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: sqrtf */ + { + orc_union32 _src1; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var32.i); + _dest1.f = sqrt(_src1.f); + var33.i = ORC_DENORMAL(_dest1.i); + } + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_maxf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: maxf */ + { + orc_union32 _src1; + orc_union32 _src2; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + if (ORC_ISNAN(_src1.i)) var34.i = _src1.i; + else if (ORC_ISNAN(_src2.i)) var34.i = _src2.i; + else var34.i = (_src1.f > _src2.f) ? _src1.i : _src2.i; + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_minf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: minf */ + { + orc_union32 _src1; + orc_union32 _src2; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + if (ORC_ISNAN(_src1.i)) var34.i = _src1.i; + else if (ORC_ISNAN(_src2.i)) var34.i = _src2.i; + else var34.i = (_src1.f < _src2.f) ? _src1.i : _src2.i; + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpeqf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: cmpeqf */ + { + orc_union32 _src1; + orc_union32 _src2; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + var34.i = (_src1.f == _src2.f) ? (~0) : 0; + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpltf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: cmpltf */ + { + orc_union32 _src1; + orc_union32 _src2; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + var34.i = (_src1.f < _src2.f) ? (~0) : 0; + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_cmplef (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + ptr5 = (orc_union32 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: cmplef */ + { + orc_union32 _src1; + orc_union32 _src2; + _src1.i = ORC_DENORMAL(var32.i); + _src2.i = ORC_DENORMAL(var33.i); + var34.i = (_src1.f <= _src2.f) ? (~0) : 0; + } + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +emulate_convfl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convfl */ + { + int tmp; + tmp = (int)var32.f; + if (tmp == 0x80000000 && !(var32.i&0x80000000)) tmp = 0x7fffffff; + var33.i = tmp; + } + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convlf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convlf */ + var33.f = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_addd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: addd */ + { + orc_union64 _src1; + orc_union64 _src2; + orc_union64 _dest1; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + _dest1.f = _src1.f + _src2.f; + var34.i = ORC_DENORMAL_DOUBLE(_dest1.i); + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_subd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: subd */ + { + orc_union64 _src1; + orc_union64 _src2; + orc_union64 _dest1; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + _dest1.f = _src1.f - _src2.f; + var34.i = ORC_DENORMAL_DOUBLE(_dest1.i); + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_muld (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: muld */ + { + orc_union64 _src1; + orc_union64 _src2; + orc_union64 _dest1; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + _dest1.f = _src1.f * _src2.f; + var34.i = ORC_DENORMAL_DOUBLE(_dest1.i); + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_divd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: divd */ + { + orc_union64 _src1; + orc_union64 _src2; + orc_union64 _dest1; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + _dest1.f = _src1.f / _src2.f; + var34.i = ORC_DENORMAL_DOUBLE(_dest1.i); + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_sqrtd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: sqrtd */ + { + orc_union64 _src1; + orc_union64 _dest1; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _dest1.f = sqrt(_src1.f); + var33.i = ORC_DENORMAL_DOUBLE(_dest1.i); + } + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_maxd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: maxd */ + { + orc_union64 _src1; + orc_union64 _src2; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + if (ORC_ISNAN_DOUBLE(_src1.i)) var34.i = _src1.i; + else if (ORC_ISNAN_DOUBLE(_src2.i)) var34.i = _src2.i; + else var34.i = (_src1.f > _src2.f) ? _src1.i : _src2.i; + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_mind (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: mind */ + { + orc_union64 _src1; + orc_union64 _src2; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + if (ORC_ISNAN_DOUBLE(_src1.i)) var34.i = _src1.i; + else if (ORC_ISNAN_DOUBLE(_src2.i)) var34.i = _src2.i; + else var34.i = (_src1.f < _src2.f) ? _src1.i : _src2.i; + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpeqd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: cmpeqd */ + { + orc_union64 _src1; + orc_union64 _src2; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + var34.i = (_src1.f == _src2.f) ? ORC_UINT64_C(~0) : 0; + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpltd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: cmpltd */ + { + orc_union64 _src1; + orc_union64 _src2; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + var34.i = (_src1.f < _src2.f) ? ORC_UINT64_C(~0) : 0; + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_cmpled (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + const orc_union64 * ORC_RESTRICT ptr5; + orc_union64 var32; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + ptr5 = (orc_union64 *)ex->src_ptrs[1]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: loadq */ + var33 = ptr5[i]; + /* 2: cmpled */ + { + orc_union64 _src1; + orc_union64 _src2; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _src2.i = ORC_DENORMAL_DOUBLE(var33.i); + var34.i = (_src1.f <= _src2.f) ? ORC_UINT64_C(~0) : 0; + } + /* 3: storeq */ + ptr0[i] = var34; + } + +} + +void +emulate_convdl (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convdl */ + { + int tmp; + tmp = var32.f; + if (tmp == 0x80000000 && !(var32.i & ORC_UINT64_C(0x8000000000000000))) tmp = 0x7fffffff; + var33.i = tmp; + } + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +emulate_convld (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convld */ + var33.f = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_convfd (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union64 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->dest_ptrs[0]; + ptr4 = (orc_union32 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: convfd */ + { + orc_union32 _src1; + _src1.i = ORC_DENORMAL(var32.i); + var33.f = _src1.f; + } + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +emulate_convdf (OrcOpcodeExecutor *ex, int offset, int n) +{ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->dest_ptrs[0]; + ptr4 = (orc_union64 *)ex->src_ptrs[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var32 = ptr4[i]; + /* 1: convdf */ + { + orc_union64 _src1; + orc_union32 _dest; + _src1.i = ORC_DENORMAL_DOUBLE(var32.i); + _dest.f = _src1.f; + var33.i = ORC_DENORMAL(_dest.i); + } + /* 2: storel */ + ptr0[i] = var33; + } + +} + diff --git a/orc/orcemulateopcodes.h b/orc/orcemulateopcodes.h new file mode 100644 index 0000000..b02050e --- /dev/null +++ b/orc/orcemulateopcodes.h @@ -0,0 +1,203 @@ + +/* autogenerated by generate-emulation */ + +#ifndef _ORC_EMULATE_OPCODES_H_ +#define _ORC_EMULATE_OPCODES_H_ + +void emulate_absb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addssb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addusb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andnb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avgsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avgub (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeqb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpgtsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_copyb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadoffb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadupdb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadupib (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadpb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_ldresnearb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_ldresnearl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_ldreslinb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_ldreslinl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxub (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minub (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mullb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhub (OrcOpcodeExecutor *ex, int i, int n); +void emulate_orb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shlb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrsb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrub (OrcOpcodeExecutor *ex, int i, int n); +void emulate_signb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_storeb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subssb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subusb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_xorb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_absw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addssw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addusw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andnw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avgsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avguw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeqw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpgtsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_copyw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_div255w (OrcOpcodeExecutor *ex, int i, int n); +void emulate_divluw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadoffw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadpw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxuw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minuw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mullw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhuw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_orw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shlw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrsw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shruw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_signw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_storew (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subssw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subusw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_xorw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_absl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addssl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addusl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andnl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avgsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_avgul (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpgtsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_copyl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadoffl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadpl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxul (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minul (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulll (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulhul (OrcOpcodeExecutor *ex, int i, int n); +void emulate_orl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shll (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrsl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrul (OrcOpcodeExecutor *ex, int i, int n); +void emulate_signl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_storel (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subssl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subusl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_xorl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_loadpq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_storeq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splatw3q (OrcOpcodeExecutor *ex, int i, int n); +void emulate_copyq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeqq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpgtsq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_andnq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_orq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_xorq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shlq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shrsq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_shruq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convsbw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convubw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splatbw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splatbl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convswl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convuwl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convslq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convulq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convwb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convhwb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convssswb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convsuswb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convusswb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convuuswb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convlw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convhlw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convssslw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convsuslw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convusslw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convuuslw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convsssql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convsusql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convussql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convuusql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulsbw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulubw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulswl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_muluwl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulslq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mululq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_accw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_accl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_accsadubl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_swapw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_swapl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_swapwl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_swapq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_swaplq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select0wb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select1wb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select0lw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select1lw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select0ql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_select1ql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mergelq (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mergewl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mergebw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splitql (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splitlw (OrcOpcodeExecutor *ex, int i, int n); +void emulate_splitwb (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mulf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_divf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_sqrtf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_minf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeqf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpltf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmplef (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convfl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convlf (OrcOpcodeExecutor *ex, int i, int n); +void emulate_addd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_subd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_muld (OrcOpcodeExecutor *ex, int i, int n); +void emulate_divd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_sqrtd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_maxd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_mind (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpeqd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpltd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_cmpled (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convdl (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convld (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convfd (OrcOpcodeExecutor *ex, int i, int n); +void emulate_convdf (OrcOpcodeExecutor *ex, int i, int n); + +#endif + diff --git a/orc/orcexecutor.c b/orc/orcexecutor.c new file mode 100644 index 0000000..2713029 --- /dev/null +++ b/orc/orcexecutor.c @@ -0,0 +1,371 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include + +/** + * SECTION:orcexecutor + * @title: OrcExecutor + * @short_description: Running Orc programs + */ + +#define CHUNK_SIZE 16 + +OrcExecutor * +orc_executor_new (OrcProgram *program) +{ + OrcExecutor *ex; + + ex = malloc(sizeof(OrcExecutor)); + memset(ex,0,sizeof(OrcExecutor)); + + ex->program = program; + + return ex; +} + +void +orc_executor_free (OrcExecutor *ex) +{ + free (ex); +} + +void +orc_executor_run (OrcExecutor *ex) +{ + void (*func) (OrcExecutor *); + + func = ex->program->code_exec; + if (func) { + func (ex); + //ORC_ERROR("counters %d %d %d", ex->counter1, ex->counter2, ex->counter3); + } else { + orc_executor_emulate (ex); + } +} + +void +orc_executor_run_backup (OrcExecutor *ex) +{ + void (*func) (OrcExecutor *); + + func = ex->program->backup_func; + if (func) { + func (ex); + //ORC_ERROR("counters %d %d %d", ex->counter1, ex->counter2, ex->counter3); + } else { + orc_executor_emulate (ex); + } +} + +void +orc_executor_set_program (OrcExecutor *ex, OrcProgram *program) +{ + ex->program = program; + if (program->code_exec) { + ex->arrays[ORC_VAR_A1] = (void *)program->code_exec; + } else { + ex->arrays[ORC_VAR_A1] = (void *)orc_executor_emulate; + } +} + +void +orc_executor_set_array (OrcExecutor *ex, int var, void *ptr) +{ + ex->arrays[var] = ptr; +} + +void +orc_executor_set_stride (OrcExecutor *ex, int var, int stride) +{ + ex->params[var] = stride; +} + +void +orc_executor_set_array_str (OrcExecutor *ex, const char *name, void *ptr) +{ + int var; + var = orc_program_find_var_by_name (ex->program, name); + ex->arrays[var] = ptr; +} + +void +orc_executor_set_param (OrcExecutor *ex, int var, int value) +{ + ex->params[var] = value; +} + +void +orc_executor_set_param_float (OrcExecutor *ex, int var, float value) +{ + orc_union32 u; + u.f = value; + ex->params[var] = u.i; +} + +void +orc_executor_set_param_int64 (OrcExecutor *ex, int var, orc_int64 value) +{ + orc_union64 u; + u.i = value; + ex->params[var] = u.x2[0]; + ex->params[var + (ORC_VAR_T1-ORC_VAR_P1)] = u.x2[1]; +} + +void +orc_executor_set_param_double (OrcExecutor *ex, int var, double value) +{ + orc_union64 u; + u.f = value; + ex->params[var] = u.x2[0]; + ex->params[var + (ORC_VAR_T1-ORC_VAR_P1)] = u.x2[1]; +} + +void +orc_executor_set_param_str (OrcExecutor *ex, const char *name, int value) +{ + int var; + var = orc_program_find_var_by_name (ex->program, name); + ex->params[var] = value; +} + +int +orc_executor_get_accumulator (OrcExecutor *ex, int var) +{ + return ex->accumulators[var - ORC_VAR_A1]; +} + +int +orc_executor_get_accumulator_str (OrcExecutor *ex, const char *name) +{ + int var; + var = orc_program_find_var_by_name (ex->program, name); + return ex->accumulators[var]; +} + +void +orc_executor_set_n (OrcExecutor *ex, int n) +{ + ex->n = n; +} + +void +orc_executor_set_m (OrcExecutor *ex, int m) +{ + ORC_EXECUTOR_M(ex) = m; +} + +static void +load_constant (void *data, int size, orc_uint64 value) +{ + switch (size) { + case 1: + { + int l; + orc_int8 *d = data; + for(l=0;lprogram->orccode; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcOpcodeExecutor *opcode_ex; + void *tmpspace[ORC_N_COMPILER_VARIABLES] = { 0 }; + + ex->accumulators[0] = 0; + ex->accumulators[1] = 0; + ex->accumulators[2] = 0; + ex->accumulators[3] = 0; + + ORC_DEBUG("emulating"); + + memset (&opcode_ex, 0, sizeof(opcode_ex)); + + if (code == NULL) { + ORC_ERROR("attempt to run program that failed to compile"); + ORC_ASSERT(0); + } + + if (code->is_2d) { + m = ORC_EXECUTOR_M(ex); + } else { + m = 1; + } + + for(i=0;ivars + i; + + if (var->size) { + tmpspace[i] = malloc(ORC_MAX_VAR_SIZE * CHUNK_SIZE); + } + } + + opcode_ex = malloc(sizeof(OrcOpcodeExecutor)*code->n_insns); + + for(j=0;jn_insns;j++){ + insn = code->insns + j; + opcode = insn->opcode; + + opcode_ex[j].emulateN = opcode->emulateN; + opcode_ex[j].shift = 0; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + opcode_ex[j].shift = 1; + } else if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + opcode_ex[j].shift = 2; + } + + for(k=0;kvars + insn->src_args[k]; + if (opcode->src_size[k] == 0) continue; + + if (var->vartype == ORC_VAR_TYPE_CONST) { + opcode_ex[j].src_ptrs[k] = tmpspace[insn->src_args[k]]; + /* FIXME hack */ + load_constant (tmpspace[insn->src_args[k]], 8, + var->value.i); + } else if (var->vartype == ORC_VAR_TYPE_PARAM) { + opcode_ex[j].src_ptrs[k] = tmpspace[insn->src_args[k]]; + /* FIXME hack */ + load_constant (tmpspace[insn->src_args[k]], 8, + (orc_uint64)(orc_uint32)ex->params[insn->src_args[k]] | + (((orc_uint64)(orc_uint32)ex->params[insn->src_args[k] + + (ORC_VAR_T1 - ORC_VAR_P1)])<<32)); + } else if (var->vartype == ORC_VAR_TYPE_TEMP) { + opcode_ex[j].src_ptrs[k] = tmpspace[insn->src_args[k]]; + } else if (var->vartype == ORC_VAR_TYPE_SRC) { + if (((unsigned long)ex->arrays[insn->src_args[k]]) & (var->size - 1)) { + ORC_ERROR("Unaligned array for src%d, program %s", + (insn->src_args[k]-ORC_VAR_S1), ex->program->name); + } + opcode_ex[j].src_ptrs[k] = ex->arrays[insn->src_args[k]]; + } else if (var->vartype == ORC_VAR_TYPE_DEST) { + if (((unsigned long)ex->arrays[insn->src_args[k]]) & (var->size - 1)) { + ORC_ERROR("Unaligned array for dest%d, program %s", + (insn->src_args[k]-ORC_VAR_D1), ex->program->name); + } + opcode_ex[j].src_ptrs[k] = ex->arrays[insn->src_args[k]]; + } + } + for(k=0;kvars + insn->dest_args[k]; + if (opcode->dest_size[k] == 0) continue; + + if (var->vartype == ORC_VAR_TYPE_TEMP) { + ORC_DEBUG("dest vartype tmp %d", insn->dest_args[k]); + opcode_ex[j].dest_ptrs[k] = tmpspace[insn->dest_args[k]]; + } else if (var->vartype == ORC_VAR_TYPE_ACCUMULATOR) { + opcode_ex[j].dest_ptrs[k] = + &ex->accumulators[insn->dest_args[k] - ORC_VAR_A1]; + } else if (var->vartype == ORC_VAR_TYPE_DEST) { + if (((unsigned long)ex->arrays[insn->dest_args[k]]) & (var->size - 1)) { + ORC_ERROR("Unaligned array for dest%d, program %s", + (insn->dest_args[k]-ORC_VAR_D1), ex->program->name); + } + opcode_ex[j].dest_ptrs[k] = ex->arrays[insn->dest_args[k]]; + } + } + ORC_DEBUG("opcode %s %p %p %p", opcode->name, + opcode_ex[j].dest_ptrs[0], opcode_ex[j].src_ptrs[0], + opcode_ex[j].src_ptrs[1]); + } + + ORC_DEBUG("src ptr %p stride %d", ex->arrays[ORC_VAR_S1], ex->params[ORC_VAR_S1]); + for(m_index=0;m_indexn_insns;j++){ + insn = code->insns + j; + opcode = insn->opcode; + + for(k=0;kvars + insn->src_args[k]; + if (opcode->src_size[k] == 0) continue; + + if (var->vartype == ORC_VAR_TYPE_SRC) { + opcode_ex[j].src_ptrs[k] = + ORC_PTR_OFFSET(ex->arrays[insn->src_args[k]], + ex->params[insn->src_args[k]]*m_index); + } else if (var->vartype == ORC_VAR_TYPE_DEST) { + opcode_ex[j].src_ptrs[k] = + ORC_PTR_OFFSET(ex->arrays[insn->src_args[k]], + ex->params[insn->src_args[k]]*m_index); + } + } + for(k=0;kvars + insn->dest_args[k]; + if (opcode->dest_size[k] == 0) continue; + + if (var->vartype == ORC_VAR_TYPE_DEST) { + opcode_ex[j].dest_ptrs[k] = + ORC_PTR_OFFSET(ex->arrays[insn->dest_args[k]], + ex->params[insn->dest_args[k]]*m_index); + } + } + } + + for(i=0;in;i+=CHUNK_SIZE){ + for(j=0;jn_insns;j++){ + if (ex->n - i >= CHUNK_SIZE) { + opcode_ex[j].emulateN (opcode_ex + j, i, CHUNK_SIZE << opcode_ex[j].shift); + } else { + opcode_ex[j].emulateN (opcode_ex + j, i, (ex->n - i) << opcode_ex[j].shift); + } + } + } + } + + free (opcode_ex); + for(i=0;i +#endif + +#ifndef _ORC_INTEGER_TYPEDEFS_ +#define _ORC_INTEGER_TYPEDEFS_ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +typedef int8_t orc_int8; +typedef int16_t orc_int16; +typedef int32_t orc_int32; +typedef int64_t orc_int64; +typedef uint8_t orc_uint8; +typedef uint16_t orc_uint16; +typedef uint32_t orc_uint32; +typedef uint64_t orc_uint64; +#define ORC_UINT64_C(x) UINT64_C(x) +#elif defined(_MSC_VER) +typedef signed __int8 orc_int8; +typedef signed __int16 orc_int16; +typedef signed __int32 orc_int32; +typedef signed __int64 orc_int64; +typedef unsigned __int8 orc_uint8; +typedef unsigned __int16 orc_uint16; +typedef unsigned __int32 orc_uint32; +typedef unsigned __int64 orc_uint64; +#define ORC_UINT64_C(x) (x##Ui64) +#else +#include +typedef signed char orc_int8; +typedef short orc_int16; +typedef int orc_int32; +typedef unsigned char orc_uint8; +typedef unsigned short orc_uint16; +typedef unsigned int orc_uint32; +#if INT_MAX == LONG_MAX +typedef long long orc_int64; +typedef unsigned long long orc_uint64; +#define ORC_UINT64_C(x) (x##ULL) +#else +typedef long orc_int64; +typedef unsigned long orc_uint64; +#define ORC_UINT64_C(x) (x##UL) +#endif +#endif +typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; +typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; +typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; +#endif + +void orc_memcpy (void * d1, const void * s1, int n); +void orc_memset (void * d1, int p1, int n); + + +/* begin Orc C target preamble */ +#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) +#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) +#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) +#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b)) +#define ORC_SB_MAX 127 +#define ORC_SB_MIN (-1-ORC_SB_MAX) +#define ORC_UB_MAX 255 +#define ORC_UB_MIN 0 +#define ORC_SW_MAX 32767 +#define ORC_SW_MIN (-1-ORC_SW_MAX) +#define ORC_UW_MAX 65535 +#define ORC_UW_MIN 0 +#define ORC_SL_MAX 2147483647 +#define ORC_SL_MIN (-1-ORC_SL_MAX) +#define ORC_UL_MAX 4294967295U +#define ORC_UL_MIN 0 +#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX) +#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX) +#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX) +#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX) +#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX) +#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX) +#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8)) +#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24)) +#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56)) +#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) +#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff)) +#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0)) +#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff))) +#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0)) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define ORC_RESTRICT restrict +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define ORC_RESTRICT __restrict__ +#else +#define ORC_RESTRICT +#endif +/* end Orc C target preamble */ + + + +/* orc_memcpy */ +#ifdef DISABLE_ORC +void +orc_memcpy (void * d1, const void * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_memcpy (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_memcpy (void * d1, const void * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_memcpy"); + orc_program_set_backup_function (p, _backup_orc_memcpy); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + + orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_memset */ +#ifdef DISABLE_ORC +void +orc_memset (void * d1, int p1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + + /* 0: loadpb */ + var32 = p1; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_memset (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + + /* 0: loadpb */ + var32 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_memset (void * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_memset"); + orc_program_set_backup_function (p, _backup_orc_memset); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_parameter (p, 1, "p1"); + + orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + diff --git a/orc/orcfunctions.h b/orc/orcfunctions.h new file mode 100644 index 0000000..07f5265 --- /dev/null +++ b/orc/orcfunctions.h @@ -0,0 +1,67 @@ + +/* autogenerated from orcfunctions.orc */ + +#ifndef _ORCFUNCTIONS_H_ +#define _ORCFUNCTIONS_H_ + + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifndef _ORC_INTEGER_TYPEDEFS_ +#define _ORC_INTEGER_TYPEDEFS_ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +typedef int8_t orc_int8; +typedef int16_t orc_int16; +typedef int32_t orc_int32; +typedef int64_t orc_int64; +typedef uint8_t orc_uint8; +typedef uint16_t orc_uint16; +typedef uint32_t orc_uint32; +typedef uint64_t orc_uint64; +#define ORC_UINT64_C(x) UINT64_C(x) +#elif defined(_MSC_VER) +typedef signed __int8 orc_int8; +typedef signed __int16 orc_int16; +typedef signed __int32 orc_int32; +typedef signed __int64 orc_int64; +typedef unsigned __int8 orc_uint8; +typedef unsigned __int16 orc_uint16; +typedef unsigned __int32 orc_uint32; +typedef unsigned __int64 orc_uint64; +#define ORC_UINT64_C(x) (x##Ui64) +#else +#include +typedef signed char orc_int8; +typedef short orc_int16; +typedef int orc_int32; +typedef unsigned char orc_uint8; +typedef unsigned short orc_uint16; +typedef unsigned int orc_uint32; +#if INT_MAX == LONG_MAX +typedef long long orc_int64; +typedef unsigned long long orc_uint64; +#define ORC_UINT64_C(x) (x##ULL) +#else +typedef long orc_int64; +typedef unsigned long orc_uint64; +#define ORC_UINT64_C(x) (x##UL) +#endif +#endif +typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; +typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; +typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; +#endif +void orc_memcpy (void * d1, const void * s1, int n); +void orc_memset (void * d1, int p1, int n); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/orc/orcmmx.c b/orc/orcmmx.c new file mode 100644 index 0000000..a82678f --- /dev/null +++ b/orc/orcmmx.c @@ -0,0 +1,264 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +/** + * SECTION:orcmmx + * @title: MMX + * @short_description: code generation for MMX + */ + + +const char * +orc_x86_get_regname_mmx(int i) +{ + static const char *x86_regs[] = { + "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", + "mm8", "mm9", "mm10", "mm11", "mm12", "mm13", "mm14", "mm15" + }; + + if (i>=X86_MM0 && icodeptr++ = 0xf2; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_mmx_emit_f30f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_mmx(src), + orc_x86_get_regname_mmx(dest)); + *p->codeptr++ = 0xf3; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_mmx_emit_0f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_mmx(src), + orc_x86_get_regname_mmx(dest)); + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_mmx_emit_660f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_mmx(src), + orc_x86_get_regname_mmx(dest)); + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + if (code & 0xff00) { + *p->codeptr++ = code >> 8; + } + *p->codeptr++ = code & 0xff; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest) +{ + ORC_ASM_CODE(p," pshufw $0x%04x, %%%s, %%%s\n", shuf, + orc_x86_get_regname_mmx(src), + orc_x86_get_regname_mmx(dest)); + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x70; + orc_x86_emit_modrm_reg (p, src, dest); + *p->codeptr++ = shuf; +} + +void +orc_mmx_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, + int src, int dest) +{ + ORC_ASM_CODE(p," pinsrw $%d, %d(%%%s), %%%s\n", imm, offset, + orc_x86_get_regname(src), + orc_x86_get_regname_mmx(dest)); + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0xc4; + orc_x86_emit_modrm_memoffset (p, dest, offset, src); + *p->codeptr++ = imm; + +} + +void +orc_mmx_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, + int offset, int dest) +{ + ORC_ASM_CODE(p," pextrw $%d, %%%s, %d(%%%s)\n", imm, + orc_x86_get_regname(src), + offset, orc_x86_get_regname_mmx(dest)); + orc_x86_emit_rex (p, 0, src, 0, dest); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0xc4; + orc_x86_emit_modrm_memoffset (p, src, offset, dest); + *p->codeptr++ = imm; +} + +void +orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name, int code, + int modrm_code, int shift, int reg) +{ + ORC_ASM_CODE(p," %s $%d, %%%s\n", insn_name, shift, + orc_x86_get_regname_mmx(reg)); + orc_x86_emit_rex (p, 0, 0, 0, reg); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, reg, modrm_code); + *p->codeptr++ = shift; +} + +void +orc_x86_emit_mov_memindex_mmx (OrcCompiler *compiler, int size, int offset, + int reg1, int regindex, int shift, int reg2, int is_aligned) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %d(%%%s,%%%s,%d), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %d(%%%s,%%%s,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + orc_x86_emit_modrm_memindex (compiler, reg2, offset, reg1, regindex, shift); +} + +void +orc_x86_emit_mov_memoffset_mmx (OrcCompiler *compiler, int size, int offset, + int reg1, int reg2, int is_aligned) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_mmx(reg2)); + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_mmx(reg2)); + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + orc_x86_emit_modrm_memoffset (compiler, reg2, offset, reg1); +} + +void +orc_x86_emit_mov_mmx_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, + int reg2, int aligned, int uncached) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %%%s, %d(%%%s)\n", orc_x86_get_regname_mmx(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %%%s, %d(%%%s)\n", orc_x86_get_regname_mmx(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7f; + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg2); +} + +void orc_x86_emit_mov_mmx_reg_reg (OrcCompiler *compiler, int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movq %%%s, %%%s\n", orc_x86_get_regname_mmx(reg1), + orc_x86_get_regname_mmx(reg2)); + + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + orc_x86_emit_modrm_reg (compiler, reg1, reg2); +} + +void orc_x86_emit_mov_reg_mmx (OrcCompiler *compiler, int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movd %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname_mmx(reg2)); + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + orc_x86_emit_modrm_reg (compiler, reg1, reg2); +} + +void orc_x86_emit_mov_mmx_reg (OrcCompiler *compiler, int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movd %%%s, %%%s\n", orc_x86_get_regname_mmx(reg1), + orc_x86_get_regname(reg2)); + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + diff --git a/orc/orcmmx.h b/orc/orcmmx.h new file mode 100644 index 0000000..c299e2f --- /dev/null +++ b/orc/orcmmx.h @@ -0,0 +1,211 @@ + +#ifndef _ORC_MMX_H_ +#define _ORC_MMX_H_ + +#include + +typedef enum { + ORC_TARGET_MMX_MMX = (1<<0), + ORC_TARGET_MMX_MMXEXT = (1<<1), + ORC_TARGET_MMX_3DNOW = (1<<2), + ORC_TARGET_MMX_3DNOWEXT = (1<<3), + ORC_TARGET_MMX_SSSE3 = (1<<4), + ORC_TARGET_MMX_SSE4_1 = (1<<5), + ORC_TARGET_MMX_SSE4_2 = (1<<6), + ORC_TARGET_MMX_FRAME_POINTER = (1<<7), + ORC_TARGET_MMX_SHORT_JUMPS = (1<<8), + ORC_TARGET_MMX_64BIT = (1<<9) +} OrcTargetMMXFlags; + +typedef enum { + X86_MM0 = ORC_VEC_REG_BASE, + X86_MM1, + X86_MM2, + X86_MM3, + X86_MM4, + X86_MM5, + X86_MM6, + X86_MM7 +} OrcMMXRegister; + +#define ORC_MMX_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0)) + +const char * orc_x86_get_regname_mmx(int i); +void orc_x86_emit_mov_memoffset_mmx (OrcCompiler *compiler, int size, int offset, + int reg1, int reg2, int is_aligned); +void orc_x86_emit_mov_memindex_mmx (OrcCompiler *compiler, int size, int offset, + int reg1, int regindex, int shift, int reg2, int is_aligned); +void orc_x86_emit_mov_mmx_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, + int reg2, int aligned, int uncached); +void orc_x86_emit_mov_mmx_reg_reg (OrcCompiler *compiler, int reg1, int reg2); +void orc_x86_emit_mov_reg_mmx (OrcCompiler *compiler, int reg1, int reg2); +void orc_x86_emit_mov_mmx_reg (OrcCompiler *compiler, int reg1, int reg2); +void orc_mmx_emit_loadib (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadiw (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadil (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadpb (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadpw (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadpl (OrcCompiler *p, int reg, int value); +void orc_mmx_emit_loadpq (OrcCompiler *p, int reg, int value); + +void orc_mmx_emit_660f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_mmx_emit_f20f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_mmx_emit_f30f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_mmx_emit_0f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest); +void orc_mmx_emit_palignr (OrcCompiler *p, int align, int src, int dest); +void orc_mmx_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, + int src, int dest); +void orc_mmx_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, + int offset, int dest); +void orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name, + int code, int modrm_code, int shift, int reg); +unsigned int orc_mmx_get_cpu_flags (void); + +void orc_mmx_load_constant (OrcCompiler *compiler, int reg, int size, + orc_uint64 value); + +/* MMX instructions */ +#define orc_mmx_emit_punpcklbw(p,a,b) orc_mmx_emit_660f (p, "punpcklbw", 0x60, a, b) +#define orc_mmx_emit_punpcklwd(p,a,b) orc_mmx_emit_660f (p, "punpcklwd", 0x61, a, b) +#define orc_mmx_emit_punpckldq(p,a,b) orc_mmx_emit_660f (p, "punpckldq", 0x62, a, b) +#define orc_mmx_emit_packsswb(p,a,b) orc_mmx_emit_660f (p, "packsswb", 0x63, a, b) +#define orc_mmx_emit_pcmpgtb(p,a,b) orc_mmx_emit_660f (p, "pcmpgtb", 0x64, a, b) +#define orc_mmx_emit_pcmpgtw(p,a,b) orc_mmx_emit_660f (p, "pcmpgtw", 0x65, a, b) +#define orc_mmx_emit_pcmpgtd(p,a,b) orc_mmx_emit_660f (p, "pcmpgtd", 0x66, a, b) +#define orc_mmx_emit_packuswb(p,a,b) orc_mmx_emit_660f (p, "packuswb", 0x67, a, b) +#define orc_mmx_emit_punpckhbw(p,a,b) orc_mmx_emit_660f (p, "punpckhbw", 0x68, a, b) +#define orc_mmx_emit_punpckhwd(p,a,b) orc_mmx_emit_660f (p, "punpckhwd", 0x69, a, b) +#define orc_mmx_emit_punpckhdq(p,a,b) orc_mmx_emit_660f (p, "punpckhdq", 0x6a, a, b) +#define orc_mmx_emit_packssdw(p,a,b) orc_mmx_emit_660f (p, "packssdw", 0x6b, a, b) + +#define orc_mmx_emit_movq(p,a,b) orc_mmx_emit_660f (p, "movq", 0x6f, a, b) + +#define orc_mmx_emit_psraw(p,a,b) orc_mmx_emit_shiftimm (p, "psraw", 0x71, 4, a, b) +#define orc_mmx_emit_psrlw(p,a,b) orc_mmx_emit_shiftimm (p, "psrlw", 0x71, 2, a, b) +#define orc_mmx_emit_psllw(p,a,b) orc_mmx_emit_shiftimm (p, "psllw", 0x71, 6, a, b) + +#define orc_mmx_emit_psrad(p,a,b) orc_mmx_emit_shiftimm (p, "psrad", 0x72, 4, a, b) +#define orc_mmx_emit_psrld(p,a,b) orc_mmx_emit_shiftimm (p, "psrld", 0x72, 2, a, b) +#define orc_mmx_emit_pslld(p,a,b) orc_mmx_emit_shiftimm (p, "pslld", 0x72, 6, a, b) + +#define orc_mmx_emit_psrlq(p,a,b) orc_mmx_emit_shiftimm (p, "psrlq", 0x73, 2, a, b) +#define orc_mmx_emit_psllq(p,a,b) orc_mmx_emit_shiftimm (p, "psllq", 0x73, 6, a, b) + +#define orc_mmx_emit_pcmpeqb(p,a,b) orc_mmx_emit_660f (p, "pcmpeqb", 0x74, a, b) +#define orc_mmx_emit_pcmpeqw(p,a,b) orc_mmx_emit_660f (p, "pcmpeqw", 0x75, a, b) +#define orc_mmx_emit_pcmpeqd(p,a,b) orc_mmx_emit_660f (p, "pcmpeqd", 0x76, a, b) +#define orc_mmx_emit_emms(p) orc_x86_emit_emms (p) + +#define orc_mmx_emit_pmullw(p,a,b) orc_mmx_emit_660f (p, "pmullw", 0xd5, a, b) + +#define orc_mmx_emit_psubusb(p,a,b) orc_mmx_emit_660f (p, "psubusb", 0xd8, a, b) +#define orc_mmx_emit_psubusw(p,a,b) orc_mmx_emit_660f (p, "psubusw", 0xd9, a, b) +#define orc_mmx_emit_pand(p,a,b) orc_mmx_emit_660f (p, "pand", 0xdb, a, b) +#define orc_mmx_emit_paddusb(p,a,b) orc_mmx_emit_660f (p, "paddusb", 0xdc, a, b) +#define orc_mmx_emit_paddusw(p,a,b) orc_mmx_emit_660f (p, "paddusw", 0xdd, a, b) +#define orc_mmx_emit_pandn(p,a,b) orc_mmx_emit_660f (p, "pandn", 0xdf, a, b) + +#define orc_mmx_emit_pmulhw(p,a,b) orc_mmx_emit_660f (p, "pmulhw", 0xe5, a, b) + +#define orc_mmx_emit_psubsb(p,a,b) orc_mmx_emit_660f (p, "psubsb", 0xe8, a, b) +#define orc_mmx_emit_psubsw(p,a,b) orc_mmx_emit_660f (p, "psubsw", 0xe9, a, b) +#define orc_mmx_emit_por(p,a,b) orc_mmx_emit_660f (p, "por", 0xeb, a, b) +#define orc_mmx_emit_paddsb(p,a,b) orc_mmx_emit_660f (p, "paddsb", 0xec, a, b) +#define orc_mmx_emit_paddsw(p,a,b) orc_mmx_emit_660f (p, "paddsw", 0xed, a, b) +#define orc_mmx_emit_pxor(p,a,b) orc_mmx_emit_660f (p, "pxor", 0xef, a, b) + +#define orc_mmx_emit_pmaddwd(p,a,b) orc_mmx_emit_660f (p, "pmaddwd", 0xf5, a, b) + +#define orc_mmx_emit_psubb(p,a,b) orc_mmx_emit_660f (p, "psubb", 0xf8, a, b) +#define orc_mmx_emit_psubw(p,a,b) orc_mmx_emit_660f (p, "psubw", 0xf9, a, b) +#define orc_mmx_emit_psubd(p,a,b) orc_mmx_emit_660f (p, "psubd", 0xfa, a, b) + +#define orc_mmx_emit_paddb(p,a,b) orc_mmx_emit_660f (p, "paddb", 0xfc, a, b) +#define orc_mmx_emit_paddw(p,a,b) orc_mmx_emit_660f (p, "paddw", 0xfd, a, b) +#define orc_mmx_emit_paddd(p,a,b) orc_mmx_emit_660f (p, "paddd", 0xfe, a, b) + +/* MMX EXT instructions */ +/* MMX SSE instructions */ +#define orc_mmx_emit_pinsrw(p,a,b) orc_mmx_emit_660f (p, "pinsrw", 0xc4, a, b) +#define orc_mmx_emit_pextrw(p,a,b) orc_mmx_emit_660f (p, "pextrw", 0xc5, a, b) +#define orc_mmx_emit_pminub(p,a,b) orc_mmx_emit_660f (p, "pminub", 0xda, a, b) +#define orc_mmx_emit_pmaxub(p,a,b) orc_mmx_emit_660f (p, "pmaxub", 0xde, a, b) +#define orc_mmx_emit_pavgb(p,a,b) orc_mmx_emit_660f (p, "pavgb", 0xe0, a, b) +#define orc_mmx_emit_pavgw(p,a,b) orc_mmx_emit_660f (p, "pavgw", 0xe3, a, b) +#define orc_mmx_emit_pmulhuw(p,a,b) orc_mmx_emit_660f (p, "pmulhuw", 0xe4, a, b) +#define orc_mmx_emit_pminsw(p,a,b) orc_mmx_emit_660f (p, "pminsw", 0xea, a, b) +#define orc_mmx_emit_pmaxsw(p,a,b) orc_mmx_emit_660f (p, "pmaxsw", 0xee, a, b) +#define orc_mmx_emit_psadbw(p,a,b) orc_mmx_emit_660f (p, "psadbw", 0xf6, a, b) + +/* 3DNow! instrunctions, FIXME, not correct */ +#define orc_mmx_emit_pmulhrw(p,a,b) orc_mmx_emit_660f (p, "pmulhrw", 0xb7, a, b) +#define orc_mmx_emit_pavgusb(p,a,b) orc_mmx_emit_660f (p, "pavgusb", 0xbf, a, b) + +/* MMX SSE2 instructions */ +#define orc_mmx_emit_paddq(p,a,b) orc_mmx_emit_660f (p, "paddq", 0xd4, a, b) +#define orc_mmx_emit_psubq(p,a,b) orc_mmx_emit_660f (p, "psubq", 0xfb, a, b) +#define orc_mmx_emit_pmuludq(p,a,b) orc_mmx_emit_660f (p, "pmuludq", 0xf4, a, b) + +/* MMX SSE3 instructions */ + +/* MMX SSSE3 instructions */ +#define orc_mmx_emit_pshufb(p,a,b) orc_mmx_emit_660f (p, "pshufb", 0x3800, a, b) +#define orc_mmx_emit_phaddw(p,a,b) orc_mmx_emit_660f (p, "phaddw", 0x3801, a, b) +#define orc_mmx_emit_phaddd(p,a,b) orc_mmx_emit_660f (p, "phaddd", 0x3802, a, b) +#define orc_mmx_emit_phaddsw(p,a,b) orc_mmx_emit_660f (p, "phaddsw", 0x3803, a, b) +#define orc_mmx_emit_pmaddubsw(p,a,b) orc_mmx_emit_660f (p, "pmaddubsw", 0x3804, a, b) +#define orc_mmx_emit_phsubw(p,a,b) orc_mmx_emit_660f (p, "phsubw", 0x3805, a, b) +#define orc_mmx_emit_phsubd(p,a,b) orc_mmx_emit_660f (p, "phsubd", 0x3806, a, b) +#define orc_mmx_emit_phsubsw(p,a,b) orc_mmx_emit_660f (p, "phsubsw", 0x3807, a, b) +#define orc_mmx_emit_psignb(p,a,b) orc_mmx_emit_660f (p, "psignb", 0x3808, a, b) +#define orc_mmx_emit_psignw(p,a,b) orc_mmx_emit_660f (p, "psignw", 0x3809, a, b) +#define orc_mmx_emit_psignd(p,a,b) orc_mmx_emit_660f (p, "psignd", 0x380a, a, b) +#define orc_mmx_emit_pmulhrsw(p,a,b) orc_mmx_emit_660f (p, "pmulhrsw", 0x380b, a, b) + +#define orc_mmx_emit_pabsb(p,a,b) orc_mmx_emit_660f (p, "pabsb", 0x381c, a, b) +#define orc_mmx_emit_pabsw(p,a,b) orc_mmx_emit_660f (p, "pabsw", 0x381d, a, b) +#define orc_mmx_emit_pabsd(p,a,b) orc_mmx_emit_660f (p, "pabsd", 0x381e, a, b) + +/* MMX SSE4.1 instructions */ +#define orc_mmx_emit_pmovsxbw(p,a,b) orc_mmx_emit_660f (p, "pmovsxbw", 0x3820, a, b) +#define orc_mmx_emit_pmovsxbd(p,a,b) orc_mmx_emit_660f (p, "pmovsxbd", 0x3821, a, b) +#define orc_mmx_emit_pmovsxbq(p,a,b) orc_mmx_emit_660f (p, "pmovsxbq", 0x3822, a, b) +#define orc_mmx_emit_pmovsxwd(p,a,b) orc_mmx_emit_660f (p, "pmovsxwd", 0x3823, a, b) +#define orc_mmx_emit_pmovsxwq(p,a,b) orc_mmx_emit_660f (p, "pmovsxwq", 0x3824, a, b) +#define orc_mmx_emit_pmovsxdq(p,a,b) orc_mmx_emit_660f (p, "pmovsxdq", 0x3825, a, b) + +#define orc_mmx_emit_pmuldq(p,a,b) orc_mmx_emit_660f (p, "pmuldq", 0x3828, a, b) +#define orc_mmx_emit_pcmpeqq(p,a,b) orc_mmx_emit_660f (p, "pcmpeqq", 0x3829, a, b) + +#define orc_mmx_emit_packusdw(p,a,b) orc_mmx_emit_660f (p, "packusdw", 0x382b, a, b) + +#define orc_mmx_emit_pmovzxbw(p,a,b) orc_mmx_emit_660f (p, "pmovzxbw", 0x3830, a, b) +#define orc_mmx_emit_pmovzxbd(p,a,b) orc_mmx_emit_660f (p, "pmovzxbd", 0x3831, a, b) +#define orc_mmx_emit_pmovzxbq(p,a,b) orc_mmx_emit_660f (p, "pmovzxbq", 0x3832, a, b) +#define orc_mmx_emit_pmovzxwd(p,a,b) orc_mmx_emit_660f (p, "pmovzxwd", 0x3833, a, b) +#define orc_mmx_emit_pmovzxwq(p,a,b) orc_mmx_emit_660f (p, "pmovzxwq", 0x3834, a, b) +#define orc_mmx_emit_pmovzxdq(p,a,b) orc_mmx_emit_660f (p, "pmovzxdq", 0x3835, a, b) + +#define orc_mmx_emit_pmulld(p,a,b) orc_mmx_emit_660f (p, "pmuldq", 0x3840, a, b) +#define orc_mmx_emit_phminposuw(p,a,b) orc_mmx_emit_660f (p, "phminposuw", 0x3841, a, b) + +#define orc_mmx_emit_pminsb(p,a,b) orc_mmx_emit_660f (p, "pminsb", 0x3838, a, b) +#define orc_mmx_emit_pminsd(p,a,b) orc_mmx_emit_660f (p, "pminsd", 0x3839, a, b) +#define orc_mmx_emit_pminuw(p,a,b) orc_mmx_emit_660f (p, "pminuw", 0x383a, a, b) +#define orc_mmx_emit_pminud(p,a,b) orc_mmx_emit_660f (p, "pminud", 0x383b, a, b) +#define orc_mmx_emit_pmaxsb(p,a,b) orc_mmx_emit_660f (p, "pmaxsb", 0x383c, a, b) +#define orc_mmx_emit_pmaxsd(p,a,b) orc_mmx_emit_660f (p, "pmaxsd", 0x383d, a, b) +#define orc_mmx_emit_pmaxuw(p,a,b) orc_mmx_emit_660f (p, "pmaxuw", 0x383e, a, b) +#define orc_mmx_emit_pmaxud(p,a,b) orc_mmx_emit_660f (p, "pmaxud", 0x383f, a, b) + +/* SSE4.2 instructions */ +#define orc_mmx_emit_pcmpgtq(p,a,b) orc_mmx_emit_660f (p, "pcmpgtq", 0x3837, a, b) + + +#endif + diff --git a/orc/orcneon.h b/orc/orcneon.h new file mode 100644 index 0000000..81fde4d --- /dev/null +++ b/orc/orcneon.h @@ -0,0 +1,36 @@ + +#ifndef _ORC_NEON_H_ +#define _ORC_NEON_H_ + +#include +#include + +const char *orc_neon_reg_name (int reg); +const char *orc_neon_reg_name_quad (int reg); + +void orc_neon_loadb (OrcCompiler *compiler, OrcVariable *var, int update); +void orc_neon_loadw (OrcCompiler *compiler, OrcVariable *var, int update); +void orc_neon_loadl (OrcCompiler *compiler, OrcVariable *var, int update); +void orc_neon_loadq (OrcCompiler *compiler, int dest, int src1, int update, int is_aligned); + +void orc_neon_load_vec_aligned (OrcCompiler *compiler, OrcVariable *var, int update); +void orc_neon_load_vec_unaligned (OrcCompiler *compiler, OrcVariable *var, int update); +void orc_neon_load_halfvec_unaligned (OrcCompiler *compiler, OrcVariable *var, int update); + +void orc_neon_neg (OrcCompiler *compiler, int dest); +void orc_neon_storeb (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned); +void orc_neon_storew (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned); +void orc_neon_storel (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned); +void orc_neon_storeq (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned); +void orc_neon_emit_loadib (OrcCompiler *p, int reg, int value); +void orc_neon_emit_loadiw (OrcCompiler *p, int reg, int value); +void orc_neon_emit_loadil (OrcCompiler *p, int reg, int value); +void orc_neon_emit_loadpb (OrcCompiler *p, int reg, int param); +void orc_neon_emit_loadpw (OrcCompiler *p, int reg, int param); +void orc_neon_emit_loadpl (OrcCompiler *p, int reg, int param); +void orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write, + int offset); + + +#endif + diff --git a/orc/orconce.c b/orc/orconce.c new file mode 100644 index 0000000..aa432fb --- /dev/null +++ b/orc/orconce.c @@ -0,0 +1,114 @@ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#if defined(HAVE_THREAD_PTHREAD) + +#include + +static pthread_mutex_t once_mutex = PTHREAD_MUTEX_INITIALIZER; + +void +_orc_once_init (void) +{ + +} + +void +orc_once_mutex_lock (void) +{ + pthread_mutex_lock (&once_mutex); +} + +void +orc_once_mutex_unlock (void) +{ + pthread_mutex_unlock (&once_mutex); +} + +#elif defined(HAVE_THREAD_WIN32) + +#include + +static CRITICAL_SECTION once_mutex; + +void +_orc_once_init (void) +{ +} + +void +orc_once_mutex_lock (void) +{ + EnterCriticalSection (&once_mutex); +} + +void +orc_once_mutex_unlock (void) +{ + LeaveCriticalSection (&once_mutex); +} + +#ifdef _MSC_VER + +#pragma section(".CRT$XCU",read) + +static void __cdecl +orc_once_cs_init (void) +{ + InitializeCriticalSection (&once_mutex); +} + +__declspec(allocate(".CRT$XCU")) +void (__cdecl * orc_once_cs_init_constructor)(void) = orc_once_cs_init; + +#elif defined(__GNUC__) + +static void orc_once_cs_init (void) __attribute__((constructor)); + +static void +orc_once_cs_init (void) +{ + InitializeCriticalSection (&once_mutex); +} + +#else +#error Expecting GCC or MSVC on Windows +#endif + +#if 0 +BOOL WINAPI +DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) +{ + if (dwReason == DLL_PROCESS_ATTACH) { + InitializeCriticalSection (&once_mutex); + } + return TRUE; +} +#endif + +#else + +void +_orc_once_init (void) +{ +} + +void +orc_once_mutex_lock (void) +{ +} + +void +orc_once_mutex_unlock (void) +{ +} + +#endif + + diff --git a/orc/orconce.h b/orc/orconce.h new file mode 100644 index 0000000..a4689a9 --- /dev/null +++ b/orc/orconce.h @@ -0,0 +1,19 @@ + +#ifndef _ORC_ONCE_H_ +#define _ORC_ONCE_H_ + +typedef struct _OrcMutex OrcMutex; + +typedef struct _OrcOnce OrcOnce; + +struct _OrcOnce { + int inited; + void *value; +}; + +void orc_once_mutex_lock (void); +void orc_once_mutex_unlock (void); + + +#endif + diff --git a/orc/orcopcodes.c b/orc/orcopcodes.c new file mode 100644 index 0000000..eda8610 --- /dev/null +++ b/orc/orcopcodes.c @@ -0,0 +1,511 @@ + +#include "config.h" + +#include +#include +#include +#include + +#include +#include + +/** + * SECTION:orcopcode + * @title: OrcOpcode + * @short_description: Operations + */ + + +static OrcOpcodeSet *opcode_sets; +static int n_opcode_sets; + +static OrcTarget *targets[ORC_N_TARGETS]; +static int n_targets; + +static OrcTarget *default_target; + +#define ORC_SB_MAX 127 +#define ORC_SB_MIN (-1-ORC_SB_MAX) +#define ORC_UB_MAX 255 +#define ORC_UB_MIN 0 +#define ORC_SW_MAX 32767 +#define ORC_SW_MIN (-1-ORC_SW_MAX) +#define ORC_UW_MAX 65535 +#define ORC_UW_MIN 0 +#define ORC_SL_MAX 2147483647 +#define ORC_SL_MIN (-1-ORC_SL_MAX) +#define ORC_UL_MAX ORC_UINT64_C(4294967295) +#define ORC_UL_MIN 0 + +#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX) +#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX) +#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX) +#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX) +#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX) +#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX) + + +void +orc_target_register (OrcTarget *target) +{ + targets[n_targets] = target; + n_targets++; + + if (target->executable) { + default_target = target; + } +} + +OrcTarget * +orc_target_get_by_name (const char *name) +{ + int i; + + if (name == NULL) return default_target; + + for(i=0;iname) == 0) { + return targets[i]; + } + } + + return NULL; +} + +OrcTarget * +orc_target_get_default (void) +{ + return default_target; +} + +const char * +orc_target_get_name (OrcTarget *target) +{ + if (target == NULL) return NULL; + return target->name; +} + +unsigned int +orc_target_get_default_flags (OrcTarget *target) +{ + if (target == NULL) return 0; + return target->get_default_flags(); +} + +const char * +orc_target_get_preamble (OrcTarget *target) +{ + if (target->get_asm_preamble == NULL) return ""; + + return target->get_asm_preamble (); +} + +const char * +orc_target_get_asm_preamble (const char *target) +{ + OrcTarget *t; + + t = orc_target_get_by_name (target); + if (t == NULL) return ""; + + return orc_target_get_preamble (t); +} + +const char * +orc_target_get_flag_name (OrcTarget *target, int shift) +{ + if (target->get_flag_name == NULL) return ""; + + return target->get_flag_name (shift); +} + +#if 0 +int +orc_opcode_get_list (OrcOpcode **list) +{ + (*list) = opcode_list; + return n_opcodes; +} +#endif + +#if 0 +void +orc_opcode_register (const char *name, int n_dest, int n_src, + OrcOpcodeEmulateFunc emulate, void *user) +{ + OrcOpcode *opcode; + + if (n_opcodes == n_opcodes_alloc) { + n_opcodes_alloc += 100; + opcode_list = realloc(opcode_list, sizeof(OrcOpcode) * n_opcodes_alloc); + } + + opcode = opcode_list + n_opcodes; + + opcode->name = strdup (name); + opcode->n_src = n_src; + opcode->n_dest = n_dest; + opcode->emulate = emulate; + opcode->emulate_user = user; + + n_opcodes++; +} +#endif + +OrcRuleSet * +orc_rule_set_new (OrcOpcodeSet *opcode_set, OrcTarget *target, + unsigned int required_flags) +{ + OrcRuleSet *rule_set; + + rule_set = target->rule_sets + target->n_rule_sets; + target->n_rule_sets++; + + memset (rule_set, 0, sizeof(OrcRuleSet)); + + rule_set->opcode_major = opcode_set->opcode_major; + rule_set->required_target_flags = required_flags; + + rule_set->rules = malloc (sizeof(OrcRule) * opcode_set->n_opcodes); + memset (rule_set->rules, 0, sizeof(OrcRule) * opcode_set->n_opcodes); + + return rule_set; +} + +OrcRule * +orc_target_get_rule (OrcTarget *target, OrcStaticOpcode *opcode, + unsigned int target_flags) +{ + OrcRule *rule; + int i; + int j; + int k; + + for(k=0;k= opcode_sets[k].n_opcodes) continue; + if (opcode_sets[k].opcodes + j != opcode) continue; + + for(i=target->n_rule_sets-1;i>=0;i--){ + if (target->rule_sets[i].opcode_major != opcode_sets[k].opcode_major) continue; + if (target->rule_sets[i].required_target_flags & (~target_flags)) continue; + + rule = target->rule_sets[i].rules + j; + if (rule->emit) return rule; + } + } + + return NULL; +} + +int +orc_opcode_register_static (OrcStaticOpcode *sopcode, char *prefix) +{ + int n; + int major; + + n = 0; + while (sopcode[n].name[0]) { + n++; + } + + major = n_opcode_sets; + + n_opcode_sets++; + opcode_sets = realloc (opcode_sets, sizeof(OrcOpcodeSet)*n_opcode_sets); + + memset (opcode_sets + major, 0, sizeof(OrcOpcodeSet)); + strncpy(opcode_sets[major].prefix, prefix, sizeof(opcode_sets[major].prefix)-1); + opcode_sets[major].n_opcodes = n; + opcode_sets[major].opcodes = sopcode; + opcode_sets[major].opcode_major = major; + + return major; +} + +OrcOpcodeSet * +orc_opcode_set_get (const char *name) +{ + int i; + + for(i=0;in_opcodes;j++){ + if (strcmp (name, opcode_set->opcodes[j].name) == 0) { + return j; + } + } + + return -1; +} + +OrcStaticOpcode * +orc_opcode_find_by_name (const char *name) +{ + int i; + int j; + + for(i=0;i= 0) { + return &opcode_sets[i].opcodes[j]; + } + } + + return NULL; +} + +void +emulate_null (OrcOpcodeExecutor *ex, int offset, int n) +{ + /* This is a placeholder for adding new opcodes */ + ORC_ERROR("emulate_null() called. This is a bug."); +} + +#include "orc/orcemulateopcodes.h" + +static OrcStaticOpcode opcodes[] = { + + /* byte ops */ + { "absb", 0, { 1 }, { 1 }, emulate_absb }, + { "addb", 0, { 1 }, { 1, 1 }, emulate_addb }, + { "addssb", 0, { 1 }, { 1, 1 }, emulate_addssb }, + { "addusb", 0, { 1 }, { 1, 1 }, emulate_addusb }, + { "andb", 0, { 1 }, { 1, 1 }, emulate_andb }, + { "andnb", 0, { 1 }, { 1, 1 }, emulate_andnb }, + { "avgsb", 0, { 1 }, { 1, 1 }, emulate_avgsb }, + { "avgub", 0, { 1 }, { 1, 1 }, emulate_avgub }, + { "cmpeqb", 0, { 1 }, { 1, 1 }, emulate_cmpeqb }, + { "cmpgtsb", 0, { 1 }, { 1, 1 }, emulate_cmpgtsb }, + { "copyb", 0, { 1 }, { 1 }, emulate_copyb }, + { "loadb", ORC_STATIC_OPCODE_LOAD, { 1 }, { 1 }, emulate_loadb }, + { "loadoffb", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 4 }, emulate_loadoffb }, + { "loadupdb", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_ITERATOR, { 1 }, { 1 }, emulate_loadupdb }, + { "loadupib", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_ITERATOR, { 1 }, { 1 }, emulate_loadupib }, + { "loadpb", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR|ORC_STATIC_OPCODE_INVARIANT, { 1 }, { 1 }, emulate_loadpb }, + { "ldresnearb", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 4, 4 }, emulate_ldresnearb }, + { "ldresnearl", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4, 4 }, emulate_ldresnearl }, + { "ldreslinb", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 4, 4 }, emulate_ldreslinb }, + { "ldreslinl", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4, 4 }, emulate_ldreslinl }, + { "maxsb", 0, { 1 }, { 1, 1 }, emulate_maxsb }, + { "maxub", 0, { 1 }, { 1, 1 }, emulate_maxub }, + { "minsb", 0, { 1 }, { 1, 1 }, emulate_minsb }, + { "minub", 0, { 1 }, { 1, 1 }, emulate_minub }, + { "mullb", 0, { 1 }, { 1, 1 }, emulate_mullb }, + { "mulhsb", 0, { 1 }, { 1, 1 }, emulate_mulhsb }, + { "mulhub", 0, { 1 }, { 1, 1 }, emulate_mulhub }, + { "orb", 0, { 1 }, { 1, 1 }, emulate_orb }, + { "shlb", ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 1 }, emulate_shlb }, + { "shrsb", ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 1 }, emulate_shrsb }, + { "shrub", ORC_STATIC_OPCODE_SCALAR, { 1 }, { 1, 1 }, emulate_shrub }, + { "signb", 0, { 1 }, { 1 }, emulate_signb }, + { "storeb", ORC_STATIC_OPCODE_STORE, { 1 }, { 1 }, emulate_storeb }, + { "subb", 0, { 1 }, { 1, 1 }, emulate_subb }, + { "subssb", 0, { 1 }, { 1, 1 }, emulate_subssb }, + { "subusb", 0, { 1 }, { 1, 1 }, emulate_subusb }, + { "xorb", 0, { 1 }, { 1, 1 }, emulate_xorb }, + + /* word ops */ + { "absw", 0, { 2 }, { 2 }, emulate_absw }, + { "addw", 0, { 2 }, { 2, 2 }, emulate_addw }, + { "addssw", 0, { 2 }, { 2, 2 }, emulate_addssw }, + { "addusw", 0, { 2 }, { 2, 2 }, emulate_addusw }, + { "andw", 0, { 2 }, { 2, 2 }, emulate_andw }, + { "andnw", 0, { 2 }, { 2, 2 }, emulate_andnw }, + { "avgsw", 0, { 2 }, { 2, 2 }, emulate_avgsw }, + { "avguw", 0, { 2 }, { 2, 2 }, emulate_avguw }, + { "cmpeqw", 0, { 2 }, { 2, 2 }, emulate_cmpeqw }, + { "cmpgtsw", 0, { 2 }, { 2, 2 }, emulate_cmpgtsw }, + { "copyw", 0, { 2 }, { 2 }, emulate_copyw }, + { "div255w", 0, { 2 }, { 2 }, emulate_div255w }, + { "divluw", 0, { 2 }, { 2, 2 }, emulate_divluw }, + { "loadw", ORC_STATIC_OPCODE_LOAD, { 2 }, { 2 }, emulate_loadw }, + { "loadoffw", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 2 }, { 2, 4 }, emulate_loadoffw }, + { "loadpw", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR|ORC_STATIC_OPCODE_INVARIANT, { 2 }, { 2 }, emulate_loadpw }, + { "maxsw", 0, { 2 }, { 2, 2 }, emulate_maxsw }, + { "maxuw", 0, { 2 }, { 2, 2 }, emulate_maxuw }, + { "minsw", 0, { 2 }, { 2, 2 }, emulate_minsw }, + { "minuw", 0, { 2 }, { 2, 2 }, emulate_minuw }, + { "mullw", 0, { 2 }, { 2, 2 }, emulate_mullw }, + { "mulhsw", 0, { 2 }, { 2, 2 }, emulate_mulhsw }, + { "mulhuw", 0, { 2 }, { 2, 2 }, emulate_mulhuw }, + { "orw", 0, { 2 }, { 2, 2 }, emulate_orw }, + { "shlw", ORC_STATIC_OPCODE_SCALAR, { 2 }, { 2, 2 }, emulate_shlw }, + { "shrsw", ORC_STATIC_OPCODE_SCALAR, { 2 }, { 2, 2 }, emulate_shrsw }, + { "shruw", ORC_STATIC_OPCODE_SCALAR, { 2 }, { 2, 2 }, emulate_shruw }, + { "signw", 0, { 2 }, { 2 }, emulate_signw }, + { "storew", ORC_STATIC_OPCODE_STORE, { 2 }, { 2 }, emulate_storew }, + { "subw", 0, { 2 }, { 2, 2 }, emulate_subw }, + { "subssw", 0, { 2 }, { 2, 2 }, emulate_subssw }, + { "subusw", 0, { 2 }, { 2, 2 }, emulate_subusw }, + { "xorw", 0, { 2 }, { 2, 2 }, emulate_xorw }, + + /* long ops */ + { "absl", 0, { 4 }, { 4 }, emulate_absl }, + { "addl", 0, { 4 }, { 4, 4 }, emulate_addl }, + { "addssl", 0, { 4 }, { 4, 4 }, emulate_addssl }, + { "addusl", 0, { 4 }, { 4, 4 }, emulate_addusl }, + { "andl", 0, { 4 }, { 4, 4 }, emulate_andl }, + { "andnl", 0, { 4 }, { 4, 4 }, emulate_andnl }, + { "avgsl", 0, { 4 }, { 4, 4 }, emulate_avgsl }, + { "avgul", 0, { 4 }, { 4, 4 }, emulate_avgul }, + { "cmpeql", 0, { 4 }, { 4, 4 }, emulate_cmpeql }, + { "cmpgtsl", 0, { 4 }, { 4, 4 }, emulate_cmpgtsl }, + { "copyl", 0, { 4 }, { 4 }, emulate_copyl }, + { "loadl", ORC_STATIC_OPCODE_LOAD, { 4 }, { 4 }, emulate_loadl }, + { "loadoffl", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4 }, emulate_loadoffl }, + { "loadpl", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR|ORC_STATIC_OPCODE_INVARIANT, { 4 }, { 4 }, emulate_loadpl }, + { "maxsl", 0, { 4 }, { 4, 4 }, emulate_maxsl }, + { "maxul", 0, { 4 }, { 4, 4 }, emulate_maxul }, + { "minsl", 0, { 4 }, { 4, 4 }, emulate_minsl }, + { "minul", 0, { 4 }, { 4, 4 }, emulate_minul }, + { "mulll", 0, { 4 }, { 4, 4 }, emulate_mulll }, + { "mulhsl", 0, { 4 }, { 4, 4 }, emulate_mulhsl }, + { "mulhul", 0, { 4 }, { 4, 4 }, emulate_mulhul }, + { "orl", 0, { 4 }, { 4, 4 }, emulate_orl }, + { "shll", ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4 }, emulate_shll }, + { "shrsl", ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4 }, emulate_shrsl }, + { "shrul", ORC_STATIC_OPCODE_SCALAR, { 4 }, { 4, 4 }, emulate_shrul }, + { "signl", 0, { 4 }, { 4 }, emulate_signl }, + { "storel", ORC_STATIC_OPCODE_STORE, { 4 }, { 4 }, emulate_storel }, + { "subl", 0, { 4 }, { 4, 4 }, emulate_subl }, + { "subssl", 0, { 4 }, { 4, 4 }, emulate_subssl }, + { "subusl", 0, { 4 }, { 4, 4 }, emulate_subusl }, + { "xorl", 0, { 4 }, { 4, 4 }, emulate_xorl }, + + { "loadq", ORC_STATIC_OPCODE_LOAD, { 8 }, { 8 }, emulate_loadq }, + { "loadpq", ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_SCALAR|ORC_STATIC_OPCODE_INVARIANT, { 8 }, { 8 }, emulate_loadpq }, + { "storeq", ORC_STATIC_OPCODE_STORE, { 8 }, { 8 }, emulate_storeq }, + { "splatw3q", 0, { 8 }, { 8 }, emulate_splatw3q }, + { "copyq", 0, { 8 }, { 8 }, emulate_copyq }, + { "cmpeqq", 0, { 8 }, { 8, 8 }, emulate_cmpeqq }, + { "cmpgtsq", 0, { 8 }, { 8, 8 }, emulate_cmpgtsq }, + { "andq", 0, { 8 }, { 8, 8 }, emulate_andq }, + { "andnq", 0, { 8 }, { 8, 8 }, emulate_andnq }, + { "orq", 0, { 8 }, { 8, 8 }, emulate_orq }, + { "xorq", 0, { 8 }, { 8, 8 }, emulate_xorq }, + { "addq", 0, { 8 }, { 8, 8 }, emulate_addq }, + { "subq", 0, { 8 }, { 8, 8 }, emulate_subq }, + { "shlq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shlq }, + { "shrsq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shrsq }, + { "shruq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shruq }, + + { "convsbw", 0, { 2 }, { 1 }, emulate_convsbw }, + { "convubw", 0, { 2 }, { 1 }, emulate_convubw }, + { "splatbw", 0, { 2 }, { 1 }, emulate_splatbw }, + { "splatbl", 0, { 4 }, { 1 }, emulate_splatbl }, + + { "convswl", 0, { 4 }, { 2 }, emulate_convswl }, + { "convuwl", 0, { 4 }, { 2 }, emulate_convuwl }, + { "convslq", 0, { 8 }, { 4 }, emulate_convslq }, + { "convulq", 0, { 8 }, { 4 }, emulate_convulq }, + + { "convwb", 0, { 1 }, { 2 }, emulate_convwb }, + { "convhwb", 0, { 1 }, { 2 }, emulate_convhwb }, + { "convssswb", 0, { 1 }, { 2 }, emulate_convssswb }, + { "convsuswb", 0, { 1 }, { 2 }, emulate_convsuswb }, + { "convusswb", 0, { 1 }, { 2 }, emulate_convusswb }, + { "convuuswb", 0, { 1 }, { 2 }, emulate_convuuswb }, + + { "convlw", 0, { 2 }, { 4 }, emulate_convlw }, + { "convhlw", 0, { 2 }, { 4 }, emulate_convhlw }, + { "convssslw", 0, { 2 }, { 4 }, emulate_convssslw }, + { "convsuslw", 0, { 2 }, { 4 }, emulate_convsuslw }, + { "convusslw", 0, { 2 }, { 4 }, emulate_convusslw }, + { "convuuslw", 0, { 2 }, { 4 }, emulate_convuuslw }, + + { "convql", 0, { 4 }, { 8 }, emulate_convql }, + { "convsssql", 0, { 4 }, { 8 }, emulate_convsssql }, + { "convsusql", 0, { 4 }, { 8 }, emulate_convsusql }, + { "convussql", 0, { 4 }, { 8 }, emulate_convussql }, + { "convuusql", 0, { 4 }, { 8 }, emulate_convuusql }, + + { "mulsbw", 0, { 2 }, { 1, 1 }, emulate_mulsbw }, + { "mulubw", 0, { 2 }, { 1, 1 }, emulate_mulubw }, + { "mulswl", 0, { 4 }, { 2, 2 }, emulate_mulswl }, + { "muluwl", 0, { 4 }, { 2, 2 }, emulate_muluwl }, + { "mulslq", 0, { 8 }, { 4, 4 }, emulate_mulslq }, + { "mululq", 0, { 8 }, { 4, 4 }, emulate_mululq }, + + /* accumulators */ + { "accw", ORC_STATIC_OPCODE_ACCUMULATOR, { 2 }, { 2 }, emulate_accw }, + { "accl", ORC_STATIC_OPCODE_ACCUMULATOR, { 4 }, { 4 }, emulate_accl }, + { "accsadubl", ORC_STATIC_OPCODE_ACCUMULATOR, { 4 }, { 1, 1 }, emulate_accsadubl }, + + { "swapw", 0, { 2 }, { 2 }, emulate_swapw }, + { "swapl", 0, { 4 }, { 4 }, emulate_swapl }, + { "swapwl", 0, { 4 }, { 4 }, emulate_swapwl }, + { "swapq", 0, { 8 }, { 8 }, emulate_swapq }, + { "swaplq", 0, { 8 }, { 8 }, emulate_swaplq }, + { "select0wb", 0, { 1 }, { 2 }, emulate_select0wb }, + { "select1wb", 0, { 1 }, { 2 }, emulate_select1wb }, + { "select0lw", 0, { 2 }, { 4 }, emulate_select0lw }, + { "select1lw", 0, { 2 }, { 4 }, emulate_select1lw }, + { "select0ql", 0, { 4 }, { 8 }, emulate_select0ql }, + { "select1ql", 0, { 4 }, { 8 }, emulate_select1ql }, + { "mergelq", 0, { 8 }, { 4, 4 }, emulate_mergelq }, + { "mergewl", 0, { 4 }, { 2, 2 }, emulate_mergewl }, + { "mergebw", 0, { 2 }, { 1, 1 }, emulate_mergebw }, + { "splitql", 0, { 4, 4 }, { 8 }, emulate_splitql }, + { "splitlw", 0, { 2, 2 }, { 4 }, emulate_splitlw }, + { "splitwb", 0, { 1, 1 }, { 2 }, emulate_splitwb }, + + /* float ops */ + { "addf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_addf }, + { "subf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_subf }, + { "mulf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_mulf }, + { "divf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_divf }, + { "sqrtf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4 }, emulate_sqrtf }, + { "maxf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_maxf }, + { "minf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 4, 4 }, emulate_minf }, + { "cmpeqf", ORC_STATIC_OPCODE_FLOAT_SRC, { 4 }, { 4, 4 }, emulate_cmpeqf }, + { "cmpltf", ORC_STATIC_OPCODE_FLOAT_SRC, { 4 }, { 4, 4 }, emulate_cmpltf }, + { "cmplef", ORC_STATIC_OPCODE_FLOAT_SRC, { 4 }, { 4, 4 }, emulate_cmplef }, + { "convfl", ORC_STATIC_OPCODE_FLOAT_SRC, { 4 }, { 4 }, emulate_convfl }, + { "convlf", ORC_STATIC_OPCODE_FLOAT_DEST, { 4 }, { 4 }, emulate_convlf }, + + /* double ops */ + { "addd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_addd }, + { "subd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_subd }, + { "muld", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_muld }, + { "divd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_divd }, + { "sqrtd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8 }, emulate_sqrtd }, + { "maxd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_maxd }, + { "mind", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 8, 8 }, emulate_mind }, + { "cmpeqd", ORC_STATIC_OPCODE_FLOAT_SRC, { 8 }, { 8, 8 }, emulate_cmpeqd }, + { "cmpltd", ORC_STATIC_OPCODE_FLOAT_SRC, { 8 }, { 8, 8 }, emulate_cmpltd }, + { "cmpled", ORC_STATIC_OPCODE_FLOAT_SRC, { 8 }, { 8, 8 }, emulate_cmpled }, + { "convdl", ORC_STATIC_OPCODE_FLOAT_SRC, { 4 }, { 8 }, emulate_convdl }, + { "convld", ORC_STATIC_OPCODE_FLOAT_DEST, { 8 }, { 4 }, emulate_convld }, + { "convfd", ORC_STATIC_OPCODE_FLOAT, { 8 }, { 4 }, emulate_convfd }, + { "convdf", ORC_STATIC_OPCODE_FLOAT, { 4 }, { 8 }, emulate_convdf }, + + { "" } +}; + +void +orc_opcode_init (void) +{ + orc_opcode_register_static (opcodes, "sys"); +} + + diff --git a/orc/orcparse.c b/orc/orcparse.c new file mode 100644 index 0000000..7c29780 --- /dev/null +++ b/orc/orcparse.c @@ -0,0 +1,429 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include +#include +#include + +/** + * SECTION:orcparse + * @title: Parser + * @short_description: Parse Orc source code + */ + + +typedef struct _OrcParser OrcParser; +struct _OrcParser { + const char *code; + int code_length; + + const char *p; + + int line_number; + char *line; + int creg_index; + + OrcOpcodeSet *opcode_set; + OrcProgram *program; + OrcProgram *error_program; + + OrcProgram **programs; + int n_programs; + int n_programs_alloc; + + char *log; + int log_size; + int log_alloc; +}; + +static void orc_parse_get_line (OrcParser *parser); +static OrcStaticOpcode * get_opcode (OrcParser *parser, const char *opcode); +static void orc_parse_log (OrcParser *parser, const char *format, ...); +static int opcode_n_args (OrcStaticOpcode *opcode); +static void orc_parse_sanity_check (OrcParser *parser, OrcProgram *program); + + +int +orc_parse (const char *code, OrcProgram ***programs) +{ + return orc_parse_full (code, programs, NULL); +} + +int +orc_parse_full (const char *code, OrcProgram ***programs, char **log) +{ + OrcParser _parser; + OrcParser *parser = &_parser; + char *init_function = NULL; + + memset (parser, 0, sizeof(*parser)); + + parser->code = code; + parser->code_length = strlen (code); + parser->line_number = 0; + parser->p = code; + parser->opcode_set = orc_opcode_set_get ("sys"); + parser->log = malloc(100); + parser->log_alloc = 100; + parser->log_size = 0; + + while (parser->p[0] != 0) { + char *p; + char *end; + char *token[10]; + int n_tokens; + + orc_parse_get_line (parser); + + p = parser->line; + end = p + strlen (p); + //printf("%d: %s\n", parser->line_number, parser->line); + + while (p[0] == ' ' || p[0] == '\t') p++; + + if (p[0] == 0) { + continue; + } + + if (p[0] == '#') { + //printf("comment: %s\n", p+1); + continue; + } + + n_tokens = 0; + + while (p < end) { + if (p[0] == ' ' || p[0] == '\t' || p[0] == ',') p++; + if (p[0] == 0 || p[0] == '#') break; + + token[n_tokens] = p; + while (p[0] != 0 && p[0] != ' ' && p[0] != '\t' && p[0] != ',') p++; + n_tokens++; + + p[0] = 0; + p++; + } + + if (n_tokens == 0) { + continue; + } + + { + int i; + for(i=0;iprogram) { + orc_parse_sanity_check (parser, parser->program); + } + parser->program = orc_program_new (); + orc_program_set_name (parser->program, token[1]); + if (parser->n_programs == parser->n_programs_alloc) { + parser->n_programs_alloc += 32; + parser->programs = realloc (parser->programs, + sizeof(OrcProgram *)*parser->n_programs_alloc); + } + parser->programs[parser->n_programs] = parser->program; + parser->n_programs++; + parser->creg_index = 1; + } else if (strcmp (token[0], ".init") == 0) { + if (init_function) free (init_function); + if (n_tokens < 2) { + orc_parse_log (parser, "error: line %d: .init without function name\n", + parser->line_number); + } else { + init_function = strdup (token[1]); + } + } else if (strcmp (token[0], ".flags") == 0) { + int i; + for(i=1;iprogram); + } + } + } else if (strcmp (token[0], ".n") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_set_constant_n (parser->program, size); + } else if (strcmp (token[0], ".m") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_set_constant_m (parser->program, size); + } else if (strcmp (token[0], ".source") == 0) { + int size = strtol (token[1], NULL, 0); + int var; + var = orc_program_add_source (parser->program, size, token[2]); + if (n_tokens > 3) { + orc_program_set_type_name (parser->program, var, token[3]); + } + } else if (strcmp (token[0], ".dest") == 0) { + int size = strtol (token[1], NULL, 0); + int var; + var = orc_program_add_destination (parser->program, size, token[2]); + if (n_tokens > 3) { + orc_program_set_type_name (parser->program, var, token[3]); + } + } else if (strcmp (token[0], ".accumulator") == 0) { + int size = strtol (token[1], NULL, 0); + int var; + var = orc_program_add_accumulator (parser->program, size, token[2]); + if (n_tokens > 3) { + orc_program_set_type_name (parser->program, var, token[3]); + } + } else if (strcmp (token[0], ".temp") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_add_temporary (parser->program, size, token[2]); + } else if (strcmp (token[0], ".param") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_add_parameter (parser->program, size, token[2]); + } else if (strcmp (token[0], ".longparam") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_add_parameter_int64 (parser->program, size, token[2]); + } else if (strcmp (token[0], ".const") == 0) { + int size = strtol (token[1], NULL, 0); + + orc_program_add_constant_str (parser->program, size, token[3], token[2]); + } else if (strcmp (token[0], ".floatparam") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_add_parameter_float (parser->program, size, token[2]); + } else if (strcmp (token[0], ".doubleparam") == 0) { + int size = strtol (token[1], NULL, 0); + orc_program_add_parameter_double (parser->program, size, token[2]); + } else { + orc_parse_log (parser, "error: line %d: unknown directive: %s\n", + parser->line_number, token[0]); + } + } else { + OrcStaticOpcode *o; + unsigned int flags = 0; + int offset = 0; + + if (strcmp (token[0], "x4") == 0) { + flags |= ORC_INSTRUCTION_FLAG_X4; + offset = 1; + } else if (strcmp (token[0], "x2") == 0) { + flags |= ORC_INSTRUCTION_FLAG_X2; + offset = 1; + } + + o = get_opcode (parser, token[offset]); + + if (o) { + int n_args = opcode_n_args (o); + int i; + + if (n_tokens != 1 + offset + n_args) { + orc_parse_log (parser, "error: line %d: too %s arguments for %s (expected %d)\n", + parser->line_number, (n_tokens < 1+offset+n_args) ? "few" : "many", + token[offset], n_args); + } + + for(i=offset+1;iprogram, 0, token[i], + token[i]); + } + } + + if (n_tokens - offset == 5) { + orc_program_append_str_2 (parser->program, token[offset], flags, + token[offset+1], token[offset+2], token[offset+3], token[offset+4]); + } else if (n_tokens - offset == 4) { + orc_program_append_str_2 (parser->program, token[offset], flags, + token[offset+1], token[offset+2], token[offset+3], NULL); + } else { + orc_program_append_str_2 (parser->program, token[offset], flags, + token[offset+1], token[offset+2], NULL, NULL); + } + } else { + orc_parse_log (parser, "error: line %d: unknown opcode: %s\n", + parser->line_number, + token[offset]); + } + } + } + + if (parser->program) { + orc_parse_sanity_check (parser, parser->program); + } + + if (parser->line) free (parser->line); + + if (log) { + *log = parser->log; + } else { + free (parser->log); + } + if (parser->programs[0]) { + parser->programs[0]->init_function = init_function; + } + *programs = parser->programs; + return parser->n_programs; +} + +static OrcStaticOpcode * +get_opcode (OrcParser *parser, const char *opcode) +{ + int i; + + for(i=0;iopcode_set->n_opcodes;i++){ + if (strcmp (opcode, parser->opcode_set->opcodes[i].name) == 0) { + return parser->opcode_set->opcodes + i; + } + } + + return NULL; +} + +static int +opcode_n_args (OrcStaticOpcode *opcode) +{ + int i; + int n = 0; + for(i=0;idest_size[i] != 0) n++; + } + for(i=0;isrc_size[i] != 0) n++; + } + return n; +} + +static void +orc_parse_log_valist (OrcParser *parser, const char *format, va_list args) +{ + char s[100]; + int len; + + if (parser->error_program != parser->program) { + sprintf(s, "In function %s:\n", parser->program->name); + len = strlen(s); + + if (parser->log_size + len + 1 >= parser->log_alloc) { + parser->log_alloc += 100; + parser->log = realloc (parser->log, parser->log_alloc); + } + + strcpy (parser->log + parser->log_size, s); + parser->log_size += len; + parser->error_program = parser->program; + } + + vsprintf(s, format, args); + len = strlen(s); + + if (parser->log_size + len + 1 >= parser->log_alloc) { + parser->log_alloc += 100; + parser->log = realloc (parser->log, parser->log_alloc); + } + + strcpy (parser->log + parser->log_size, s); + parser->log_size += len; +} + +static void +orc_parse_log (OrcParser *parser, const char *format, ...) +{ + va_list var_args; + + va_start (var_args, format); + orc_parse_log_valist (parser, format, var_args); + va_end (var_args); +} + +static void +orc_parse_get_line (OrcParser *parser) +{ + const char *end; + int n; + + if (parser->line) { + free (parser->line); + parser->line = NULL; + } + + end = strchr (parser->p, '\n'); + if (end == NULL) { + end = parser->code + parser->code_length; + } + + n = end - parser->p; + parser->line = malloc (n + 1); + memcpy (parser->line, parser->p, n); + parser->line[n] = 0; + + parser->p = end; + if (parser->p[0] == '\n') { + parser->p++; + } + parser->line_number++; +} + + +static void +orc_parse_sanity_check (OrcParser *parser, OrcProgram *program) +{ + int i; + int j; + + for(i=0;i<=ORC_VAR_T15;i++) { + if (program->vars[i].size == 0) continue; + for(j=i+1;j<=ORC_VAR_T15;j++) { + if (program->vars[j].size == 0) continue; + + if (strcmp (program->vars[i].name, program->vars[j].name) == 0) { + orc_parse_log (parser, "error: duplicate variable name: %s\n", + program->vars[i].name); + } + } + } + + for(i=0;in_insns;i++){ + OrcInstruction *insn = program->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + for(j=0;jdest_size[j] == 0) continue; + if (program->vars[insn->dest_args[j]].used && + program->vars[insn->dest_args[j]].vartype == ORC_VAR_TYPE_DEST) { + orc_parse_log (parser, "error: destination \"%s\" written multiple times\n", + program->vars[insn->dest_args[j]].name); + } + program->vars[insn->dest_args[j]].used = TRUE; + } + + for(j=0;jsrc_size[j] == 0) continue; + if (program->vars[insn->src_args[j]].used && + program->vars[insn->src_args[j]].vartype == ORC_VAR_TYPE_SRC) { + orc_parse_log (parser, "error: source \"%s\" read multiple times\n", + program->vars[insn->src_args[j]].name); + } + if (!program->vars[insn->src_args[j]].used && + program->vars[insn->src_args[j]].vartype == ORC_VAR_TYPE_TEMP) { + orc_parse_log (parser, "error: variable \"%s\" used before being written\n", + program->vars[insn->src_args[j]].name); + } + } + + } + +} + +const char * +orc_parse_get_init_function (OrcProgram *program) +{ + return program->init_function; +} + diff --git a/orc/orcparse.h b/orc/orcparse.h new file mode 100644 index 0000000..b95a267 --- /dev/null +++ b/orc/orcparse.h @@ -0,0 +1,16 @@ + +#ifndef __ORC_PARSE_H__ +#define __ORC_PARSE_H__ + +#include + +ORC_BEGIN_DECLS + +int orc_parse (const char *code, OrcProgram ***programs); +int orc_parse_full (const char *code, OrcProgram ***programs, char **log); +const char * orc_parse_get_init_function (OrcProgram *program); + +ORC_END_DECLS + +#endif + diff --git a/orc/orcpowerpc.c b/orc/orcpowerpc.c new file mode 100644 index 0000000..f813109 --- /dev/null +++ b/orc/orcpowerpc.c @@ -0,0 +1,632 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +/** + * SECTION:orcpowerpc + * @title: PowerPC + * @short_description: code generation for PowerPC + */ + + +void orc_compiler_powerpc_init (OrcCompiler *compiler); +void orc_compiler_powerpc_assemble (OrcCompiler *compiler); +void orc_compiler_powerpc_register_rules (OrcTarget *target); + +const char * +powerpc_get_regname(int i) +{ + static const char *powerpc_regs[] = { + "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", + "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", + "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", + "r30", "r31", + "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", + "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", + "v30", "v31", + }; + + if (i>=ORC_GP_REG_BASE && icodeptr++ = (insn>>24); + *compiler->codeptr++ = (insn>>16); + *compiler->codeptr++ = (insn>>8); + *compiler->codeptr++ = (insn>>0); +} + +void +powerpc_emit_add (OrcCompiler *compiler, int regd, int rega, int regb) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," add %s, %s, %s\n", + powerpc_get_regname(regd), + powerpc_get_regname(rega), + powerpc_get_regname(regb)); + insn = 0x7c000214 | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= (powerpc_regnum (regb)<<11); + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_addi_rec (OrcCompiler *compiler, int regd, int rega, int imm) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," addic. %s, %s, %d\n", + powerpc_get_regname(regd), + powerpc_get_regname(rega), imm); + insn = 0x34000000 | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= imm&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_addi (OrcCompiler *compiler, int regd, int rega, int imm) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," addi %s, %s, %d\n", + powerpc_get_regname(regd), + powerpc_get_regname(rega), imm); + insn = (14<<26) | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= imm&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_lwz (OrcCompiler *compiler, int regd, int rega, int imm) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," lwz %s, %d(%s)\n", + powerpc_get_regname(regd), + imm, powerpc_get_regname(rega)); + insn = (32<<26) | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= imm&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_stw (OrcCompiler *compiler, int regs, int rega, int offset) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," stw %s, %d(%s)\n", + powerpc_get_regname(regs), + offset, powerpc_get_regname(rega)); + insn = 0x90000000 | (powerpc_regnum (regs)<<21) | (powerpc_regnum (rega)<<16); + insn |= offset&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_stwu (OrcCompiler *compiler, int regs, int rega, int offset) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," stwu %s, %d(%s)\n", + powerpc_get_regname(regs), + offset, powerpc_get_regname(rega)); + insn = (37<<26) | (powerpc_regnum (regs)<<21) | (powerpc_regnum (rega)<<16); + insn |= offset&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shift, + int record) +{ + unsigned int insn; + + ORC_ASM_CODE(compiler," srawi%s %s, %s, %d\n", (record)?".":"", + powerpc_get_regname(regd), + powerpc_get_regname(rega), shift); + + insn = (31<<26) | (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= (shift<<11) | (824<<1) | record; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_655510 (OrcCompiler *compiler, int major, int d, int a, int b, + int minor) +{ + unsigned int insn; + + insn = (major<<26) | (d<<21) | (a<<16); + insn |= (b<<11) | (minor<<0); + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_D (OrcCompiler *compiler, const char *name, + unsigned int insn, int regd, int rega, int imm) +{ + ORC_ASM_CODE(compiler," %s %s, %s, %d\n", name, + powerpc_get_regname(regd), + powerpc_get_regname(rega), imm); + insn |= (powerpc_regnum (regd)<<21) | (powerpc_regnum (rega)<<16); + insn |= imm&0xffff; + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_X (OrcCompiler *compiler, unsigned int insn, int d, int a, int b) +{ +#if 0 + unsigned int insn; + + insn = (major<<26) | (d<<21) | (a<<16); + insn |= (b<<11) | (minor<<1) | (0<<0); + + powerpc_emit (compiler, insn); +#endif + insn |= ((d&0x1f)<<21); + insn |= ((a&0x1f)<<16); + insn |= ((b&0x1f)<<11); + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_VA (OrcCompiler *compiler, const char *name, unsigned int insn, + int d, int a, int b, int c) +{ + ORC_ASM_CODE(compiler," %s %s, %s, %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(b), + powerpc_get_regname(c)); + + insn |= ((d&0x1f)<<21) | ((a&0x1f)<<16) | ((b&0x1f)<<11) | ((c&0x1f)<<6); + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_VA_acb (OrcCompiler *compiler, const char *name, unsigned int insn, + int d, int a, int b, int c) +{ + ORC_ASM_CODE(compiler," %s %s, %s, %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(c), + powerpc_get_regname(b)); + + insn |= ((d&0x1f)<<21) | ((a&0x1f)<<16) | ((b&0x1f)<<11) | ((c&0x1f)<<6); + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_VXR (OrcCompiler *compiler, const char *name, unsigned int insn, + int d, int a, int b, int record) +{ + ORC_ASM_CODE(compiler," %s %s, %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(b)); + + insn |= ((d&0x1f)<<21) | ((a&0x1f)<<16) | ((b&0x1f)<<11); + insn |= ((record&0x1)<<10); + + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_VX (OrcCompiler *compiler, unsigned int insn, int d, int a, int b) +{ + insn |= ((d&0x1f)<<21); + insn |= ((a&0x1f)<<16); + insn |= ((b&0x1f)<<11); + powerpc_emit (compiler, insn); +} + +void +powerpc_emit_VX_2 (OrcCompiler *p, const char *name, + unsigned int insn, int d, int a, int b) +{ + ORC_ASM_CODE(p," %s %s, %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(b)); + powerpc_emit_VX(p, insn, + powerpc_regnum(d), + powerpc_regnum(a), + powerpc_regnum(b)); +} + +void +powerpc_emit_VX_b (OrcCompiler *p, const char *name, + unsigned int insn, int b) +{ + ORC_ASM_CODE(p," %s %s\n", name, powerpc_get_regname(b)); + powerpc_emit_VX(p, insn, 0, 0, powerpc_regnum(b)); +} + +void +powerpc_emit_VX_db (OrcCompiler *p, const char *name, unsigned int insn, + int d, int b) +{ + ORC_ASM_CODE(p," %s %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(b)); + powerpc_emit_VX(p, insn, powerpc_regnum(d), 0, powerpc_regnum(b)); +} + +void +powerpc_emit_VX_dbi (OrcCompiler *p, const char *name, unsigned int insn, + int d, int b, int imm) +{ + ORC_ASM_CODE(p," %s %s, %s, %d\n", name, + powerpc_get_regname(d), + powerpc_get_regname(b), imm); + powerpc_emit_VX(p, insn, powerpc_regnum(d), imm, powerpc_regnum(b)); +} + +void +powerpc_emit_VX_3_reg (OrcCompiler *p, const char *name, + unsigned int insn, int d, int a, int b, int c) +{ + ORC_ASM_CODE(p," %s %s, %s, %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(b), + powerpc_get_regname(c)); + powerpc_emit_VX(p, insn, + powerpc_regnum(d), + powerpc_regnum(a), + powerpc_regnum(b)); +} + +void +powerpc_emit_VX_3 (OrcCompiler *p, const char *name, + unsigned int insn, int d, int a, int b, int c) +{ + ORC_ASM_CODE(p," %s %s, %s, %s, %d\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a), + powerpc_get_regname(b), c); + powerpc_emit_VX(p, insn, + powerpc_regnum(d), + powerpc_regnum(a), + powerpc_regnum(b)); +} + +void +powerpc_emit_VX_4 (OrcCompiler *p, const char *name, + unsigned int insn, int d, int a) +{ + ORC_ASM_CODE(p," %s %s, %s\n", name, + powerpc_get_regname(d), + powerpc_get_regname(a)); + powerpc_emit_VX(p, insn, + powerpc_regnum(d), + 0, + powerpc_regnum(a)); +} + +void +powerpc_do_fixups (OrcCompiler *compiler) +{ + int i; + unsigned int insn; + + for(i=0;in_fixups;i++){ + unsigned char *label = compiler->labels[compiler->fixups[i].label]; + unsigned char *ptr = compiler->fixups[i].ptr; + + insn = *(unsigned int *)ptr; + + switch (compiler->fixups[i].type) { + case 0: + *(unsigned int *)ptr = (insn&0xffff0000) | ((insn + (label-ptr))&0xffff); + break; + case 1: + *(unsigned int *)ptr = (insn&0xffff0000) | ((insn + (label-compiler->code))&0xffff); + break; + case 2: + *(unsigned int *)ptr = (insn&0xfc000000) | ((insn + (label-ptr))&0x03ffffff); + break; + } + } +} + +void +orc_powerpc_flush_cache (OrcCode *code) +{ +#ifdef HAVE_POWERPC + unsigned char *ptr; + int cache_line_size = 32; + int i; + int size = code->code_size; + + ptr = code->code; + for (i=0;iexec; + for (i=0;iconstants[i].value; + int greg = POWERPC_R31; + int label_skip, label_data; + + switch (p->constants[i].type) { + case ORC_CONST_ZERO: + powerpc_emit_VX_2(p, "vxor", 0x100004c4, reg, reg, reg); + return; + case ORC_CONST_SPLAT_B: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(p," vspltisb %s, %d\n", + powerpc_get_regname(reg), value); + powerpc_emit_VX(p, 0x1000030c, + powerpc_regnum(reg), value & 0x1f, 0); + return; + } + break; + case ORC_CONST_SPLAT_W: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(p," vspltish %s, %d\n", + powerpc_get_regname(reg), value); + powerpc_emit_VX(p, 0x1000034c, + powerpc_regnum(reg), value & 0x1f, 0); + return; + } + break; + case ORC_CONST_SPLAT_L: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(p," vspltisw %s, %d\n", + powerpc_get_regname(reg), value); + powerpc_emit_VX(p, 0x1000038c, + powerpc_regnum(reg), value & 0x1f, 0); + return; + } + break; + default: + break; + } + + switch (p->constants[i].type) { + case ORC_CONST_ZERO: + for(j=0;j<4;j++){ + p->constants[i].full_value[j] = 0; + } + break; + case ORC_CONST_SPLAT_B: + value &= 0xff; + value |= (value<<8); + value |= (value<<16); + for(j=0;j<4;j++){ + p->constants[i].full_value[j] = value; + } + break; + case ORC_CONST_SPLAT_W: + value &= 0xffff; + value |= (value<<16); + for(j=0;j<4;j++){ + p->constants[i].full_value[j] = value; + } + break; + case ORC_CONST_SPLAT_L: + for(j=0;j<4;j++){ + p->constants[i].full_value[j] = value; + } + break; + default: + break; + } + + label_skip = orc_compiler_label_new (p); + label_data = orc_compiler_label_new (p); + + powerpc_emit_b (p, label_skip); + + while ((p->codeptr - p->code) & 0xf) { + ORC_ASM_CODE(p," .long 0x00000000\n"); + powerpc_emit (p, 0x00000000); + } + + powerpc_emit_label (p, label_data); + for(j=0;j<4;j++){ + ORC_ASM_CODE(p," .long 0x%08x\n", p->constants[i].full_value[j]); + powerpc_emit (p, p->constants[i].full_value[j]); + } + + powerpc_emit_label (p, label_skip); + powerpc_emit_lwz (p, + greg, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, program)); + powerpc_emit_lwz (p, + greg, greg, + (int)ORC_STRUCT_OFFSET(OrcProgram, code_exec)); + + powerpc_add_fixup (p, 1, p->codeptr, label_data); + { + unsigned int insn; + + ORC_ASM_CODE(p," addi %s, %s, %db - %s\n", + powerpc_get_regname(greg), + powerpc_get_regname(greg), label_data, p->program->name); + insn = (14<<26) | (powerpc_regnum (greg)<<21) | (powerpc_regnum (greg)<<16); + insn |= 0; + + powerpc_emit (p, insn); + } + + ORC_ASM_CODE(p," lvx %s, 0, %s\n", + powerpc_get_regname(reg), + powerpc_get_regname(greg)); + powerpc_emit_X (p, 0x7c0000ce, reg, 0, greg); + +} + +int +powerpc_get_constant (OrcCompiler *p, int type, int value) +{ + int reg = orc_compiler_get_temp_reg (p); + int i; + + for(i=0;in_constants;i++){ + if (p->constants[i].type == type && + p->constants[i].value == value) { + if (p->constants[i].alloc_reg != 0) { + return p->constants[i].alloc_reg; + } + break; + } + } + if (i == p->n_constants) { + p->n_constants++; + p->constants[i].type = type; + p->constants[i].value = value; + p->constants[i].alloc_reg = 0; + } + + powerpc_load_constant (p, i, reg); + + return reg; +} + +int +powerpc_get_constant_full (OrcCompiler *p, int value0, int value1, + int value2, int value3) +{ + int reg = p->tmpreg; + int i; + + for(i=0;in_constants;i++){ +#if 0 + if (p->constants[i].type == type && + p->constants[i].value == value) { + if (p->constants[i].alloc_reg != 0) { + return p->constants[i].alloc_reg; + } + break; + } +#endif + } + if (i == p->n_constants) { + p->n_constants++; + p->constants[i].type = ORC_CONST_FULL; + p->constants[i].full_value[0] = value0; + p->constants[i].full_value[1] = value1; + p->constants[i].full_value[2] = value2; + p->constants[i].full_value[3] = value3; + p->constants[i].alloc_reg = 0; + } + + powerpc_load_constant (p, i, reg); + + return reg; +} + +void powerpc_emit_ret (OrcCompiler *compiler) +{ + ORC_ASM_CODE(compiler," ret\n"); + //*compiler->codeptr++ = 0xc3; +} + +void +powerpc_add_fixup (OrcCompiler *compiler, int type, unsigned char *ptr, int label) +{ + compiler->fixups[compiler->n_fixups].ptr = ptr; + compiler->fixups[compiler->n_fixups].label = label; + compiler->fixups[compiler->n_fixups].type = type; + compiler->n_fixups++; + if (compiler->n_fixups >= ORC_N_FIXUPS) { + ORC_ERROR("too many fixups"); + } +} + +void +powerpc_add_label (OrcCompiler *compiler, unsigned char *ptr, int label) +{ + compiler->labels[label] = ptr; +} + +void powerpc_emit_b (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," b %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + powerpc_add_fixup (compiler, 2, compiler->codeptr, label); + powerpc_emit (compiler, 0x48000000); +} + +void powerpc_emit_beq (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," ble- %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + powerpc_add_fixup (compiler, 0, compiler->codeptr, label); + powerpc_emit (compiler, 0x40810000); +} + +void powerpc_emit_bne (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," bdnz+ %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + powerpc_add_fixup (compiler, 0, compiler->codeptr, label); + powerpc_emit (compiler, 0x42000000); +} + +void powerpc_emit_label (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler,"%d:\n", label); + + powerpc_add_label (compiler, compiler->codeptr, label); +} + diff --git a/orc/orcpowerpc.h b/orc/orcpowerpc.h new file mode 100644 index 0000000..5a85a47 --- /dev/null +++ b/orc/orcpowerpc.h @@ -0,0 +1,173 @@ + +#ifndef _ORC_POWERPC_H_ +#define _ORC_POWERPC_H_ + +#include + +enum { + POWERPC_R0 = ORC_GP_REG_BASE, + POWERPC_R1, + POWERPC_R2, + POWERPC_R3, + POWERPC_R4, + POWERPC_R5, + POWERPC_R6, + POWERPC_R7, + POWERPC_R8, + POWERPC_R9, + POWERPC_R10, + POWERPC_R11, + POWERPC_R12, + POWERPC_R13, + POWERPC_R14, + POWERPC_R15, + POWERPC_R16, + POWERPC_R17, + POWERPC_R18, + POWERPC_R19, + POWERPC_R20, + POWERPC_R21, + POWERPC_R22, + POWERPC_R23, + POWERPC_R24, + POWERPC_R25, + POWERPC_R26, + POWERPC_R27, + POWERPC_R28, + POWERPC_R29, + POWERPC_R30, + POWERPC_R31, + POWERPC_V0 = ORC_VEC_REG_BASE, + POWERPC_V1, + POWERPC_V2, + POWERPC_V3, + POWERPC_V4, + POWERPC_V5, + POWERPC_V6, + POWERPC_V7, + POWERPC_V8, + POWERPC_V9, + POWERPC_V10, + POWERPC_V11, + POWERPC_V12, + POWERPC_V13, + POWERPC_V14, + POWERPC_V15, + POWERPC_V16, + POWERPC_V17, + POWERPC_V18, + POWERPC_V19, + POWERPC_V20, + POWERPC_V21, + POWERPC_V22, + POWERPC_V23, + POWERPC_V24, + POWERPC_V25, + POWERPC_V26, + POWERPC_V27, + POWERPC_V28, + POWERPC_V29, + POWERPC_V30, + POWERPC_V31 +}; + +const char * powerpc_get_regname(int i); +int powerpc_regnum (int i); + +void powerpc_emit(OrcCompiler *compiler, unsigned int insn); + +void powerpc_emit_add (OrcCompiler *compiler, int regd, int rega, int regb); +void powerpc_emit_addi_rec (OrcCompiler *compiler, int regd, int rega, int imm); +void powerpc_emit_addi (OrcCompiler *compiler, int regd, int rega, int imm); +void powerpc_emit_lwz (OrcCompiler *compiler, int regd, int rega, int imm); +void powerpc_emit_stw (OrcCompiler *compiler, int regs, int rega, int offset); +void powerpc_emit_stwu (OrcCompiler *compiler, int regs, int rega, int offset); + +void powerpc_emit_ret (OrcCompiler *compiler); +void powerpc_emit_b (OrcCompiler *compiler, int label); +void powerpc_emit_beq (OrcCompiler *compiler, int label); +void powerpc_emit_bne (OrcCompiler *compiler, int label); +void powerpc_emit_label (OrcCompiler *compiler, int label); +void powerpc_add_fixup (OrcCompiler *compiler, int type, unsigned char *ptr, int label); +void powerpc_do_fixups (OrcCompiler *compiler); +void orc_powerpc_flush_cache (OrcCode *code); + +void powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shift, + int record); +void powerpc_emit_655510 (OrcCompiler *compiler, int major, int d, int a, + int b, int minor); +void powerpc_emit_D (OrcCompiler *compiler, const char *name, + unsigned int insn, int regd, int rega, int imm); +void powerpc_emit_X (OrcCompiler *compiler, unsigned int insn, int d, int a, + int b); +void powerpc_emit_VA (OrcCompiler *compiler, const char *name, unsigned int insn, int d, int a, int b, + int c); +void powerpc_emit_VA_acb (OrcCompiler *compiler, const char *name, unsigned int insn, int d, int a, int b, + int c); +void powerpc_emit_VX (OrcCompiler *compiler, unsigned int insn, int d, int a, + int b); +void powerpc_emit_VX_b (OrcCompiler *p, const char *name, unsigned int insn, int a); +void powerpc_emit_VX_db (OrcCompiler *p, const char *name, unsigned int insn, int d, int b); +void powerpc_emit_VX_dbi (OrcCompiler *p, const char *name, unsigned int insn, int d, int b, int imm); +void powerpc_emit_VXR (OrcCompiler *compiler, const char *name, + unsigned int insn, int d, int a, int b, int record); +void powerpc_emit_VX_2 (OrcCompiler *p, const char *name, unsigned int insn, + int d, int a, int b); +void powerpc_emit_VX_3 (OrcCompiler *p, const char *name, unsigned int insn, + int d, int a, int b, int c); +void powerpc_emit_VX_3_reg (OrcCompiler *p, const char *name, unsigned int insn, + int d, int a, int b, int c); +void powerpc_emit_VX_4 (OrcCompiler *p, const char *name, unsigned int insn, + int d, int a); +int powerpc_get_constant (OrcCompiler *p, int type, int value); +int powerpc_get_constant_full (OrcCompiler *p, int value0, int value1, int value2, int value3); + +/* instructions */ +#define powerpc_emit_vandc(p,a,b,c) powerpc_emit_VX_2 (p, "vandc", 0x10000444, a, b, c) + +#define powerpc_emit_vor(p,a,b,c) powerpc_emit_VX_2 (p, "vor", 0x10000484, a, b, c) +#define powerpc_emit_vxor(p,a,b,c) powerpc_emit_VX_2 (p, "vxor", 0x100004c4, a, b, c) + +#define powerpc_emit_vmulesb(p,a,b,c) powerpc_emit_VX_2 (p, "vmulesb", 0x10000308, a, b, c) +#define powerpc_emit_vmuleub(p,a,b,c) powerpc_emit_VX_2 (p, "vmuleub", 0x10000208, a, b, c) +#define powerpc_emit_vmulesh(p,a,b,c) powerpc_emit_VX_2 (p, "vmulesh", 0x10000348, a, b, c) +#define powerpc_emit_vmuleuh(p,a,b,c) powerpc_emit_VX_2 (p, "vmuleuh", 0x10000248, a, b, c) + +#define powerpc_emit_vmrghb(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghb", 0x1000000c, a, b, c) +#define powerpc_emit_vmrghh(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghh", 0x1000004c, a, b, c) + +#define powerpc_emit_vpkshss(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshss", 0x1000018e, a, b, c) +#define powerpc_emit_vpkshus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshus", 0x1000010e, a, b, c) +#define powerpc_emit_vpkswss(p,a,b,c) powerpc_emit_VX_2 (p, "vpkswss", 0x100001ce, a, b, c) +#define powerpc_emit_vpkswus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkswus", 0x1000014e, a, b, c) +#define powerpc_emit_vpkuhus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuhus", 0x1000008e, a, b, c) +#define powerpc_emit_vpkuhum(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuhum", 0x1000000e, a, b, c) +#define powerpc_emit_vpkuwus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuwus", 0x100000ce, a, b, c) +#define powerpc_emit_vpkuwum(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuwum", 0x1000004e, a, b, c) + +#define powerpc_emit_vadduhm(p,a,b,c) powerpc_emit_VX_2 (p, "vadduhm", 0x10000040, a, b, c) +#define powerpc_emit_vadduwm(p,a,b,c) powerpc_emit_VX_2 (p, "vadduwm", 0x10000080, a, b, c) +#define powerpc_emit_vsububm(p,a,b,c) powerpc_emit_VX_2 (p, "vsububm", 0x10000400, a, b, c) +#define powerpc_emit_vsum4ubs(p,a,b,c) powerpc_emit_VX_2 (p, "vsum4ubs", 0x10000608, a, b, c) + +#define powerpc_emit_vmaxub(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxub", 0x10000002, a, b, c) +#define powerpc_emit_vmaxsb(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsb", 0x10000102, a, b, c) +#define powerpc_emit_vmaxsh(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsh", 0x10000142, a, b, c) +#define powerpc_emit_vmaxsw(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsw", 0x10000182, a, b, c) + +#define powerpc_emit_vminub(p,a,b,c) powerpc_emit_VX_2 (p, "vminub", 0x10000202, a, b, c) +#define powerpc_emit_vminsb(p,a,b,c) powerpc_emit_VX_2 (p, "vminsb", 0x10000302, a, b, c) +#define powerpc_emit_vminsh(p,a,b,c) powerpc_emit_VX_2 (p, "vminsh", 0x10000342, a, b, c) +#define powerpc_emit_vminsw(p,a,b,c) powerpc_emit_VX_2 (p, "vminsw", 0x10000382, a, b, c) + +#define powerpc_emit_vsldoi(p,a,b,c,d) powerpc_emit_VX_3 (p, "vsldoi", 0x1000002c | (d<<6), a, b, c, d) +#define powerpc_emit_vmladduhm(p,a,b,c,d) powerpc_emit_VA (p, "vmladduhm", 0x10000022, a, b, c, d) + +#define powerpc_emit_vupkhsb(p,a,b) powerpc_emit_VX_4 (p, "vupkhsb", 0x1000020e, a, b) +#define powerpc_emit_vupkhsh(p,a,b) powerpc_emit_VX_4 (p, "vupkhsh", 0x1000024e, a, b) + +#define powerpc_emit_vperm(p,a,b,c,d) powerpc_emit_VA (p, "vperm", 0x1000002b, a, b, c, d) + + +#endif + diff --git a/orc/orcprogram-altivec.c b/orc/orcprogram-altivec.c new file mode 100644 index 0000000..5f1755b --- /dev/null +++ b/orc/orcprogram-altivec.c @@ -0,0 +1,400 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + + +void orc_compiler_powerpc_init (OrcCompiler *compiler); +unsigned int orc_compiler_powerpc_get_default_flags (void); +void orc_compiler_powerpc_assemble (OrcCompiler *compiler); +void orc_compiler_powerpc_register_rules (OrcTarget *target); + + +void +powerpc_emit_prologue (OrcCompiler *compiler) +{ + int i; + + ORC_ASM_CODE (compiler, ".global %s\n", compiler->program->name); + ORC_ASM_CODE (compiler, "%s:\n", compiler->program->name); + + powerpc_emit_stwu (compiler, POWERPC_R1, POWERPC_R1, -16); + + for(i=POWERPC_R13;i<=POWERPC_R31;i++){ + if (compiler->used_regs[i]) { + //powerpc_emit_push (compiler, 4, i); + } + } +} + +void +powerpc_emit_epilogue (OrcCompiler *compiler) +{ + int i; + + for(i=POWERPC_R31;i>=POWERPC_R31;i--){ + if (compiler->used_regs[i]) { + //powerpc_emit_pop (compiler, 4, i); + } + } + + powerpc_emit_addi (compiler, POWERPC_R1, POWERPC_R1, 16); + ORC_ASM_CODE(compiler," blr\n"); + powerpc_emit(compiler, 0x4e800020); +} + +static OrcTarget altivec_target = { + "altivec", +#ifdef HAVE_POWERPC + TRUE, +#else + FALSE, +#endif + ORC_VEC_REG_BASE, + orc_compiler_powerpc_get_default_flags, + orc_compiler_powerpc_init, + orc_compiler_powerpc_assemble, + { { 0 } }, + 0, + NULL, + NULL, + NULL, + orc_powerpc_flush_cache + +}; + +void +orc_powerpc_init (void) +{ + orc_target_register (&altivec_target); + + orc_compiler_powerpc_register_rules (&altivec_target); +} + +unsigned int +orc_compiler_powerpc_get_default_flags (void) +{ + return 0; +} + +void +orc_compiler_powerpc_init (OrcCompiler *compiler) +{ + int i; + + for(i=0;i<32;i++){ + compiler->valid_regs[POWERPC_R0+i] = 1; + compiler->valid_regs[POWERPC_V0+i] = 1; + } + compiler->valid_regs[POWERPC_R0] = 0; /* used for temp space */ + compiler->valid_regs[POWERPC_R1] = 0; /* stack pointer */ + compiler->valid_regs[POWERPC_R2] = 0; /* TOC pointer */ + compiler->valid_regs[POWERPC_R3] = 0; /* pointer to OrcExecutor */ + compiler->valid_regs[POWERPC_R13] = 0; /* reserved */ + + compiler->tmpreg = POWERPC_V0; + compiler->gp_tmpreg = POWERPC_R4; + compiler->valid_regs[compiler->tmpreg] = 0; + compiler->valid_regs[compiler->gp_tmpreg] = 0; + + for(i=14;i<32;i++){ + compiler->save_regs[POWERPC_R0 + i] = 1; + } + for(i=20;i<32;i++){ + compiler->save_regs[POWERPC_V0 + i] = 1; + } + + compiler->loop_shift = 0; +} + +void +powerpc_load_inner_constants (OrcCompiler *compiler) +{ + OrcVariable *var; + int i; + + for(i=0;ivars + i; + + if (compiler->vars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + if (compiler->vars[i].ptr_register) { + powerpc_emit_lwz (compiler, + compiler->vars[i].ptr_register, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + } else { + /* FIXME */ + ORC_ASM_CODE(compiler,"ERROR"); + } + break; + default: + break; + } + } +} + +static int +orc_program_has_float (OrcCompiler *compiler) +{ + int j; + for(j=0;jn_insns;j++){ + OrcInstruction *insn = compiler->insns + j; + OrcStaticOpcode *opcode = insn->opcode; + if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE; + } + return FALSE; +} + +void +orc_compiler_powerpc_assemble (OrcCompiler *compiler) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + //OrcVariable *args[10]; + OrcRule *rule; + int label_outer_loop_start; + int label_loop_start; + int label_leave; + int set_vscr = FALSE; + + label_outer_loop_start = orc_compiler_label_new (compiler); + label_loop_start = orc_compiler_label_new (compiler); + label_leave = orc_compiler_label_new (compiler); + + powerpc_emit_prologue (compiler); + + if (orc_program_has_float (compiler)) { + int tmp = POWERPC_V0; + + set_vscr = TRUE; + + ORC_ASM_CODE(compiler," vspltish %s, %d\n", + powerpc_get_regname(tmp), 1); + powerpc_emit_VX(compiler, 0x1000034c, + powerpc_regnum(tmp), 1, 0); + + powerpc_emit_VX_b(compiler, "mtvscr", 0x10000644, tmp); + } + + if (compiler->program->is_2d) { + powerpc_emit_lwz (compiler, POWERPC_R0, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutorAlt, m)); + powerpc_emit_srawi (compiler, POWERPC_R0, POWERPC_R0, + compiler->loop_shift, 1); + powerpc_emit_beq (compiler, label_leave); + powerpc_emit_stw (compiler, POWERPC_R0, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutorAlt, m_index)); + } + + //powerpc_load_constants (compiler); + powerpc_load_inner_constants (compiler); + + for(k=0;k<4;k++){ + OrcVariable *var = &compiler->vars[ORC_VAR_A1 + k]; + + if (compiler->vars[ORC_VAR_A1 + k].name == NULL) continue; + + //powerpc_emit_VX_2(p, "vxor", 0x100004c4, reg, reg, reg); + powerpc_emit_vxor (compiler, var->alloc, var->alloc, var->alloc); + } + + powerpc_emit_label (compiler, label_outer_loop_start); + + powerpc_emit_lwz (compiler, POWERPC_R0, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, n)); + powerpc_emit_srawi (compiler, POWERPC_R0, POWERPC_R0, + compiler->loop_shift, 1); + + powerpc_emit_beq (compiler, label_leave); + + powerpc_emit (compiler, 0x7c0903a6); + ORC_ASM_CODE (compiler, " mtctr %s\n", powerpc_get_regname(POWERPC_R0)); + + powerpc_emit_label (compiler, label_loop_start); + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + compiler->insn_index = j; + + ORC_ASM_CODE(compiler,"# %d: %s\n", j, insn->opcode->name); + +#if 0 + /* set up args */ + for(k=0;kn_src + opcode->n_dest;k++){ + args[k] = compiler->vars + insn->args[k]; + ORC_ASM_CODE(compiler," %d", args[k]->alloc); + if (args[k]->is_chained) { + ORC_ASM_CODE(compiler," (chained)"); + } + } + ORC_ASM_CODE(compiler,"\n"); +#endif + + for(k=0;kvars + insn->src_args[k]; + + if (opcode->src_size[k] == 0) continue; + + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + //powerpc_emit_load_src (compiler, var); + break; + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + + compiler->min_temp_reg = ORC_VEC_REG_BASE; + + rule = insn->rule; + if (rule) { + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_ASM_CODE(compiler,"No rule for: %s\n", opcode->name); + } + + for(k=0;kvars + insn->dest_args[k]; + + if (opcode->dest_size[k] == 0) continue; + + switch (var->vartype) { + case ORC_VAR_TYPE_DEST: + //powerpc_emit_store_dest (compiler, var); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + } + + for(k=0;kvars[k].name == NULL) continue; + if (compiler->vars[k].vartype == ORC_VAR_TYPE_SRC || + compiler->vars[k].vartype == ORC_VAR_TYPE_DEST) { + if (compiler->vars[k].ptr_register) { + powerpc_emit_addi (compiler, + compiler->vars[k].ptr_register, + compiler->vars[k].ptr_register, + compiler->vars[k].size << compiler->loop_shift); + } else { + ORC_ASM_CODE(compiler,"ERROR\n"); + } + } + } + + powerpc_emit_bne (compiler, label_loop_start); + + if (compiler->program->is_2d) { + powerpc_emit_lwz (compiler, POWERPC_R0, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutorAlt, m_index)); + powerpc_emit_addi_rec (compiler, POWERPC_R0, POWERPC_R0, -1); + powerpc_emit_beq (compiler, label_leave); + + powerpc_emit_stw (compiler, POWERPC_R0, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutorAlt, m_index)); + + for(k=0;kvars[k].name == NULL) continue; + if (compiler->vars[k].vartype == ORC_VAR_TYPE_SRC || + compiler->vars[k].vartype == ORC_VAR_TYPE_DEST) { + if (compiler->vars[k].ptr_register) { + powerpc_emit_lwz (compiler, + compiler->vars[k].ptr_register, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k])); + powerpc_emit_lwz (compiler, + POWERPC_R0, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutorAlt, strides[k])); + powerpc_emit_add (compiler, + compiler->vars[k].ptr_register, + compiler->vars[k].ptr_register, + POWERPC_R0); + powerpc_emit_stw (compiler, + compiler->vars[k].ptr_register, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k])); + } else { + ORC_ASM_CODE(compiler,"ERROR\n"); + } + } + } + + powerpc_emit_b (compiler, label_outer_loop_start); + } + + powerpc_emit_label (compiler, label_leave); + + for(k=0;k<4;k++){ + OrcVariable *var = &compiler->vars[ORC_VAR_A1 + k]; + + if (compiler->vars[ORC_VAR_A1 + k].name == NULL) continue; + + powerpc_emit_addi (compiler, + POWERPC_R0, + POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, accumulators[k])); + + if (var->size == 2) { + powerpc_emit_vxor (compiler, + POWERPC_V0, POWERPC_V0, POWERPC_V0); + powerpc_emit_VX_2 (compiler, "vsum4shs", 0x10000648, + POWERPC_V0, var->alloc, POWERPC_V0); + powerpc_emit_vor (compiler, var->alloc, POWERPC_V0, POWERPC_V0); + } + + ORC_ASM_CODE(compiler," lvsr %s, 0, %s\n", + powerpc_get_regname (POWERPC_V0), + powerpc_get_regname (POWERPC_R0)); + powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(POWERPC_V0), + 0, powerpc_regnum(POWERPC_R0)); + + powerpc_emit_vperm (compiler, var->alloc, var->alloc, var->alloc, + POWERPC_V0); + + ORC_ASM_CODE(compiler," stvewx %s, 0, %s\n", + powerpc_get_regname (var->alloc), + powerpc_get_regname (POWERPC_R0)); + powerpc_emit_X (compiler, 0x7c00018e, + powerpc_regnum(var->alloc), + 0, powerpc_regnum(POWERPC_R0)); + } + + if (set_vscr) { + int tmp = POWERPC_V0; + + ORC_ASM_CODE(compiler," vspltisw %s, %d\n", + powerpc_get_regname(tmp), 0); + powerpc_emit_VX(compiler, 0x1000038c, + powerpc_regnum(tmp), 0, 0); + + powerpc_emit_VX_b(compiler, "mtvscr", 0x10000644, tmp); + } + powerpc_emit_epilogue (compiler); + + powerpc_do_fixups (compiler); +} + diff --git a/orc/orcprogram-arm.c b/orc/orcprogram-arm.c new file mode 100644 index 0000000..f300d9c --- /dev/null +++ b/orc/orcprogram-arm.c @@ -0,0 +1,491 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#define SIZE 65536 + +void orc_arm_emit_loop (OrcCompiler *compiler); + +void orc_compiler_orc_arm_register_rules (OrcTarget *target); + +void orc_compiler_orc_arm_init (OrcCompiler *compiler); +unsigned int orc_compiler_orc_arm_get_default_flags (void); +void orc_compiler_orc_arm_assemble (OrcCompiler *compiler); + +void orc_compiler_rewrite_vars (OrcCompiler *compiler); +void orc_compiler_dump (OrcCompiler *compiler); +void arm_add_strides (OrcCompiler *compiler); + +void +orc_arm_emit_prologue (OrcCompiler *compiler) +{ + unsigned int regs = 0; + int i; + + orc_compiler_append_code(compiler,".global %s\n", compiler->program->name); + orc_compiler_append_code(compiler,"%s:\n", compiler->program->name); + + for(i=0;i<16;i++){ + if (compiler->used_regs[ORC_GP_REG_BASE + i] && + compiler->save_regs[ORC_GP_REG_BASE + i]) { + regs |= (1<used_regs[ORC_GP_REG_BASE + i] && + compiler->save_regs[ORC_GP_REG_BASE + i]) { + regs |= (1<valid_regs[i] = 1; + } + //compiler->valid_regs[ORC_ARM_SB] = 0; + compiler->valid_regs[ORC_ARM_IP] = 0; + compiler->valid_regs[ORC_ARM_SP] = 0; + compiler->valid_regs[ORC_ARM_LR] = 0; + compiler->valid_regs[ORC_ARM_PC] = 0; + for(i=4;i<11;i++) { + compiler->save_regs[ORC_GP_REG_BASE+i] = 1; + } + + for(i=0;ialloc_regs[i] = 0; + compiler->used_regs[i] = 0; + } + compiler->exec_reg = ORC_ARM_A1; + compiler->valid_regs[compiler->exec_reg] = 0; + compiler->gp_tmpreg = ORC_ARM_A2; + compiler->valid_regs[compiler->gp_tmpreg] = 0; + compiler->tmpreg = ORC_ARM_A3; + compiler->valid_regs[compiler->tmpreg] = 0; + + compiler->loop_shift = 0; +} + +void +orc_arm_load_constants_outer (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + //orc_arm_emit_load_imm (compiler, compiler->vars[i].alloc, + // (int)compiler->vars[i].value); + break; + case ORC_VAR_TYPE_PARAM: + ORC_PROGRAM_ERROR(compiler,"unimplemented"); + return; + /* FIXME offset is too large */ + //orc_arm_loadw (compiler, compiler->vars[i].alloc, + // compiler->exec_reg, + // (int)ORC_STRUCT_OFFSET(OrcExecutor, params[i])); + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + break; + default: + break; + } + } + + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + OrcRule *rule; + + if (!(insn->flags & ORC_INSN_FLAG_INVARIANT)) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", i, insn->opcode->name); + + rule = insn->rule; + if (rule && rule->emit) { + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } +} + +void +orc_arm_load_constants_inner (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_arm_emit_load_reg (compiler, + compiler->vars[i].ptr_register, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + break; + default: + break; + } + } +} + +#if 0 +void +orc_arm_emit_load_src (OrcCompiler *compiler, OrcVariable *var) +{ + int ptr_reg; + if (var->ptr_register == 0) { + int i; + i = var - compiler->vars; + //orc_arm_emit_mov_memoffset_reg (compiler, orc_arm_ptr_size, + // (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + // compiler->exec_reg, X86_ECX); + ptr_reg = ORC_ARM_PC; + } else { + ptr_reg = var->ptr_register; + } + switch (var->size << compiler->loop_shift) { + case 1: + orc_arm_loadb (compiler, var->alloc, ptr_reg, 0); + //orc_arm_emit_mov_memoffset_reg (compiler, 1, 0, ptr_reg, X86_ECX); + //orc_arm_emit_mov_reg_arm (compiler, X86_ECX, var->alloc); + break; + case 2: + orc_arm_loadw (compiler, var->alloc, ptr_reg, 0); + //orc_arm_emit_mov_memoffset_reg (compiler, 2, 0, ptr_reg, X86_ECX); + //orc_arm_emit_mov_reg_arm (compiler, X86_ECX, var->alloc); + break; + case 4: + orc_arm_loadl (compiler, var->alloc, ptr_reg, 0); + //orc_arm_emit_mov_memoffset_arm (compiler, 4, 0, ptr_reg, var->alloc); + break; + //case 8: + //orc_arm_emit_mov_memoffset_arm (compiler, 8, 0, ptr_reg, var->alloc); + break; + //case 16: + //orc_arm_emit_mov_memoffset_arm (compiler, 16, 0, ptr_reg, var->alloc); + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size %d", var->size << compiler->loop_shift); + } +} + +void +orc_arm_emit_store_dest (OrcCompiler *compiler, OrcVariable *var) +{ + int ptr_reg; + if (var->ptr_register == 0) { + //orc_arm_emit_mov_memoffset_reg (compiler, orc_arm_ptr_size, + // var->ptr_offset, compiler->exec_reg, X86_ECX); + ptr_reg = ORC_ARM_PC; + } else { + ptr_reg = var->ptr_register; + } + switch (var->size << compiler->loop_shift) { + case 1: + orc_arm_storeb (compiler, ptr_reg, 0, var->alloc); + //orc_arm_emit_mov_orc_arm_reg (compiler, var->alloc, X86_ECX); + //orc_arm_emit_mov_reg_memoffset (compiler, 1, X86_ECX, 0, ptr_reg); + break; + case 2: + orc_arm_storew (compiler, ptr_reg, 0, var->alloc); + //orc_arm_emit_mov_orc_arm_reg (compiler, var->alloc, X86_ECX); + //orc_arm_emit_mov_reg_memoffset (compiler, 2, X86_ECX, 0, ptr_reg); + break; + case 4: + orc_arm_storel (compiler, ptr_reg, 0, var->alloc); + //orc_arm_emit_mov_orc_arm_memoffset (compiler, 4, var->alloc, 0, ptr_reg, + // var->is_aligned, var->is_uncached); + break; + case 8: + //orc_arm_emit_mov_orc_arm_memoffset (compiler, 8, var->alloc, 0, ptr_reg, + // var->is_aligned, var->is_uncached); + break; + case 16: + //orc_arm_emit_mov_orc_arm_memoffset (compiler, 16, var->alloc, 0, ptr_reg, + // var->is_aligned, var->is_uncached); + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size %d", var->size << compiler->loop_shift); + } +} +#endif + +void +orc_compiler_orc_arm_assemble (OrcCompiler *compiler) +{ + int dest_var = ORC_VAR_D1; + + compiler->vars[dest_var].is_aligned = FALSE; + + orc_arm_emit_prologue (compiler); + + orc_arm_load_constants_outer (compiler); + + if (compiler->program->is_2d) { + if (compiler->program->constant_m > 0) { + orc_arm_emit_load_imm (compiler, ORC_ARM_A3, compiler->program->constant_m +); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + } else { + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A1])); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + } + + orc_arm_emit_label (compiler, 8); + } + + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n)); + orc_arm_load_constants_inner (compiler); + + orc_arm_emit_label (compiler, 1); + + orc_arm_emit_cmp_i (compiler, ORC_ARM_COND_AL, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, 3); + + orc_arm_emit_label (compiler, 2); + orc_arm_emit_loop (compiler); + orc_arm_emit_sub_i (compiler, ORC_ARM_COND_AL, 0, ORC_ARM_IP, ORC_ARM_IP, 1); + orc_arm_emit_cmp_i (compiler, ORC_ARM_COND_AL, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, 2); + orc_arm_emit_label (compiler, 3); + + if (compiler->program->is_2d) { + arm_add_strides (compiler); + + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2])); + orc_arm_emit_sub_imm (compiler, ORC_ARM_A3, ORC_ARM_A3, 1, TRUE); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, 8); + } + + orc_arm_emit_epilogue (compiler); + + orc_arm_do_fixups (compiler); +} + +void +orc_arm_emit_loop (OrcCompiler *compiler) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + if (insn->flags & ORC_INSN_FLAG_INVARIANT) continue; + + orc_compiler_append_code(compiler,"# %d: %s", j, insn->opcode->name); + + /* set up args */ +#if 0 + for(k=0;kn_src + opcode->n_dest;k++){ + args[k] = compiler->vars + insn->args[k]; + orc_compiler_append_code(compiler," %d", args[k]->alloc); + if (args[k]->is_chained) { + orc_compiler_append_code(compiler," (chained)"); + } + } +#endif + orc_compiler_append_code(compiler,"\n"); + + for(k=0;ksrc_size[k] == 0) continue; + + switch (compiler->vars[insn->src_args[k]].vartype) { + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + //orc_arm_emit_load_src (compiler, &compiler->vars[insn->src_args[k]]); + break; + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + + rule = insn->rule; + if (rule && rule->emit) { + int src = ORC_SRC_ARG (compiler, insn, 0); + int dest = ORC_DEST_ARG (compiler, insn, 0); + + if (dest != src) { + orc_arm_emit_mov_r (compiler, ORC_ARM_COND_AL, 0, dest, src); + } + rule->emit (compiler, rule->emit_user, insn); + } else { + orc_compiler_append_code(compiler,"No rule for: %s\n", opcode->name); + } + + for(k=0;kdest_size[k] == 0) continue; + + switch (compiler->vars[insn->dest_args[k]].vartype) { + case ORC_VAR_TYPE_DEST: + //orc_arm_emit_store_dest (compiler, &compiler->vars[insn->dest_args[k]]); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + } + + for(k=0;kvars[k].name == NULL) continue; + if (compiler->vars[k].vartype == ORC_VAR_TYPE_SRC || + compiler->vars[k].vartype == ORC_VAR_TYPE_DEST) { + if (compiler->vars[k].ptr_register) { + orc_arm_emit_add_i (compiler, ORC_ARM_COND_AL, 0, + compiler->vars[k].ptr_register, + compiler->vars[k].ptr_register, + compiler->vars[k].size << compiler->loop_shift); + } else { + //orc_arm_emit_add_imm_memoffset (compiler, orc_arm_ptr_size, + // compiler->vars[k].size << compiler->loop_shift, + // (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k]), + // compiler->exec_reg); + } + } + } +} + +void +arm_add_strides (OrcCompiler *compiler) +{ + int i; + + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + orc_arm_emit_load_reg (compiler, ORC_ARM_A2, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[i])); + orc_arm_emit_add (compiler, ORC_ARM_A3, ORC_ARM_A3, ORC_ARM_A2); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c new file mode 100644 index 0000000..c5a3baa --- /dev/null +++ b/orc/orcprogram-c.c @@ -0,0 +1,1403 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include +#include + +static const char *c_get_type_name (int size); +static void c_get_name_int (char *name, OrcCompiler *p, OrcInstruction *insn, int var); + +void orc_c_init (void); + +void +orc_compiler_c_init (OrcCompiler *compiler) +{ + int i; + + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->loop_shift = 0; +} + +const char * +orc_target_c_get_typedefs (void) +{ + return + "#ifndef _ORC_INTEGER_TYPEDEFS_\n" + "#define _ORC_INTEGER_TYPEDEFS_\n" + "#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n" + "#include \n" + "typedef int8_t orc_int8;\n" + "typedef int16_t orc_int16;\n" + "typedef int32_t orc_int32;\n" + "typedef int64_t orc_int64;\n" + "typedef uint8_t orc_uint8;\n" + "typedef uint16_t orc_uint16;\n" + "typedef uint32_t orc_uint32;\n" + "typedef uint64_t orc_uint64;\n" + "#define ORC_UINT64_C(x) UINT64_C(x)\n" + "#elif defined(_MSC_VER)\n" + "typedef signed __int8 orc_int8;\n" + "typedef signed __int16 orc_int16;\n" + "typedef signed __int32 orc_int32;\n" + "typedef signed __int64 orc_int64;\n" + "typedef unsigned __int8 orc_uint8;\n" + "typedef unsigned __int16 orc_uint16;\n" + "typedef unsigned __int32 orc_uint32;\n" + "typedef unsigned __int64 orc_uint64;\n" + "#define ORC_UINT64_C(x) (x##Ui64)\n" + "#else\n" + "#include \n" + "typedef signed char orc_int8;\n" + "typedef short orc_int16;\n" + "typedef int orc_int32;\n" + "typedef unsigned char orc_uint8;\n" + "typedef unsigned short orc_uint16;\n" + "typedef unsigned int orc_uint32;\n" + "#if INT_MAX == LONG_MAX\n" + "typedef long long orc_int64;\n" + "typedef unsigned long long orc_uint64;\n" + "#define ORC_UINT64_C(x) (x##ULL)\n" + "#else\n" + "typedef long orc_int64;\n" + "typedef unsigned long orc_uint64;\n" + "#define ORC_UINT64_C(x) (x##UL)\n" + "#endif\n" + "#endif\n" + "typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;\n" + "typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;\n" + "typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;\n" + "#endif\n"; +} + +const char * +orc_target_c_get_asm_preamble (void) +{ + return "\n" + "/* begin Orc C target preamble */\n" + "#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))\n" + "#define ORC_ABS(a) ((a)<0 ? -(a) : (a))\n" + "#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))\n" + "#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))\n" + "#define ORC_SB_MAX 127\n" + "#define ORC_SB_MIN (-1-ORC_SB_MAX)\n" + "#define ORC_UB_MAX 255\n" + "#define ORC_UB_MIN 0\n" + "#define ORC_SW_MAX 32767\n" + "#define ORC_SW_MIN (-1-ORC_SW_MAX)\n" + "#define ORC_UW_MAX 65535\n" + "#define ORC_UW_MIN 0\n" + "#define ORC_SL_MAX 2147483647\n" + "#define ORC_SL_MIN (-1-ORC_SL_MAX)\n" + "#define ORC_UL_MAX 4294967295U\n" + "#define ORC_UL_MIN 0\n" + "#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)\n" + "#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)\n" + "#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)\n" + "#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)\n" + "#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)\n" + "#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)\n" + "#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8))\n" + "#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24))\n" + "#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56))\n" + "#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))\n" + "#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff))\n" + "#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))\n" + "#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))\n" + "#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))\n" + "#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n" + "#define ORC_RESTRICT restrict\n" + "#elif defined(__GNUC__) && __GNUC__ >= 4\n" + "#define ORC_RESTRICT __restrict__\n" + "#else\n" + "#define ORC_RESTRICT\n" + "#endif\n" + "/* end Orc C target preamble */\n\n"; +} + +unsigned int +orc_compiler_c_get_default_flags (void) +{ + return 0; +} + +static const char *varnames[] = { + "d1", "d2", "d3", "d4", + "s1", "s2", "s3", "s4", + "s5", "s6", "s7", "s8", + "a1", "a2", "a3", "d4", + "c1", "c2", "c3", "c4", + "c5", "c6", "c7", "c8", + "p1", "p2", "p3", "p4", + "p5", "p6", "p7", "p8", + "t1", "t2", "t3", "t4", + "t5", "t6", "t7", "t8", + "t9", "t10", "t11", "t12", + "t13", "t14", "t15", "t16", +}; + +static void +get_varname (char *s, OrcCompiler *compiler, int var) +{ + if (compiler->target_flags & ORC_TARGET_C_NOEXEC) { + if (var < 48) { + strcpy (s, varnames[var]); + } else { + sprintf(s, "t%d", var-32); + } + } else if (compiler->target_flags & ORC_TARGET_C_OPCODE) { + if (var < ORC_VAR_S1) { + sprintf(s, "ex->dest_ptrs[%d]", var-ORC_VAR_D1); + } else { + sprintf(s, "ex->src_ptrs[%d]", var-ORC_VAR_S1); + } + } else { + sprintf(s, "ex->arrays[%d]", var); + } +} + +static void +get_varname_stride (char *s, OrcCompiler *compiler, int var) +{ + if (compiler->target_flags & ORC_TARGET_C_NOEXEC) { + sprintf(s, "%s_stride", varnames[var]); + } else { + sprintf(s, "ex->params[%d]", var); + } +} + +void +orc_compiler_c_assemble (OrcCompiler *compiler) +{ + int i; + int j; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + int prefix = 0; + + if (!(compiler->target_flags & ORC_TARGET_C_BARE)) { + ORC_ASM_CODE(compiler,"void\n"); + ORC_ASM_CODE(compiler,"%s (OrcExecutor *ex)\n", compiler->program->name); + ORC_ASM_CODE(compiler,"{\n"); + } + + ORC_ASM_CODE(compiler,"%*s int i;\n", prefix, ""); + if (compiler->program->is_2d) { + ORC_ASM_CODE(compiler," int j;\n"); + } + if (compiler->program->constant_n == 0) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC) && + !(compiler->target_flags & ORC_TARGET_C_OPCODE)) { + ORC_ASM_CODE(compiler," int n = ex->n;\n"); + } + } else { + ORC_ASM_CODE(compiler," int n = %d;\n", compiler->program->constant_n); + } + if (compiler->program->is_2d) { + if (compiler->program->constant_m == 0) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," int m = ex->params[ORC_VAR_A1];\n"); + } + } else { + ORC_ASM_CODE(compiler," int m = %d;\n", compiler->program->constant_m); + } + } + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_TEMP: + if (!(var->last_use == -1 && var->first_use == 0)) { + ORC_ASM_CODE(compiler," %s var%d;\n", c_get_type_name(var->size), i); + } + break; + case ORC_VAR_TYPE_SRC: + ORC_ASM_CODE(compiler," const %s * ORC_RESTRICT ptr%d;\n", + c_get_type_name (var->size), + i); + break; + case ORC_VAR_TYPE_DEST: + ORC_ASM_CODE(compiler," %s * ORC_RESTRICT ptr%d;\n", + c_get_type_name (var->size), + i); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + if (var->size >= 2) { + ORC_ASM_CODE(compiler," %s var%d = { 0 };\n", + c_get_type_name (var->size), + i); + } else { + ORC_ASM_CODE(compiler," %s var%d = 0;\n", + c_get_type_name (var->size), + i); + } + break; + case ORC_VAR_TYPE_PARAM: + break; + default: + ORC_COMPILER_ERROR(compiler, "bad vartype"); + break; + } + } + + ORC_ASM_CODE(compiler,"\n"); + if (compiler->program->is_2d) { + ORC_ASM_CODE(compiler," for (j = 0; j < m; j++) {\n"); + prefix = 2; + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + { + char s1[40], s2[40]; + get_varname(s1, compiler, i); + get_varname_stride(s2, compiler, i); + ORC_ASM_CODE(compiler, + " ptr%d = ORC_PTR_OFFSET(%s, %s * j);\n", + i, s1, s2); + } + break; + case ORC_VAR_TYPE_DEST: + { + char s1[40], s2[40]; + get_varname(s1, compiler, i), + get_varname_stride(s2, compiler, i), + ORC_ASM_CODE(compiler, + " ptr%d = ORC_PTR_OFFSET(%s, %s * j);\n", + i, s1, s2); + } + break; + default: + break; + } + } + } else { + for(i=0;ivars + i; + char s[40]; + if (var->name == NULL) continue; + get_varname(s, compiler, i); + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + ORC_ASM_CODE(compiler," ptr%d = (%s *)%s;\n", i, + c_get_type_name (var->size), s); + break; + case ORC_VAR_TYPE_DEST: + ORC_ASM_CODE(compiler," ptr%d = (%s *)%s;\n", i, + c_get_type_name (var->size), s); + break; + default: + break; + } + } + } + + ORC_ASM_CODE(compiler,"\n"); + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + if (!(insn->flags & ORC_INSN_FLAG_INVARIANT)) continue; + + ORC_ASM_CODE(compiler,"%*s /* %d: %s */\n", prefix, "", + j, insn->opcode->name); + + rule = insn->rule; + if (!rule) { + ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, + compiler->target->name); + compiler->error = TRUE; + } + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) { + int n; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + n = 2; + } else { + n = 4; + } + for(i=0;iunroll_index = i; + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + rule->emit (compiler, rule->emit_user, insn); + } + } else { + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + rule->emit (compiler, rule->emit_user, insn); + } + } + + ORC_ASM_CODE(compiler,"\n"); + ORC_ASM_CODE(compiler,"%*s for (i = 0; i < n; i++) {\n", prefix, ""); + + /* Emit instructions */ + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + if (insn->flags & ORC_INSN_FLAG_INVARIANT) continue; + + ORC_ASM_CODE(compiler,"%*s /* %d: %s */\n", prefix, "", + j, insn->opcode->name); + + rule = insn->rule; + if (!rule) { + ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, + compiler->target->name); + compiler->error = TRUE; + } + + if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) { + int n; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + n = 2; + } else { + n = 4; + } + for(i=0;iunroll_index = i; + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + rule->emit (compiler, rule->emit_user, insn); + } + } else { + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + rule->emit (compiler, rule->emit_user, insn); + } + } + ORC_ASM_CODE(compiler,"%*s }\n", prefix, ""); + if (compiler->program->is_2d) { + ORC_ASM_CODE(compiler," }\n"); + } + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_ACCUMULATOR: + c_get_name_int (varname, compiler, NULL, i); + if (var->size == 2) { + if (compiler->target_flags & ORC_TARGET_C_NOEXEC) { + ORC_ASM_CODE(compiler," *%s = (%s & 0xffff);\n", + varnames[i], varname); + } else if (compiler->target_flags & ORC_TARGET_C_OPCODE) { + ORC_ASM_CODE(compiler," ((orc_union32 *)ex->dest_ptrs[%d])->i = " + "(%s + ((orc_union32 *)ex->dest_ptrs[%d])->i) & 0xffff;\n", + i - ORC_VAR_A1, varname, i - ORC_VAR_A1); + } else { + ORC_ASM_CODE(compiler," ex->accumulators[%d] = (%s & 0xffff);\n", + i - ORC_VAR_A1, varname); + } + } else { + if (compiler->target_flags & ORC_TARGET_C_NOEXEC) { + ORC_ASM_CODE(compiler," *%s = %s;\n", + varnames[i], varname); + } else if (compiler->target_flags & ORC_TARGET_C_OPCODE) { + ORC_ASM_CODE(compiler," ((orc_union32 *)ex->dest_ptrs[%d])->i += %s;\n", + i - ORC_VAR_A1, varname); + } else { + ORC_ASM_CODE(compiler," ex->accumulators[%d] = %s;\n", + i - ORC_VAR_A1, varname); + } + } + break; + default: + break; + } + } + + if (!(compiler->target_flags & ORC_TARGET_C_BARE)) { + ORC_ASM_CODE(compiler,"}\n"); + ORC_ASM_CODE(compiler,"\n"); + } +} + + +/* rules */ + +static void +c_get_name_int (char *name, OrcCompiler *p, OrcInstruction *insn, int var) +{ + if (p->vars[var].vartype == ORC_VAR_TYPE_PARAM) { + if (p->target_flags & ORC_TARGET_C_NOEXEC) { + sprintf(name,"%s", varnames[var]); + } else if (p->target_flags & ORC_TARGET_C_OPCODE) { + sprintf(name,"((orc_union64 *)(ex->src_ptrs[%d]))->i", + var - ORC_VAR_P1 + p->program->n_src_vars); + } else { + switch (p->vars[var].param_type) { + case ORC_PARAM_TYPE_INT: + sprintf(name,"ex->params[%d]", var); + break; + case ORC_PARAM_TYPE_FLOAT: + sprintf(name,"((orc_union32 *)(ex->params+%d))->i", var); + break; + case ORC_PARAM_TYPE_INT64: + /* FIXME */ + sprintf(name,"((orc_union32 *)(ex->params+%d))->i", var); + break; + case ORC_PARAM_TYPE_DOUBLE: + /* FIXME */ + sprintf(name,"((orc_union32 *)(ex->params+%d))->i", var); + break; + default: + ORC_ASSERT(0); + } + } + } else if (p->vars[var].vartype == ORC_VAR_TYPE_CONST) { + if (p->vars[var].value.i == 0x80000000) { + sprintf(name,"0x80000000"); + } else { + if (p->vars[var].value.i == (int)p->vars[var].value.i) { + sprintf(name, "%d", (int)p->vars[var].value.i); + } else { + ORC_ASSERT(0); + } + } + } else { + if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X2)) { + sprintf(name, "var%d.x2[%d]", var, p->unroll_index); + } else if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X4)) { + sprintf(name, "var%d.x4[%d]", var, p->unroll_index); + } else { + if (p->vars[var].size >= 2) { + sprintf(name, "var%d.i", var); + } else { + sprintf(name, "var%d", var); + } + } + } +} + +static void +c_get_name_float (char *name, OrcCompiler *p, OrcInstruction *insn, int var) +{ + if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X2)) { + sprintf(name, "var%d.x2f[%d]", var, p->unroll_index); + } else if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X4)) { + sprintf(name, "var%d.x4f[%d]", var, p->unroll_index); + } else { + switch (p->vars[var].vartype) { + case ORC_VAR_TYPE_CONST: + case ORC_VAR_TYPE_TEMP: + case ORC_VAR_TYPE_ACCUMULATOR: + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + sprintf(name, "var%d.f", var); + break; + case ORC_VAR_TYPE_PARAM: + sprintf(name, "var%d", var); + break; + default: + ORC_COMPILER_ERROR(p, "bad vartype"); + sprintf(name, "ERROR"); + break; + } + } +} + +static const char * +c_get_type_name (int size) +{ + switch (size) { + case 1: + return "orc_int8"; + case 2: + return "orc_union16"; + case 4: + return "orc_union32"; + case 8: + return "orc_union64"; + default: + return "ERROR"; + } +} + + +#define UNARY(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1); \ +} + +#define BINARY(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + c_get_name_int (src2, p, insn, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1, src2); \ +} + +#define UNARYF(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union32 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union32 _dest1;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); \ + ORC_ASM_CODE(p," _dest1.f = " op ";\n", "_src1.f"); \ + ORC_ASM_CODE(p," %s = ORC_DENORMAL(_dest1.i);\n", dest); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define BINARYF(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + c_get_name_int (src2, p, insn, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union32 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union32 _src2;\n"); \ + ORC_ASM_CODE(p," orc_union32 _dest1;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); \ + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL(%s);\n", src2); \ + ORC_ASM_CODE(p," _dest1.f = " op ";\n", "_src1.f", "_src2.f"); \ + ORC_ASM_CODE(p," %s = ORC_DENORMAL(_dest1.i);\n", dest); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define BINARYFL(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + c_get_name_int (src2, p, insn, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union32 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union32 _src2;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); \ + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL(%s);\n", src2); \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, "_src1.f", "_src2.f"); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define UNARYD(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union64 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union64 _dest1;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); \ + ORC_ASM_CODE(p," _dest1.f = " op ";\n", "_src1.f"); \ + ORC_ASM_CODE(p," %s = ORC_DENORMAL_DOUBLE(_dest1.i);\n", dest); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define BINARYD(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + c_get_name_int (src2, p, insn, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union64 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union64 _src2;\n"); \ + ORC_ASM_CODE(p," orc_union64 _dest1;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); \ + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL_DOUBLE(%s);\n", src2); \ + ORC_ASM_CODE(p," _dest1.f = " op ";\n", "_src1.f", "_src2.f"); \ + ORC_ASM_CODE(p," %s = ORC_DENORMAL_DOUBLE(_dest1.i);\n", dest); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define BINARYDQ(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_int (dest, p, insn, insn->dest_args[0]); \ + c_get_name_int (src1, p, insn, insn->src_args[0]); \ + c_get_name_int (src2, p, insn, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p, " {\n"); \ + ORC_ASM_CODE(p," orc_union64 _src1;\n"); \ + ORC_ASM_CODE(p," orc_union64 _src2;\n"); \ + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); \ + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL_DOUBLE(%s);\n", src2); \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, "_src1.f", "_src2.f"); \ + ORC_ASM_CODE(p, " }\n"); \ +} + +#define BINARY_SB(a,b) BINARY(a,b) +#define BINARY_UB(a,b) BINARY(a,b) +#define BINARY_SW(a,b) BINARY(a,b) +#define BINARY_UW(a,b) BINARY(a,b) +#define BINARY_SL(a,b) BINARY(a,b) +#define BINARY_UL(a,b) BINARY(a,b) +#define BINARY_SQ(a,b) BINARY(a,b) +#define BINARY_UQ(a,b) BINARY(a,b) +#define UNARY_SB(a,b) UNARY(a,b) +#define UNARY_UB(a,b) UNARY(a,b) +#define UNARY_SW(a,b) UNARY(a,b) +#define UNARY_UW(a,b) UNARY(a,b) +#define UNARY_SL(a,b) UNARY(a,b) +#define UNARY_UL(a,b) UNARY(a,b) +#define UNARY_SQ(a,b) UNARY(a,b) +#define UNARY_UQ(a,b) UNARY(a,b) +#define BINARY_BW(a,b) BINARY(a,b) +#define BINARY_WL(a,b) BINARY(a,b) +#define BINARY_LQ(a,b) BINARY(a,b) +#define BINARY_QL(a,b) BINARY(a,b) +#define BINARY_LW(a,b) BINARY(a,b) +#define BINARY_WB(a,b) BINARY(a,b) +#define UNARY_BW(a,b) UNARY(a,b) +#define UNARY_WL(a,b) UNARY(a,b) +#define UNARY_LQ(a,b) UNARY(a,b) +#define UNARY_QL(a,b) UNARY(a,b) +#define UNARY_LW(a,b) UNARY(a,b) +#define UNARY_WB(a,b) UNARY(a,b) + +#define BINARY_F(a,b) BINARYF(a,b) +#define BINARY_FL(a,b) BINARYFL(a,b) +#define UNARY_F(a,b) UNARYF(a,b) +#define UNARY_FL(a,b) UNARYFL(a,b) +#define UNARY_LF(a,b) UNARYLF(a,b) + +#define BINARY_D(a,b) BINARYD(a,b) +#define BINARY_DQ(a,b) BINARYDQ(a,b) +#define UNARY_D(a,b) UNARYD(a,b) +#define UNARY_DL(a,b) UNARYFL(a,b) +#define UNARY_LD(a,b) UNARYLF(a,b) +#define UNARY_DF(a,b) UNARYF(a,b) +#define UNARY_FD(a,b) UNARYF(a,b) + +#include "opcodes.h" + +#undef BINARY_SB +#undef BINARY_UB +#undef BINARY_SW +#undef BINARY_UW +#undef BINARY_SL +#undef BINARY_UL +#undef BINARY_SQ +#undef BINARY_UQ +#undef BINARY_F +#undef BINARY_D +#undef UNARY_SB +#undef UNARY_UB +#undef UNARY_SW +#undef UNARY_UW +#undef UNARY_SL +#undef UNARY_UL +#undef UNARY_SQ +#undef UNARY_UQ +#undef UNARY_F +#undef UNARY_D +#undef BINARY_BW +#undef BINARY_WL +#undef BINARY_LQ +#undef BINARY_QL +#undef BINARY_LW +#undef BINARY_WB +#undef UNARY_BW +#undef UNARY_WL +#undef UNARY_LQ +#undef UNARY_QL +#undef UNARY_LW +#undef UNARY_WB +#undef UNARY_FL +#undef UNARY_DL +#undef UNARY_LF +#undef UNARY_LD +#undef BINARY_FL +#undef BINARY_DQ +#undef UNARY_FD +#undef UNARY_DF + + +static void +c_rule_loadpX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40]; + int size = ORC_PTR_TO_INT(user); + + if ((p->target_flags & ORC_TARGET_C_NOEXEC) && + (p->vars[insn->src_args[0]].param_type == ORC_PARAM_TYPE_FLOAT || + p->vars[insn->src_args[0]].param_type == ORC_PARAM_TYPE_DOUBLE)) + c_get_name_float (dest, p, insn, insn->dest_args[0]); + else + c_get_name_int (dest, p, insn, insn->dest_args[0]); + + if (p->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_PARAM) { + if (p->target_flags & ORC_TARGET_C_NOEXEC) { + ORC_ASM_CODE(p," %s = %s;\n", dest, varnames[insn->src_args[0]]); + } else if (p->target_flags & ORC_TARGET_C_OPCODE) { + ORC_ASM_CODE(p," %s = ((orc_union64 *)(ex->src_ptrs[%d]))->i;\n", + dest, insn->src_args[0] - ORC_VAR_P1 + p->program->n_src_vars); + } else { + if (size == 8) { + ORC_ASM_CODE(p," %s = (ex->params[%d] & 0xffffffff) | ((orc_uint64)(ex->params[%d + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);\n", + dest, insn->src_args[0], insn->src_args[0]); + } else { + ORC_ASM_CODE(p," %s = ex->params[%d];\n", dest, + insn->src_args[0]); + } + } + } else if (p->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_CONST) { + if (p->vars[insn->src_args[0]].size <= 4) { + ORC_ASM_CODE(p," %s = 0x%08x; /* %d or %gf */\n", dest, + (unsigned int)p->vars[insn->src_args[0]].value.i, + (int)p->vars[insn->src_args[0]].value.i, + p->vars[insn->src_args[0]].value.f); + } else { + ORC_ASM_CODE(p," %s = ORC_UINT64_C(0x%08x%08x); /* %gf */\n", dest, + (orc_uint32)(((orc_uint64)p->vars[insn->src_args[0]].value.i)>>32), + ((orc_uint32)p->vars[insn->src_args[0]].value.i), + p->vars[insn->src_args[0]].value.f); + } + } else { + ORC_COMPILER_ERROR(p, "expected param or constant"); + } +} + +#if 0 +static void +c_rule_loadpX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40]; + char src[40]; + OrcVariable *var; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + var = &p->vars[insn->src_args[0]]; + + ORC_ASM_CODE(p," %s = %s;\n", dest, src); +} +#endif + +static void +c_rule_loadX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," var%d = ptr%d[offset + i];\n", insn->dest_args[0], + insn->src_args[0]); + } else { + ORC_ASM_CODE(p," var%d = ptr%d[i];\n", insn->dest_args[0], + insn->src_args[0]); + } +} + +static void +c_rule_loadoffX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char src[40]; + + c_get_name_int (src, p, insn, insn->src_args[1]); + + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," var%d = ptr%d[offset + i + %s];\n", insn->dest_args[0], + insn->src_args[0], src); + } else { + ORC_ASM_CODE(p," var%d = ptr%d[i + %s];\n", insn->dest_args[0], + insn->src_args[0], src); + } +} + +static void +c_rule_loadupdb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," var%d = ptr%d[(offset + i)>>1];\n", insn->dest_args[0], + insn->src_args[0]); + } else { + ORC_ASM_CODE(p," var%d = ptr%d[i>>1];\n", insn->dest_args[0], + insn->src_args[0]); + } +} + +static void +c_rule_loadupib (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," var%d = ((offset + i)&1) ? ((orc_uint8)ptr%d[(offset + i)>>1] + (orc_uint8)ptr%d[((offset + i)>>1)+1] + 1)>>1 : ptr%d[(offset + i)>>1];\n", + insn->dest_args[0], insn->src_args[0], insn->src_args[0], + insn->src_args[0]); + } else { + ORC_ASM_CODE(p," var%d = (i&1) ? ((orc_uint8)ptr%d[i>>1] + (orc_uint8)ptr%d[(i>>1)+1] + 1)>>1 : ptr%d[i>>1];\n", + insn->dest_args[0], insn->src_args[0], insn->src_args[0], + insn->src_args[0]); + } +} + +static void +c_rule_ldresnearX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char src1[40]; + char src2[40]; + + c_get_name_int (src1, p, insn, insn->src_args[1]); + c_get_name_int (src2, p, insn, insn->src_args[2]); + + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," var%d = ptr%d[(%s + (offset + i)*%s)>>16];\n", + insn->dest_args[0], insn->src_args[0], src1, src2); + } else { + ORC_ASM_CODE(p," var%d = ptr%d[(%s + i*%s)>>16];\n", + insn->dest_args[0], insn->src_args[0], src1, src2); + } +} + +static void +c_rule_ldreslinb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char src1[40]; + char src2[40]; + + c_get_name_int (src1, p, insn, insn->src_args[1]); + c_get_name_int (src2, p, insn, insn->src_args[2]); + + ORC_ASM_CODE(p," {\n"); + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," int tmp = %s + (offset + i) * %s;\n", src1, src2); + } else { + ORC_ASM_CODE(p," int tmp = %s + i * %s;\n", src1, src2); + } + ORC_ASM_CODE(p," var%d = ((orc_uint8)ptr%d[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr%d[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8;\n", + insn->dest_args[0], insn->src_args[0], insn->src_args[0]); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_ldreslinl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int i; + char src1[40]; + char src2[40]; + + c_get_name_int (src1, p, insn, insn->src_args[1]); + c_get_name_int (src2, p, insn, insn->src_args[2]); + + + ORC_ASM_CODE(p," {\n"); + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," int tmp = %s + (offset + i) * %s;\n", src1, src2); + } else { + ORC_ASM_CODE(p," int tmp = %s + i * %s;\n", src1, src2); + } + ORC_ASM_CODE(p," orc_union32 a = ptr%d[tmp>>16];\n", insn->src_args[0]); + ORC_ASM_CODE(p," orc_union32 b = ptr%d[(tmp>>16)+1];\n", insn->src_args[0]); + for (i=0;i<4;i++){ + ORC_ASM_CODE(p," var%d.x4[%d] = ((orc_uint8)a.x4[%d] * (256-((tmp>>8)&0xff)) + (orc_uint8)b.x4[%d] * ((tmp>>8)&0xff))>>8;\n", + insn->dest_args[0], i, i, i); + } + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_storeX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_C_OPCODE && + !(insn->flags & ORC_INSN_FLAG_ADDED)) { + ORC_ASM_CODE(p," ptr%d[offset + i] = var%d;\n", insn->dest_args[0], + insn->src_args[0]); + } else { + ORC_ASM_CODE(p," ptr%d[i] = var%d;\n", insn->dest_args[0], + insn->src_args[0]); + } +} + +static void +c_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s + %s;\n", dest, dest, src1); +} + +static void +c_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s + %s;\n", dest, dest, src1); +} + +static void +c_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p, + " %s = %s + ORC_ABS((orc_int32)(orc_uint8)%s - (orc_int32)(orc_uint8)%s);\n", + dest, dest, src1, src2); +} + +static void +c_rule_splitql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest1[40], dest2[40], src[40]; + + c_get_name_int (dest1, p, insn, insn->dest_args[0]); + c_get_name_int (dest2, p, insn, insn->dest_args[1]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = (%s >> 32) & 0xffffffff;\n", dest1, src); + ORC_ASM_CODE(p," %s = %s & 0xffffffff;\n", dest2, src); +} + +static void +c_rule_splitlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest1[40], dest2[40], src[40]; + + c_get_name_int (dest1, p, insn, insn->dest_args[0]); + c_get_name_int (dest2, p, insn, insn->dest_args[1]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = (%s >> 16) & 0xffff;\n", dest1, src); + ORC_ASM_CODE(p," %s = %s & 0xffff;\n", dest2, src); +} + +static void +c_rule_splitwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest1[40], dest2[40], src[40]; + + c_get_name_int (dest1, p, insn, insn->dest_args[0]); + c_get_name_int (dest2, p, insn, insn->dest_args[1]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = (%s >> 8) & 0xff;\n", dest1, src); + ORC_ASM_CODE(p," %s = %s & 0xff;\n", dest2, src); +} + +static void +c_rule_splatbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = ((%s&0xff) << 8) | (%s&0xff);\n", dest, src, src); +} + +static void +c_rule_splatbl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, + " %s = ((%s&0xff) << 24) | ((%s&0xff)<<16) | ((%s&0xff) << 8) | (%s&0xff);\n", + dest, src, src, src, src); +} + +static void +c_rule_splatw3q (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, + " %s = ((((orc_uint64)%s)>>48) << 48) | " + "((((orc_uint64)%s)>>48)<<32) | " + "((((orc_uint64)%s)>>48) << 16) | " + "((((orc_uint64)%s)>>48));\n", + dest, src, src, src, src); +} + +static void +c_rule_div255w (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, + " %s = ((uint16_t)(((orc_uint16)(%s+128)) + (((orc_uint16)(%s+128))>>8)))>>8;\n", + dest, src, src); +} + +static void +c_rule_divluw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p, + " %s = ((%s&0xff) == 0) ? 255 : ORC_CLAMP_UB(((uint16_t)%s)/((uint16_t)%s&0xff));\n", + dest, src2, src1, src2); +} + +static void +c_rule_convlf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_float (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s;\n", dest, src1); +} + +static void +c_rule_convld (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_float (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s;\n", dest, src1); +} + +static void +c_rule_convfd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_float (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, " {\n"); + ORC_ASM_CODE(p," orc_union32 _src1;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); + ORC_ASM_CODE(p," %s = _src1.f;\n", dest); + ORC_ASM_CODE(p, " }\n"); +} + +static void +c_rule_convdf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, " {\n"); + ORC_ASM_CODE(p," orc_union64 _src1;\n"); + ORC_ASM_CODE(p," orc_union32 _dest;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); + ORC_ASM_CODE(p," _dest.f = _src1.f;\n"); + ORC_ASM_CODE(p," %s = ORC_DENORMAL(_dest.i);\n", dest); + ORC_ASM_CODE(p, " }\n"); +} + +static void +c_rule_convfl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40], src_i[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_float (src, p, insn, insn->src_args[0]); + c_get_name_int (src_i, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, " {\n"); + ORC_ASM_CODE(p," int tmp;\n"); + ORC_ASM_CODE(p," tmp = (int)%s;\n", src); + ORC_ASM_CODE(p," if (tmp == 0x80000000 && !(%s&0x80000000)) tmp = 0x7fffffff;\n", src_i); + ORC_ASM_CODE(p," %s = tmp;\n", dest); + ORC_ASM_CODE(p, " }\n"); +} + +static void +c_rule_convdl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40], src_i[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_float (src, p, insn, insn->src_args[0]); + c_get_name_int (src_i, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p, " {\n"); + ORC_ASM_CODE(p," int tmp;\n"); + ORC_ASM_CODE(p," tmp = %s;\n", src); + ORC_ASM_CODE(p," if (tmp == 0x80000000 && !(%s & ORC_UINT64_C(0x8000000000000000))) tmp = 0x7fffffff;\n", src_i); + ORC_ASM_CODE(p," %s = tmp;\n", dest); + ORC_ASM_CODE(p, " }\n"); +} + +static void +c_rule_minf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," orc_union32 _src1;\n"); + ORC_ASM_CODE(p," orc_union32 _src2;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL(%s);\n", src2); + ORC_ASM_CODE(p," if (ORC_ISNAN(_src1.i)) %s = _src1.i;\n", dest); + ORC_ASM_CODE(p," else if (ORC_ISNAN(_src2.i)) %s = _src2.i;\n", dest); + ORC_ASM_CODE(p," else %s = (_src1.f < _src2.f) ? _src1.i : _src2.i;\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_maxf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," orc_union32 _src1;\n"); + ORC_ASM_CODE(p," orc_union32 _src2;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL(%s);\n", src1); + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL(%s);\n", src2); + ORC_ASM_CODE(p," if (ORC_ISNAN(_src1.i)) %s = _src1.i;\n", dest); + ORC_ASM_CODE(p," else if (ORC_ISNAN(_src2.i)) %s = _src2.i;\n", dest); + ORC_ASM_CODE(p," else %s = (_src1.f > _src2.f) ? _src1.i : _src2.i;\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_mind (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," orc_union64 _src1;\n"); + ORC_ASM_CODE(p," orc_union64 _src2;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL_DOUBLE(%s);\n", src2); + ORC_ASM_CODE(p," if (ORC_ISNAN_DOUBLE(_src1.i)) %s = _src1.i;\n", dest); + ORC_ASM_CODE(p," else if (ORC_ISNAN_DOUBLE(_src2.i)) %s = _src2.i;\n", dest); + ORC_ASM_CODE(p," else %s = (_src1.f < _src2.f) ? _src1.i : _src2.i;\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_maxd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src1, p, insn, insn->src_args[0]); + c_get_name_int (src2, p, insn, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," orc_union64 _src1;\n"); + ORC_ASM_CODE(p," orc_union64 _src2;\n"); + ORC_ASM_CODE(p," _src1.i = ORC_DENORMAL_DOUBLE(%s);\n", src1); + ORC_ASM_CODE(p," _src2.i = ORC_DENORMAL_DOUBLE(%s);\n", src2); + ORC_ASM_CODE(p," if (ORC_ISNAN_DOUBLE(_src1.i)) %s = _src1.i;\n", dest); + ORC_ASM_CODE(p," else if (ORC_ISNAN_DOUBLE(_src2.i)) %s = _src2.i;\n", dest); + ORC_ASM_CODE(p," else %s = (_src1.f > _src2.f) ? _src1.i : _src2.i;\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_swapwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = ((%s&0x0000ffff) << 16) | ((%s&0xffff0000) >> 16);\n", + dest, src, src); +} + +static void +c_rule_swaplq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src[40]; + + c_get_name_int (dest, p, insn, insn->dest_args[0]); + c_get_name_int (src, p, insn, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = (ORC_UINT64_C(%s&0x00000000ffffffff) << 32) | (ORC_UINT64_C(%s&0xffffffff00000000) >> 32);\n", + dest, src, src); +} + +static OrcTarget c_target = { + "c", + FALSE, + ORC_GP_REG_BASE, + orc_compiler_c_get_default_flags, + orc_compiler_c_init, + orc_compiler_c_assemble, + { { 0 } }, + 0, + orc_target_c_get_asm_preamble, +}; + + +void +orc_c_init (void) +{ + OrcRuleSet *rule_set; + + orc_target_register (&c_target); + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), &c_target, 0); + +#define BINARY_SB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_UB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_SW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_UW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_SL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_UL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_SQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_UQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_F(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_D(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_SB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_UB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_SW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_UW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_SL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_UL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_SQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_UQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_F(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_D(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_BW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_WL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_LQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_QL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_LW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_WB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_BW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_WL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_LQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_QL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_LW(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_WB(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); + +#define UNARY_FL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_DL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_FL(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define BINARY_DQ(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_LF(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_LD(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_DF(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); +#define UNARY_FD(a,b) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); + +#include "opcodes.h" + + orc_rule_register (rule_set, "loadpb", c_rule_loadpX, (void *)1); + orc_rule_register (rule_set, "loadpw", c_rule_loadpX, (void *)2); + orc_rule_register (rule_set, "loadpl", c_rule_loadpX, (void *)4); + orc_rule_register (rule_set, "loadpq", c_rule_loadpX, (void *)8); + orc_rule_register (rule_set, "loadb", c_rule_loadX, NULL); + orc_rule_register (rule_set, "loadw", c_rule_loadX, NULL); + orc_rule_register (rule_set, "loadl", c_rule_loadX, NULL); + orc_rule_register (rule_set, "loadq", c_rule_loadX, NULL); + orc_rule_register (rule_set, "loadoffb", c_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffw", c_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffl", c_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadupdb", c_rule_loadupdb, NULL); + orc_rule_register (rule_set, "loadupib", c_rule_loadupib, NULL); + orc_rule_register (rule_set, "ldresnearb", c_rule_ldresnearX, NULL); + orc_rule_register (rule_set, "ldresnearl", c_rule_ldresnearX, NULL); + orc_rule_register (rule_set, "ldreslinb", c_rule_ldreslinb, NULL); + orc_rule_register (rule_set, "ldreslinl", c_rule_ldreslinl, NULL); + orc_rule_register (rule_set, "storeb", c_rule_storeX, NULL); + orc_rule_register (rule_set, "storew", c_rule_storeX, NULL); + orc_rule_register (rule_set, "storel", c_rule_storeX, NULL); + orc_rule_register (rule_set, "storeq", c_rule_storeX, NULL); + + orc_rule_register (rule_set, "accw", c_rule_accw, NULL); + orc_rule_register (rule_set, "accl", c_rule_accl, NULL); + orc_rule_register (rule_set, "accsadubl", c_rule_accsadubl, NULL); + orc_rule_register (rule_set, "splitql", c_rule_splitql, NULL); + orc_rule_register (rule_set, "splitlw", c_rule_splitlw, NULL); + orc_rule_register (rule_set, "splitwb", c_rule_splitwb, NULL); + orc_rule_register (rule_set, "splatbw", c_rule_splatbw, NULL); + orc_rule_register (rule_set, "splatbl", c_rule_splatbl, NULL); + orc_rule_register (rule_set, "splatw3q", c_rule_splatw3q, NULL); + orc_rule_register (rule_set, "div255w", c_rule_div255w, NULL); + orc_rule_register (rule_set, "divluw", c_rule_divluw, NULL); + orc_rule_register (rule_set, "convlf", c_rule_convlf, NULL); + orc_rule_register (rule_set, "convld", c_rule_convld, NULL); + orc_rule_register (rule_set, "convfl", c_rule_convfl, NULL); + orc_rule_register (rule_set, "convdl", c_rule_convdl, NULL); + orc_rule_register (rule_set, "convfd", c_rule_convfd, NULL); + orc_rule_register (rule_set, "convdf", c_rule_convdf, NULL); + orc_rule_register (rule_set, "minf", c_rule_minf, NULL); + orc_rule_register (rule_set, "maxf", c_rule_maxf, NULL); + orc_rule_register (rule_set, "mind", c_rule_mind, NULL); + orc_rule_register (rule_set, "maxd", c_rule_maxd, NULL); + orc_rule_register (rule_set, "swapwl", c_rule_swapwl, NULL); + orc_rule_register (rule_set, "swaplq", c_rule_swaplq, NULL); +} + diff --git a/orc/orcprogram-c64x-c.c b/orc/orcprogram-c64x-c.c new file mode 100644 index 0000000..de66a18 --- /dev/null +++ b/orc/orcprogram-c64x-c.c @@ -0,0 +1,1086 @@ + +#include "config.h" + +#include +#include + +#include +#include +#include + +//static const char *c_get_type_name (int size); + +void orc_c_init (void); + +static void emit_loop (OrcCompiler *compiler, int prefix); + +void +orc_compiler_c64x_c_init (OrcCompiler *compiler) +{ + int i; + + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->loop_shift = 0; +} + +const char * +orc_target_c64x_c_get_asm_preamble (void) +{ + return "\n" + "/* begin Orc C target preamble */\n" + "typedef signed char int8_t;\n" + "typedef unsigned char uint8_t;\n" + "typedef signed short int16_t;\n" + "typedef unsigned short uint16_t;\n" + "typedef signed int int32_t;\n" + "typedef unsigned int uint32_t;\n" + "typedef signed long long int64_t;\n" + "typedef unsigned long long uint64_t;\n" + "#define ORC_RESTRICT restrict\n" + "typedef struct _OrcProgram OrcProgram;\n" + "typedef struct _OrcExecutor OrcExecutor;\n" + "#define ORC_N_VARIABLES 20\n" + "#define ORC_N_REGISTERS 20\n" + "#define ORC_OPCODE_N_ARGS 4\n" + "struct _OrcExecutor {\n" + " OrcProgram *program;\n" + " int n;\n" + " int counter1;\n" + " int counter2;\n" + " int counter3;\n" + " void *arrays[ORC_N_VARIABLES];\n" + " int params[ORC_N_VARIABLES];\n" + " //OrcVariable vars[ORC_N_VARIABLES];\n" + " //OrcVariable *args[ORC_OPCODE_N_ARGS];\n" + "};\n" + "#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))\n" + "#define ORC_ABS(a) ((a)<0 ? -(a) : (a))\n" + "#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))\n" + "#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))\n" + "#define ORC_SB_MAX 127\n" + "#define ORC_SB_MIN (-1-ORC_SB_MAX)\n" + "#define ORC_UB_MAX 255\n" + "#define ORC_UB_MIN 0\n" + "#define ORC_SW_MAX 32767\n" + "#define ORC_SW_MIN (-1-ORC_SW_MAX)\n" + "#define ORC_UW_MAX 65535\n" + "#define ORC_UW_MIN 0\n" + "#define ORC_SL_MAX 2147483647\n" + "#define ORC_SL_MIN (-1-ORC_SL_MAX)\n" + "#define ORC_UL_MAX 4294967295U\n" + "#define ORC_UL_MIN 0\n" + "#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)\n" + "#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)\n" + "#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)\n" + "#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)\n" + "#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)\n" + "#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)\n" + "#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8))\n" + "#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24))\n" + "#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))\n" + "/* end Orc C target preamble */\n\n"; +} + +unsigned int +orc_compiler_c64x_c_get_default_flags (void) +{ + return ORC_TARGET_C_NOEXEC; +} + +static const char *varnames[] = { + "d1", "d2", "d3", "d4", + "s1", "s2", "s3", "s4", + "s5", "s6", "s7", "s8", + "a1", "a2", "a3", "d4", + "c1", "c2", "c3", "c4", + "c5", "c6", "c7", "c8", + "p1", "p2", "p3", "p4", + "p5", "p6", "p7", "p8", + "t1", "t2", "t3", "t4", + "t5", "t6", "t7", "t8", + "t9", "t10", "t11", "t12", + "t13", "t14", "t15", "t16" +}; + +static void +output_prototype (OrcCompiler *compiler) +{ + OrcProgram *p = compiler->program; + OrcVariable *var; + int i; + int need_comma; + + ORC_ASM_CODE(compiler, "%s (", p->name); + need_comma = FALSE; + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + if (var->type_name) { + ORC_ASM_CODE(compiler, "%s * %s", var->type_name, + varnames[ORC_VAR_D1 + i]); + } else { + ORC_ASM_CODE(compiler, "uint%d_t * %s", var->size*8, + varnames[ORC_VAR_D1 + i]); + } + if (p->is_2d) { + ORC_ASM_CODE(compiler, ", int %s_stride", varnames[ORC_VAR_D1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + if (var->type_name) { + ORC_ASM_CODE(compiler, "%s * %s", var->type_name, + varnames[ORC_VAR_A1 + i]); + } else { + ORC_ASM_CODE(compiler, "uint%d_t * %s", var->size*8, + varnames[ORC_VAR_A1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + if (var->type_name) { + ORC_ASM_CODE(compiler, "%s * %s", var->type_name, + varnames[ORC_VAR_S1 + i]); + } else { + ORC_ASM_CODE(compiler, "uint%d_t * %s", var->size*8, + varnames[ORC_VAR_S1 + i]); + } + if (p->is_2d) { + ORC_ASM_CODE(compiler, ", int %s_stride", varnames[ORC_VAR_S1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + ORC_ASM_CODE(compiler, "int %s", varnames[ORC_VAR_P1 + i]); + need_comma = TRUE; + } + } + if (p->constant_n == 0) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + ORC_ASM_CODE(compiler, "int n"); + need_comma = TRUE; + } + if (p->is_2d && p->constant_m == 0) { + if (need_comma) ORC_ASM_CODE(compiler, ", "); + ORC_ASM_CODE(compiler, "int m"); + } + ORC_ASM_CODE(compiler, ")"); +} + +static int +get_align_var (OrcCompiler *compiler) +{ + if (compiler->vars[ORC_VAR_D1].size) return ORC_VAR_D1; + if (compiler->vars[ORC_VAR_S1].size) return ORC_VAR_S1; + + ORC_COMPILER_ERROR(compiler, "could not find alignment variable"); + + return -1; +} + +static int +get_shift (int size) +{ + switch (size) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + ORC_ERROR("bad size %d", size); + } + return -1; +} + +void +orc_compiler_c64x_c_assemble (OrcCompiler *compiler) +{ + int i; + int prefix = 0; + int loop_shift = 0; + int align_var; + + align_var = get_align_var (compiler); + + switch (compiler->max_var_size) { + case 1: + loop_shift = 2; + break; + case 2: + loop_shift = 1; + break; + case 4: + loop_shift = 0; + break; + default: + ORC_ERROR("unhandled max var size %d", compiler->max_var_size); + break; + } + + compiler->target_flags |= ORC_TARGET_C_NOEXEC; + + if (!(compiler->target_flags & ORC_TARGET_C_BARE)) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler,"void\n"); + ORC_ASM_CODE(compiler,"%s (OrcExecutor *ex)\n", compiler->program->name); + } else{ + ORC_ASM_CODE(compiler,"void\n"); + output_prototype (compiler); + ORC_ASM_CODE(compiler,"\n"); + } + ORC_ASM_CODE(compiler,"{\n"); + } + + ORC_ASM_CODE(compiler,"%*s int i;\n", prefix, ""); + if (compiler->program->is_2d) { + ORC_ASM_CODE(compiler," int j;\n"); + } + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_CONST: + { + int value = var->value.i; + + if (var->size == 1) { + value = (value&0xff); + value |= (value<<8); + value |= (value<<16); + } + if (var->size == 2) { + value = (value&0xffff); + value |= (value<<16); + } + + if (value == 0x80000000) { + ORC_ASM_CODE(compiler," const int var%d = 0x80000000;\n", i); + } else { + ORC_ASM_CODE(compiler," const int var%d = %d;\n", + i, value); + } + } + break; + case ORC_VAR_TYPE_TEMP: + ORC_ASM_CODE(compiler," int var%d;\n", i); + break; + case ORC_VAR_TYPE_SRC: + ORC_ASM_CODE(compiler," const unsigned char * restrict var%d;\n", i); + break; + case ORC_VAR_TYPE_DEST: + ORC_ASM_CODE(compiler," unsigned char * restrict var%d;\n", i); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + ORC_ASM_CODE(compiler," int var%d = 0;\n", i); + break; + case ORC_VAR_TYPE_PARAM: + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," const int var%d = ex->params[%d];\n", i, i); + } else { + ORC_ASM_CODE(compiler," const int var%d = %s;\n", i, varnames[i]); + } + break; + default: + ORC_COMPILER_ERROR(compiler, "bad vartype"); + break; + } + } + + if (compiler->program->constant_n == 0) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler,"%*s int n;\n", prefix, ""); + } + } + if (loop_shift > 0) { + ORC_ASM_CODE(compiler,"%*s int n1, n2, n3;\n", prefix, ""); + } + + ORC_ASM_CODE(compiler,"\n"); + if (compiler->program->is_2d) { + if (compiler->program->constant_m == 0) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," for (j = 0; j < ex->params[ORC_VAR_A1]; j++) {\n"); + } else { + ORC_ASM_CODE(compiler," for (j = 0; j < m; j++) {\n"); + } + } else { + ORC_ASM_CODE(compiler," for (j = 0; j < %d; j++) {\n", + compiler->program->constant_m); + } + prefix = 2; + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," var%d = ORC_PTR_OFFSET(ex->arrays[%d], ex->params[%d] * j);\n", + i, i, i); + } else { + ORC_ASM_CODE(compiler," var%d = ORC_PTR_OFFSET(%s, %s_stride * j);\n", + i, varnames[i], varnames[i]); + } + break; + case ORC_VAR_TYPE_DEST: + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," var%d = ORC_PTR_OFFSET(ex->arrays[%d], ex->params[%d] * j);\n", + i, i, i); + } else { + ORC_ASM_CODE(compiler," var%d = ORC_PTR_OFFSET(%s, %s_stride * j);\n", + i, varnames[i], varnames[i]); + } + break; + default: + break; + } + } + } else { + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," var%d = ex->arrays[%d];\n", i, i); + } else { + ORC_ASM_CODE(compiler," var%d = (void *)%s;\n", i, varnames[i]); + } + break; + case ORC_VAR_TYPE_DEST: + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," var%d = ex->arrays[%d];\n", i, i); + } else { + ORC_ASM_CODE(compiler," var%d = (void *)%s;\n", i, varnames[i]); + } + break; + default: + break; + } + } + } + + if (compiler->program->constant_n == 0) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler,"%*s n = ex->n;\n", prefix, ""); + } + } + if (loop_shift > 0) { + ORC_ASM_CODE(compiler,"%*s n1 = ((4 - (int)var%d)&0x3) >> %d;\n", + prefix, "", align_var, get_shift(compiler->vars[align_var].size)); + ORC_ASM_CODE(compiler,"%*s n2 = (n - n1) >> %d;\n", + prefix, "", loop_shift); + ORC_ASM_CODE(compiler,"%*s n3 = n & ((1 << %d) - 1);\n", + prefix, "", loop_shift); + + ORC_ASM_CODE(compiler,"\n"); + + ORC_ASM_CODE(compiler,"#pragma MUST_ITERATE(0,%d)\n", (1<loop_shift = 0; + emit_loop (compiler, prefix); + ORC_ASM_CODE(compiler,"%*s }\n", prefix, ""); + + ORC_ASM_CODE(compiler,"%*s for (i = 0; i < n2; i++) {\n", prefix, ""); + compiler->vars[align_var].is_aligned = TRUE; + compiler->loop_shift = loop_shift; + emit_loop (compiler, prefix); + compiler->vars[align_var].is_aligned = FALSE; + ORC_ASM_CODE(compiler,"%*s }\n", prefix, ""); + + ORC_ASM_CODE(compiler,"#pragma MUST_ITERATE(0,%d)\n", (1<loop_shift = 0; + emit_loop (compiler, prefix); + ORC_ASM_CODE(compiler,"%*s }\n", prefix, ""); + } else { + ORC_ASM_CODE(compiler,"%*s for (i = 0; i < n; i++) {\n", prefix, ""); + compiler->loop_shift = loop_shift; + emit_loop (compiler, prefix); + ORC_ASM_CODE(compiler,"%*s }\n", prefix, ""); + } + + if (compiler->program->is_2d) { + ORC_ASM_CODE(compiler," }\n"); + } + + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_ACCUMULATOR: + if (var->size == 2) { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," ex->accumulators[%d] = (var%d & 0xffff);\n", + i - ORC_VAR_A1, i); + } else { + ORC_ASM_CODE(compiler," *%s = (var%d & 0xffff);\n", + varnames[i], i); + } + } else { + if (!(compiler->target_flags & ORC_TARGET_C_NOEXEC)) { + ORC_ASM_CODE(compiler," ex->accumulators[%d] = var%d;\n", + i - ORC_VAR_A1, i); + } else { + ORC_ASM_CODE(compiler," *%s = var%d;\n", + varnames[i], i); + } + } + break; + default: + break; + } + } + + if (!(compiler->target_flags & ORC_TARGET_C_BARE)) { + ORC_ASM_CODE(compiler,"}\n"); + ORC_ASM_CODE(compiler,"\n"); + } +} + +static void +emit_loop (OrcCompiler *compiler, int prefix) +{ + int j; + int i; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + ORC_ASM_CODE(compiler,"%*s /* %d: %s */\n", prefix, "", + j, insn->opcode->name); + + rule = insn->rule; + if (rule) { + ORC_ASM_CODE(compiler,"%*s", prefix, ""); + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", + opcode->name, compiler->target->name); + compiler->error = TRUE; + } + } + ORC_ASM_CODE(compiler,"\n"); + for(i=0;ivars + i; + if (var->name == NULL) continue; + switch (var->vartype) { + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + ORC_ASM_CODE(compiler,"%*s var%d += %d;\n", prefix, "", + i, var->size << compiler->loop_shift); + break; + default: + break; + } + } +} + +/* rules */ + +static void +c_get_name (char *name, OrcCompiler *p, int var) +{ + int size; + + size = p->vars[var].size << p->loop_shift; + + switch (p->vars[var].vartype) { + case ORC_VAR_TYPE_CONST: + case ORC_VAR_TYPE_PARAM: + case ORC_VAR_TYPE_TEMP: + case ORC_VAR_TYPE_ACCUMULATOR: + sprintf(name, "var%d", var); + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + if (size == 1) { + sprintf(name, "(*(%sint8_t *)var%d)", + (p->vars[var].vartype == ORC_VAR_TYPE_SRC) ? "const " : "", var); + } else { + sprintf(name, "_%smem%d%s(var%d)", + (p->vars[var].is_aligned) ? "a" : "", size, + (p->vars[var].vartype == ORC_VAR_TYPE_SRC) ? "_const" : "", var); + } + break; + default: + ORC_COMPILER_ERROR(p, "bad vartype"); + sprintf(name, "ERROR"); + break; + } +} + +static void +c_get_name_float (char *name, OrcCompiler *p, int var) +{ + switch (p->vars[var].vartype) { + case ORC_VAR_TYPE_CONST: + case ORC_VAR_TYPE_PARAM: + case ORC_VAR_TYPE_TEMP: + case ORC_VAR_TYPE_ACCUMULATOR: + sprintf(name, "(*(float *)(&var%d))", var); + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + sprintf(name, "((float *)var%d)[i]", var); + break; + default: + ORC_COMPILER_ERROR(p, "bad vartype"); + sprintf(name, "ERROR"); + break; + } +} + +#if 0 +static const char * +c_get_type_name (int size) +{ + switch (size) { + case 1: + return "int8_t"; + case 2: + return "int16_t"; + case 4: + return "int32_t"; + case 8: + return "int64_t"; + default: + return "ERROR"; + } +} +#endif + + +#define UNARY(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name (dest, p, insn->dest_args[0]); \ + c_get_name (src1, p, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1); \ +} + +#define BINARY(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name (dest, p, insn->dest_args[0]); \ + c_get_name (src1, p, insn->src_args[0]); \ + c_get_name (src2, p, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1, src2); \ +} + +#define UNARYF(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name_float (dest, p, insn->dest_args[0]); \ + c_get_name_float (src1, p, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1); \ +} + +#define BINARYF(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name_float (dest, p, insn->dest_args[0]); \ + c_get_name_float (src1, p, insn->src_args[0]); \ + c_get_name_float (src2, p, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1, src2); \ +} + +#define BINARYFL(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40], src2[40]; \ +\ + c_get_name (dest, p, insn->dest_args[0]); \ + c_get_name_float (src1, p, insn->src_args[0]); \ + c_get_name_float (src2, p, insn->src_args[1]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1, src2); \ +} + +#define UNARYFL(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name (dest, p, insn->dest_args[0]); \ + c_get_name_float (src1, p, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1); \ +} + +#define UNARYLF(name,op) \ +static void \ +c_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + char dest[40], src1[40]; \ +\ + c_get_name_float (dest, p, insn->dest_args[0]); \ + c_get_name (src1, p, insn->src_args[0]); \ + \ + ORC_ASM_CODE(p," %s = " op ";\n", dest, src1); \ +} + +#define BINARY_SB(a,b) BINARY(a,b) +#define BINARY_UB(a,b) BINARY(a,b) +#define BINARY_SW(a,b) BINARY(a,b) +#define BINARY_UW(a,b) BINARY(a,b) +#define BINARY_SL(a,b) BINARY(a,b) +#define BINARY_UL(a,b) BINARY(a,b) +#define UNARY_SB(a,b) UNARY(a,b) +#define UNARY_UB(a,b) UNARY(a,b) +#define UNARY_SW(a,b) UNARY(a,b) +#define UNARY_UW(a,b) UNARY(a,b) +#define UNARY_SL(a,b) UNARY(a,b) +#define UNARY_UL(a,b) UNARY(a,b) +#define BINARY_BW(a,b) BINARY(a,b) +#define BINARY_WL(a,b) BINARY(a,b) +#define BINARY_LW(a,b) BINARY(a,b) +#define BINARY_WB(a,b) BINARY(a,b) +#define UNARY_BW(a,b) UNARY(a,b) +#define UNARY_WL(a,b) UNARY(a,b) +#define UNARY_LW(a,b) UNARY(a,b) +#define UNARY_WB(a,b) UNARY(a,b) + +#define BINARY_F(a,b) BINARYF(a,b) +#define BINARY_FL(a,b) BINARYFL(a,b) +#define UNARY_F(a,b) UNARYF(a,b) +#define UNARY_FL(a,b) UNARYFL(a,b) +#define UNARY_LF(a,b) UNARYLF(a,b) + +BINARY_SB(addb, "_add4(%s,%s)") +BINARY_SB(addssb, "0x80808080^_saddu4(0x80808080^%s,0x80808080^%s)") +BINARY_SB(addusb, "_saddu4(%s,%s)") +BINARY_SB(andb, "%s & %s") +BINARY_SB(andnb, "(~%s) & %s") +BINARY_SB(avgsb, "0x7f7f7f7f^_avgu4(0x7f7f7f7f^%s,0x7f7f7f7f^%s)") +BINARY_UB(avgub, "_avgu4(%s,%s)") +BINARY_SB(cmpeqb, "_cmpeq4(%s,%s)") +BINARY_SB(cmpgtsb, "_cmpgtu4(0x80808080^%s,0x80808080^%s)") +UNARY_SB(copyb, "%s") +BINARY_SB(maxsb, "0x80808080^_maxu4(0x80808080^%s,0x80808080^%s)") +BINARY_UB(maxub, "_maxu4(%s,%s)") +BINARY_SB(minsb, "0x80808080^_minu4(0x80808080^%s,0x80808080^%s)") +BINARY_UB(minub, "_minu4(%s,%s)") +BINARY_SB(orb, "%s | %s") +UNARY_SB(signb, "0x80808080^_maxu4(0x7f7f7f7f,_minu4(0x81818181,0x80808080^%s))") +BINARY_SB(subb, "_sub4(%s,%s)") +BINARY_SB(xorb, "%s ^ %s") + +UNARY_SW(absw, "_abs2(%s)") +BINARY_SW(addw, "_add2(%s,%s)") +BINARY_SW(addssw, "_sadd2(%s,%s)") +BINARY_SW(addusw, "0x80008000^_sadd2(0x80008000^%s,0x80008000^%s)") +BINARY_SW(andw, "%s & %s") +BINARY_SW(andnw, "(~%s) & %s") +BINARY_SW(avgsw, "_avg2(%s,%s)") +BINARY_UW(avguw, "0x7fff7fff^_avg2(0x7fff7fff^%s,0x7fff7fff^%s)") +BINARY_SW(cmpeqw, "_cmpeq2(%s,%s)") +BINARY_SW(cmpgtsw, "_cmpgt2(%s,%s)") +UNARY_SW(copyw, "%s") +BINARY_SW(maxsw, "_max2(%s,%s)") +BINARY_SW(maxuw, "_max2(0x80008000^%s,0x80008000^%s)") +BINARY_SW(minsw, "_min2(%s,%s)") +BINARY_SW(minuw, "_min2(0x80008000^%s,0x80008000^%s)") +BINARY_SW(orw, "%s | %s") +BINARY_SW(shrsw, "_shr2(%s,%s)") +BINARY_UW(shruw, "_shru2(%s,%s)") +UNARY_SW(signw, "_max2(-1,_min2(1,%s))") +BINARY_SW(subw, "_sub2(%s,%s)") +BINARY_SW(subssw, "_ssub2(%s,%s)") +BINARY_SW(subusw, "0x80008000^_ssub2(0x80008000^%s,0x80008000^%s)") +BINARY_SW(xorw, "%s ^ %s") + +UNARY_SL(absl, "_abs(%s)") +BINARY_SL(addl, "%s + %s") +BINARY_SL(addssl, "_sadd(%s,%s)") +BINARY_UL(addusl, "ORC_CLAMP_UL((int64_t)(uint32_t)%s + (int64_t)(uint32_t)%s)") +BINARY_SL(andl, "%s & %s") +BINARY_SL(andnl, "(~%s) & %s") +BINARY_SL(avgsl, "((int64_t)%s + (int64_t)%s + 1)>>1") +BINARY_UL(avgul, "((uint64_t)(uint32_t)%s + (uint64_t)(uint32_t)%s + 1)>>1") +BINARY_SL(cmpeql, "(%s == %s) ? (~0) : 0") +BINARY_SL(cmpgtsl, "(%s > %s) ? (~0) : 0") +UNARY_SL(copyl, "%s") +BINARY_SL(maxsl, "ORC_MAX(%s, %s)") +BINARY_UL(maxul, "ORC_MAX((uint32_t)%s, (uint32_t)%s)") +BINARY_SL(minsl, "ORC_MIN(%s, %s)") +BINARY_UL(minul, "ORC_MIN((uint32_t)%s, (uint32_t)%s)") +BINARY_SL(mulll, "_loll(_mpy32ll(%s,%s))") +BINARY_SL(mulhsl, "_hill(_mpy32ll(%s,%s))") +BINARY_UL(mulhul, "_hill(_mpy32u(%s,%s))") +BINARY_SL(orl, "%s | %s") +BINARY_SL(shll, "%s << %s") +BINARY_SL(shrsl, "%s >> %s") +BINARY_UL(shrul, "((uint32_t)%s) >> %s") +UNARY_SL(signl, "ORC_CLAMP((int)%s,-1,1)") +BINARY_SL(subl, "%s - %s") +BINARY_SL(subssl, "_ssub(%s,%s)") +BINARY_UL(subusl, "ORC_CLAMP_UL((int64_t)(uint32_t)%s - (int64_t)(uint32_t)%s)") +BINARY_SL(xorl, "%s ^ %s") + +UNARY_BW(convsbw, "%s") +UNARY_BW(convubw, "_unpklu4(%s)") +UNARY_WL(convswl, "(int16_t)%s") +UNARY_WL(convuwl, "(uint16_t)%s") +UNARY_WB(convwb, "_packl4(0,%s)") +UNARY_WB(convsuswb, "_spacku4(0,%s)") +UNARY_LW(convlw, "_pack2(0,%s)") +UNARY_LW(convssslw, "_spack2(0,%s)") + +BINARY_BW(mulsbw, "%s * %s") +BINARY_BW(mulubw, "(uint8_t)%s * (uint8_t)%s") +BINARY_WL(mulswl, "%s * %s") +BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s") + +BINARY_WL(mergewl, "_pack2(%s, %s)") +BINARY_BW(mergebw, "_packl4(%s, %s)") +UNARY_WB(select0wb, "_packl4(0,%s)") +UNARY_WB(select1wb, "_packh4(0,%s)") +UNARY_LW(select0lw, "_pack2(0,%s)") +UNARY_LW(select1lw, "_packh2(0,%s)") +UNARY_UW(swapw, "_swap4(%s)") + +#if 0 +BINARY_F(addf, "%s + %s") +BINARY_F(subf, "%s - %s") +BINARY_F(mulf, "%s * %s") +BINARY_F(divf, "%s / %s") +UNARY_F(sqrtf, "sqrt(%s)") +BINARY_F(maxf, "ORC_MAX(%s,%s)") +BINARY_F(minf, "ORC_MIN(%s,%s)") +BINARY_FL(cmpeqf, "(%s == %s) ? (~0) : 0") +BINARY_FL(cmpltf, "(%s < %s) ? (~0) : 0") +BINARY_FL(cmplef, "(%s <= %s) ? (~0) : 0") +UNARY_FL(convfl, "rintf(%s)") +UNARY_LF(convlf, "%s") +#else +BINARY_F(addf, "0 /* float disabled %s %s */") +BINARY_F(subf, "0 /* float disabled %s %s */") +BINARY_F(mulf, "0 /* float disabled %s %s */") +BINARY_F(divf, "0 /* float disabled %s %s */") +UNARY_F(sqrtf, "0 /* float disabled %s */") +BINARY_F(maxf, "0 /* float disabled %s %s */") +BINARY_F(minf, "0 /* float disabled %s %s */") +BINARY_FL(cmpeqf, "0 /* float disabled %s %s */") +BINARY_FL(cmpltf, "0 /* float disabled %s %s */") +BINARY_FL(cmplef, "0 /* float disabled %s %s */") +UNARY_FL(convfl, "0 /* float disabled %s */") +UNARY_LF(convlf, "0 /* float disabled %s */") +#endif + + +static void +c_rule_absb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = _subabs4(0x80808080,0x80808080^%s);\n", dest, src1); +} + +static void +c_rule_mullw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," long long x = _mpy2ll(%s,%s);\n", src1, src2); + ORC_ASM_CODE(p," %s = _pack2(_hill(x),_loll(x));\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_mulhsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," long long x = _mpy2ll(%s,%s);\n", src1, src2); + ORC_ASM_CODE(p," %s = _packh2(_hill(x),_loll(x));\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_mulhuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p," {\n"); + ORC_ASM_CODE(p," long long x = _mpy2ll(%s,%s);\n", src1, src2); + ORC_ASM_CODE(p," %s = _packh2(_hill(x),_loll(x));\n", dest); + ORC_ASM_CODE(p," }\n"); +} + +static void +c_rule_shlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p," %s = (%s<<%s) & (~(((1<<%s)-1)<<16 | ((1<<%s)-1)));\n", + dest, src1, src2, src2, src2); +} + +static void +c_rule_convssswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = _packl4(0,_max2(0xff80ff80,_min2(0x007f007f,%s)));\n", + dest, src1); +} + +static void +c_rule_swapl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p," %s = _packlh2(_swap4(%s),_swap4(%s));\n", + dest, src1, src2); +} + +static void +c_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s + %s;\n", dest, dest, src1); +} + +static void +c_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + + ORC_ASM_CODE(p," %s = %s + %s;\n", dest, dest, src1); +} + +static void +c_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + char dest[40], src1[40], src2[40]; + + c_get_name (dest, p, insn->dest_args[0]); + c_get_name (src1, p, insn->src_args[0]); + c_get_name (src2, p, insn->src_args[1]); + + ORC_ASM_CODE(p, + " %s = %s + ORC_ABS((int32_t)(uint8_t)%s - (int32_t)(uint8_t)%s);\n", + dest, dest, src1, src2); +} + +static OrcTarget c_target = { + "c64x-c", + FALSE, + ORC_GP_REG_BASE, + orc_compiler_c64x_c_get_default_flags, + orc_compiler_c64x_c_init, + orc_compiler_c64x_c_assemble, + { { 0 } }, + 0, + orc_target_c64x_c_get_asm_preamble, +}; + + +void +orc_c64x_c_init (void) +{ + OrcRuleSet *rule_set; + + orc_target_register (&c_target); + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), &c_target, 0); + +#define REG(a) orc_rule_register (rule_set, #a , c_rule_ ## a, NULL); + + REG(absb); + REG(addb); + REG(addssb); + REG(addusb); + REG(andb); + REG(andnb); + REG(avgsb); + REG(avgub); + REG(cmpeqb); + REG(cmpgtsb); + REG(copyb); + REG(maxsb); + REG(maxub); + REG(minsb); + REG(minub); + REG(orb); + REG(signb); + REG(subb); + REG(xorb); + + REG(absw); + REG(addw); + REG(addssw); + REG(addusw); + REG(andw); + REG(andnw); + REG(avgsw); + REG(avguw); + REG(cmpeqw); + REG(cmpgtsw); + REG(copyw); + REG(maxsw); + REG(maxuw); + REG(minsw); + REG(minuw); + REG(mullw); + REG(mulhsw); + REG(mulhuw); + REG(orw); + REG(shlw); + REG(shrsw); + REG(shruw); + REG(signw); + REG(subssw); + REG(subusw); + REG(subw); + REG(xorw); + + REG(absl); + REG(addl); + REG(addssl); + REG(addusl); + REG(andl); + REG(andnl); + REG(avgsl); + REG(avgul); + REG(cmpeql); + REG(cmpgtsl); + REG(copyl); + REG(maxsl); + REG(maxul); + REG(minsl); + REG(minul); + REG(mulll); + REG(mulhsl); + REG(mulhul); + REG(orl); + REG(shll); + REG(shrsl); + REG(shrul); + REG(signl); + REG(subl); + REG(subssl); + REG(subusl); + REG(xorl); + + REG(convsbw); + REG(convubw); + REG(convswl); + REG(convuwl); + REG(convwb); + REG(convssswb); + REG(convsuswb); + REG(convlw); + REG(convssslw); + + REG(mulsbw); + REG(mulubw); + REG(mulswl); + REG(muluwl); + + REG(mergewl); + REG(mergebw); + REG(select0wb); + REG(select1wb); + REG(select0lw); + REG(select1lw); + REG(swapw); + REG(swapl); + + REG(addf); + REG(subf); + REG(mulf); + REG(divf); + REG(sqrtf); + REG(maxf); + REG(minf); + REG(cmpeqf); + REG(cmpltf); + REG(cmplef); + REG(convfl); + REG(convlf); + + REG(accw); + REG(accl); + REG(accsadubl); + +} + diff --git a/orc/orcprogram-mmx.c b/orc/orcprogram-mmx.c new file mode 100644 index 0000000..f67926f --- /dev/null +++ b/orc/orcprogram-mmx.c @@ -0,0 +1,1097 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#define MMX 1 +#define SIZE 65536 + +#define ORC_MMX_ALIGNED_DEST_CUTOFF 64 + +void orc_mmx_emit_loop (OrcCompiler *compiler, int offset, int update); + +void orc_compiler_mmx_init (OrcCompiler *compiler); +unsigned int orc_compiler_mmx_get_default_flags (void); +void orc_compiler_mmx_assemble (OrcCompiler *compiler); +void orc_compiler_mmx_register_rules (OrcTarget *target); +void orc_mmx_emit_invariants (OrcCompiler *compiler); + + +void orc_compiler_rewrite_vars (OrcCompiler *compiler); +void orc_compiler_dump (OrcCompiler *compiler); +void mmx_load_constant (OrcCompiler *compiler, int reg, int size, int value); +void mmx_load_constant_long (OrcCompiler *compiler, int reg, + OrcConstant *constant); +static const char * mmx_get_flag_name (int shift); + +static OrcTarget mmx_target = { + "mmx", +#if defined(HAVE_I386) || defined(HAVE_AMD64) + TRUE, +#else + FALSE, +#endif + ORC_VEC_REG_BASE, + orc_compiler_mmx_get_default_flags, + orc_compiler_mmx_init, + orc_compiler_mmx_assemble, + { { 0 } }, + 0, + NULL, + mmx_load_constant, + mmx_get_flag_name, + NULL, + mmx_load_constant_long +}; + + +extern int orc_x86_mmx_flags; +extern int orc_x86_mmx_flags; + +void +orc_mmx_init (void) +{ +#if defined(HAVE_AMD64) || defined(HAVE_I386) + /* initializes cache information */ + orc_mmx_get_cpu_flags (); +#endif + +#if defined(HAVE_I386) +#ifndef MMX + if (!(orc_x86_mmx_flags & ORC_TARGET_MMX_MMXEXT)) { + mmx_target.executable = FALSE; + } +#else + if (!(orc_x86_mmx_flags & ORC_TARGET_MMX_MMX)) { + mmx_target.executable = FALSE; + } +#endif +#endif + + orc_target_register (&mmx_target); + + orc_compiler_mmx_register_rules (&mmx_target); +} + +unsigned int +orc_compiler_mmx_get_default_flags (void) +{ + unsigned int flags = 0; + +#ifdef HAVE_AMD64 + flags |= ORC_TARGET_MMX_64BIT; +#endif + if (_orc_compiler_flag_debug) { + flags |= ORC_TARGET_MMX_FRAME_POINTER; + } + +#if defined(HAVE_AMD64) || defined(HAVE_I386) +#ifndef MMX + flags |= orc_x86_mmx_flags; +#else + flags |= orc_x86_mmx_flags; +#endif +#else +#ifndef MMX + flags |= ORC_TARGET_MMX_MMXEXT; + flags |= ORC_TARGET_MMX_SSE3; + flags |= ORC_TARGET_MMX_SSSE3; +#else + flags |= ORC_TARGET_MMX_MMX; + flags |= ORC_TARGET_MMX_3DNOW; +#endif +#endif + + return flags; +} + +static const char * +mmx_get_flag_name (int shift) +{ + static const char *flags[] = { +#ifndef MMX + "sse2", "sse3", "ssse3", "sse41", "sse42", "sse4a", "sse5", + "frame_pointer", "short_jumps", "64bit" +#else + "mmx", "mmxext", "3dnow", "3dnowext", "ssse3", "sse41", "", + "frame_pointer", "short_jumps", "64bit" +#endif + }; + + if (shift >= 0 && shift < sizeof(flags)/sizeof(flags[0])) { + return flags[shift]; + } + + return NULL; +} + +void +orc_compiler_mmx_init (OrcCompiler *compiler) +{ + int i; + + if (compiler->target_flags & ORC_TARGET_MMX_64BIT) { + compiler->is_64bit = TRUE; + } + if (compiler->target_flags & ORC_TARGET_MMX_FRAME_POINTER) { + compiler->use_frame_pointer = TRUE; + } + if (!(compiler->target_flags & ORC_TARGET_MMX_SHORT_JUMPS)) { + compiler->long_jumps = TRUE; + } + + + if (compiler->is_64bit) { + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->valid_regs[X86_ESP] = 0; +#ifndef MMX + for(i=X86_MM0;ivalid_regs[i] = 1; + } +#else + for(i=X86_MM0;ivalid_regs[i] = 1; + } +#endif + compiler->save_regs[X86_EBX] = 1; + compiler->save_regs[X86_EBP] = 1; + compiler->save_regs[X86_R12] = 1; + compiler->save_regs[X86_R13] = 1; + compiler->save_regs[X86_R14] = 1; + compiler->save_regs[X86_R15] = 1; +#ifdef HAVE_OS_WIN32 + compiler->save_regs[X86_EDI] = 1; + compiler->save_regs[X86_ESI] = 1; + for(i=X86_MM0+6;isave_regs[i] = 1; + } +#endif + } else { + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->valid_regs[X86_ESP] = 0; + if (compiler->use_frame_pointer) { + compiler->valid_regs[X86_EBP] = 0; + } + for(i=X86_MM0;ivalid_regs[i] = 1; + } + compiler->save_regs[X86_EBX] = 1; + compiler->save_regs[X86_EDI] = 1; + compiler->save_regs[X86_EBP] = 1; + } + for(i=0;i<128;i++){ + compiler->alloc_regs[i] = 0; + compiler->used_regs[i] = 0; + } + + if (compiler->is_64bit) { +#ifdef HAVE_OS_WIN32 + compiler->exec_reg = X86_ECX; + compiler->gp_tmpreg = X86_EDX; +#else + compiler->exec_reg = X86_EDI; + compiler->gp_tmpreg = X86_ECX; +#endif + } else { + compiler->gp_tmpreg = X86_ECX; + if (compiler->use_frame_pointer) { + compiler->exec_reg = X86_EBX; + } else { + compiler->exec_reg = X86_EBP; + } + } + compiler->valid_regs[compiler->gp_tmpreg] = 0; + compiler->valid_regs[compiler->exec_reg] = 0; + + switch (compiler->max_var_size) { + case 1: + compiler->loop_shift = 4; + break; + case 2: + compiler->loop_shift = 3; + break; + case 4: + compiler->loop_shift = 2; + break; + case 8: + compiler->loop_shift = 1; + break; + default: + ORC_ERROR("unhandled max var size %d", compiler->max_var_size); + break; + } +#ifdef MMX + compiler->loop_shift--; +#endif + + /* This limit is arbitrary, but some large functions run slightly + slower when unrolled (ginger Core2 6,15,6), and only some small + functions run faster when unrolled. Most are the same speed. */ + if (compiler->n_insns <= 10) { + compiler->unroll_shift = 1; + } + if (!compiler->long_jumps) { + compiler->unroll_shift = 0; + } + if (compiler->loop_shift == 0) { + /* FIXME something is broken with loop_shift=0, unroll_shift=1 */ + compiler->unroll_shift = 0; + } + compiler->alloc_loop_counter = TRUE; + compiler->allow_gp_on_stack = TRUE; + + { + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + if (strcmp (opcode->name, "ldreslinb") == 0 || + strcmp (opcode->name, "ldreslinl") == 0 || + strcmp (opcode->name, "ldresnearb") == 0 || + strcmp (opcode->name, "ldresnearl") == 0) { + compiler->vars[insn->src_args[0]].need_offset_reg = TRUE; + } + } + } +} + +void +mmx_save_accumulators (OrcCompiler *compiler) +{ + int i; + int src; + int tmp; + + for(i=0;ivars + i; + + if (compiler->vars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_ACCUMULATOR: + src = compiler->vars[i].alloc; + tmp = orc_compiler_get_temp_reg (compiler); + +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(3,2,3,2), src, tmp); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(3,2,3,2), src, tmp); +#endif + + if (compiler->vars[i].size == 2) { + orc_mmx_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } else { + orc_mmx_emit_660f (compiler, "paddd", 0xfe, tmp, src); + } + +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(1,1,1,1), src, tmp); + + if (compiler->vars[i].size == 2) { + orc_mmx_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } else { + orc_mmx_emit_660f (compiler, "paddd", 0xfe, tmp, src); + } +#endif + + if (compiler->vars[i].size == 2) { +#ifndef MMX + orc_mmx_emit_pshuflw (compiler, ORC_MMX_SHUF(1,1,1,1), src, tmp); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,1,1,1), src, tmp); +#endif + + orc_mmx_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } + + if (compiler->vars[i].size == 2) { + orc_x86_emit_mov_mmx_reg (compiler, src, compiler->gp_tmpreg); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, accumulators[i-ORC_VAR_A1]), + compiler->exec_reg); + } else { + orc_x86_emit_mov_mmx_memoffset (compiler, 4, src, + (int)ORC_STRUCT_OFFSET(OrcExecutor, accumulators[i-ORC_VAR_A1]), + compiler->exec_reg, + var->is_aligned, var->is_uncached); + } + + break; + default: + break; + } + } +} + +void +mmx_load_constant (OrcCompiler *compiler, int reg, int size, int value) +{ + orc_mmx_load_constant (compiler, reg, size, value); +} + +void +orc_mmx_load_constant (OrcCompiler *compiler, int reg, int size, orc_uint64 value) +{ + int i; + + if (size == 8) { + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + /* FIXME how ugly and slow! */ + orc_x86_emit_mov_imm_reg (compiler, 4, value>>0, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 0, compiler->exec_reg); + + orc_x86_emit_mov_imm_reg (compiler, 4, value>>32, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 4, compiler->exec_reg); + + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset, compiler->exec_reg, + reg, FALSE); +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); +#endif + return; + } + + if (size == 1) { + value &= 0xff; + value |= (value << 8); + value |= (value << 16); + } + if (size == 2) { + value &= 0xffff; + value |= (value << 16); + } + + ORC_ASM_CODE(compiler, "# loading constant %d 0x%08x\n", (int)value, (int)value); + if (value == 0) { + orc_mmx_emit_pxor(compiler, reg, reg); + return; + } + if (value == 0xffffffff) { + orc_mmx_emit_pcmpeqb (compiler, reg, reg); + return; + } + if (compiler->target_flags & ORC_TARGET_MMX_SSSE3) { + if (value == 0x01010101) { + orc_mmx_emit_pcmpeqb (compiler, reg, reg); + orc_mmx_emit_pabsb (compiler, reg, reg); + return; + } + } + + for(i=1;i<32;i++){ + orc_uint32 v; + v = (0xffffffff<>i); + if (value == v) { + orc_mmx_emit_pcmpeqb (compiler, reg, reg); + orc_mmx_emit_psrld (compiler, i, reg); + return; + } + } + for(i=1;i<16;i++){ + orc_uint32 v; + v = (0xffff & (0xffff<>i)) | (0xffff0000 & (0xffff0000>>i)); + if (value == v) { + orc_mmx_emit_pcmpeqb (compiler, reg, reg); + orc_mmx_emit_psrlw (compiler, i, reg); + return; + } + } + + orc_x86_emit_mov_imm_reg (compiler, 4, value, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_mmx (compiler, compiler->gp_tmpreg, reg); +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(0,0,0,0), reg, reg); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); +#endif +} + +void +mmx_load_constant_long (OrcCompiler *compiler, int reg, + OrcConstant *constant) +{ + int i; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + /* FIXME this is slower than it could be */ + + ORC_ASM_CODE(compiler, "# loading constant %08x %08x %08x %08x\n", + constant->full_value[0], constant->full_value[1], + constant->full_value[2], constant->full_value[3]); + + for(i=0;i<4;i++){ + orc_x86_emit_mov_imm_reg (compiler, 4, constant->full_value[i], + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 4*i, compiler->exec_reg); + } + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset, compiler->exec_reg, + reg, FALSE); + +} + +void +mmx_load_constants_outer (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + break; + case ORC_VAR_TYPE_ACCUMULATOR: + orc_mmx_emit_pxor (compiler, + compiler->vars[i].alloc, compiler->vars[i].alloc); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } + + orc_mmx_emit_invariants (compiler); + + /* FIXME move to a better place */ + for(i=0;in_constants;i++){ + compiler->constants[i].alloc_reg = + orc_compiler_get_constant_reg (compiler); + } + + for(i=0;in_constants;i++){ + if (compiler->constants[i].alloc_reg) { + if (compiler->constants[i].is_long) { + mmx_load_constant_long (compiler, compiler->constants[i].alloc_reg, + compiler->constants + i); + } else { + mmx_load_constant (compiler, compiler->constants[i].alloc_reg, + 4, compiler->constants[i].value); + } + } + } + + { + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + if (strcmp (opcode->name, "ldreslinb") == 0 || + strcmp (opcode->name, "ldreslinl") == 0 || + strcmp (opcode->name, "ldresnearb") == 0 || + strcmp (opcode->name, "ldresnearl") == 0) { + if (compiler->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[1]]), + compiler->exec_reg, + compiler->vars[insn->src_args[0]].ptr_offset); + } else { + orc_x86_emit_mov_imm_reg (compiler, 4, + compiler->vars[insn->src_args[1]].value.i, + compiler->vars[insn->src_args[0]].ptr_offset); + } + } + } + } +} + +void +mmx_load_constants_inner (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + if (compiler->vars[i].ptr_register) { + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), compiler->exec_reg, + compiler->vars[i].ptr_register); + } + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + +void +mmx_add_strides (OrcCompiler *compiler) +{ + int i; + + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[i]), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_add_reg_memoffset (compiler, compiler->is_64bit ? 8 : 4, + compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), compiler->exec_reg); + + if (compiler->vars[i].ptr_register == 0) { + ORC_COMPILER_ERROR(compiler, "unimplemented: stride on mem pointer"); + } + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + +static int +get_align_var (OrcCompiler *compiler) +{ + int i; + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + if ((compiler->vars[i].size << compiler->loop_shift) >= 16) { + return i; + } + } + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + if ((compiler->vars[i].size << compiler->loop_shift) >= 8) { + return i; + } + } + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + return i; + } + + ORC_COMPILER_ERROR(compiler, "could not find alignment variable"); + + return -1; +} + +static int +get_shift (int size) +{ + switch (size) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + ORC_ERROR("bad size %d", size); + } + return -1; +} + + +static void +orc_emit_split_3_regions (OrcCompiler *compiler) +{ + int align_var; + int align_shift; + int var_size_shift; + + align_var = get_align_var (compiler); + var_size_shift = get_shift (compiler->vars[align_var].size); + align_shift = var_size_shift + compiler->loop_shift; + + /* determine how many iterations until align array is aligned (n1) */ + orc_x86_emit_mov_imm_reg (compiler, 4, 16, X86_EAX); + orc_x86_emit_sub_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[align_var]), + compiler->exec_reg, X86_EAX); + orc_x86_emit_and_imm_reg (compiler, 4, (1<exec_reg); + + orc_x86_emit_jle (compiler, 6); + + /* If so, we have a standard 3-region split. */ + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + + /* Calculate n2 */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_sub_reg_reg (compiler, 4, X86_EAX, compiler->gp_tmpreg); + + orc_x86_emit_mov_reg_reg (compiler, 4, compiler->gp_tmpreg, X86_EAX); + + orc_x86_emit_sar_imm_reg (compiler, 4, + compiler->loop_shift + compiler->unroll_shift, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + + /* Calculate n3 */ + orc_x86_emit_and_imm_reg (compiler, 4, + (1<<(compiler->loop_shift + compiler->unroll_shift))-1, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + + orc_x86_emit_jmp (compiler, 7); + + /* else, iterations are all unaligned: n1=n, n2=0, n3=0 */ + orc_x86_emit_label (compiler, 6); + + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + orc_x86_emit_mov_imm_reg (compiler, 4, 0, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + + orc_x86_emit_label (compiler, 7); +} + +static void +orc_emit_split_2_regions (OrcCompiler *compiler) +{ + int align_var; + int align_shift; + int var_size_shift; + + align_var = get_align_var (compiler); + var_size_shift = get_shift (compiler->vars[align_var].size); + align_shift = var_size_shift + compiler->loop_shift; + + /* Calculate n2 */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_reg (compiler, 4, compiler->gp_tmpreg, X86_EAX); + orc_x86_emit_sar_imm_reg (compiler, 4, + compiler->loop_shift + compiler->unroll_shift, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + + /* Calculate n3 */ + orc_x86_emit_and_imm_reg (compiler, 4, + (1<<(compiler->loop_shift + compiler->unroll_shift))-1, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); +} + +#ifndef MMX +static int +orc_program_has_float (OrcCompiler *compiler) +{ + int j; + for(j=0;jn_insns;j++){ + OrcInstruction *insn = compiler->insns + j; + OrcStaticOpcode *opcode = insn->opcode; + if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE; + } + return FALSE; +} +#endif + +#define LABEL_REGION1_SKIP 1 +#define LABEL_INNER_LOOP_START 2 +#define LABEL_REGION2_SKIP 3 +#define LABEL_OUTER_LOOP 4 +#define LABEL_OUTER_LOOP_SKIP 5 +#define LABEL_STEP_DOWN(x) (8+(x)) +#define LABEL_STEP_UP(x) (13+(x)) + + +void +orc_compiler_mmx_assemble (OrcCompiler *compiler) +{ +#ifndef MMX + int set_mxcsr = FALSE; +#endif + int align_var; + + if (0 && orc_x86_assemble_copy_check (compiler)) { + /* The rep movs implementation isn't faster most of the time */ + orc_x86_assemble_copy (compiler); + return; + } + + align_var = get_align_var (compiler); + + compiler->vars[align_var].is_aligned = FALSE; + + { + orc_mmx_emit_loop (compiler, 0, 0); + + compiler->codeptr = compiler->code; + free (compiler->asm_code); + compiler->asm_code = NULL; + compiler->asm_code_len = 0; + memset (compiler->labels, 0, sizeof (compiler->labels)); + compiler->n_fixups = 0; + } + + if (compiler->error) return; + + orc_x86_emit_prologue (compiler); + +#ifndef MMX + if (orc_program_has_float (compiler)) { + set_mxcsr = TRUE; + orc_mmx_set_mxcsr (compiler); + } +#endif + + mmx_load_constants_outer (compiler); + + if (compiler->program->is_2d) { + if (compiler->program->constant_m > 0) { + orc_x86_emit_mov_imm_reg (compiler, 4, compiler->program->constant_m, + X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2]), + compiler->exec_reg); + } else { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A1]), + compiler->exec_reg, X86_EAX); + orc_x86_emit_test_reg_reg (compiler, 4, X86_EAX, X86_EAX); + orc_x86_emit_jle (compiler, LABEL_OUTER_LOOP_SKIP); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2]), + compiler->exec_reg); + } + + orc_x86_emit_label (compiler, LABEL_OUTER_LOOP); + } + + if (compiler->program->constant_n > 0 && + compiler->program->constant_n <= ORC_MMX_ALIGNED_DEST_CUTOFF) { + /* don't need to load n */ + } else if (compiler->loop_shift > 0) { + if (!compiler->has_iterator_opcode) { + /* split n into three regions, with center region being aligned */ + orc_emit_split_3_regions (compiler); + } else { + orc_emit_split_2_regions (compiler); + } + } else { + /* loop shift is 0, no need to split */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + } + + mmx_load_constants_inner (compiler); + + if (compiler->program->constant_n > 0 && + compiler->program->constant_n <= ORC_MMX_ALIGNED_DEST_CUTOFF) { + int n_left = compiler->program->constant_n; + int save_loop_shift; + int loop_shift; + + compiler->offset = 0; + + save_loop_shift = compiler->loop_shift; + while (n_left >= (1<loop_shift)) { + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + orc_mmx_emit_loop (compiler, compiler->offset, 0); + + n_left -= 1<loop_shift; + compiler->offset += 1<loop_shift; + } + for(loop_shift = compiler->loop_shift-1; loop_shift>=0; loop_shift--) { + if (n_left >= (1<loop_shift = loop_shift; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", loop_shift); + orc_mmx_emit_loop (compiler, compiler->offset, 0); + n_left -= 1<offset += 1<loop_shift = save_loop_shift; + + } else { + int ui, ui_max; + int emit_region1 = TRUE; + int emit_region3 = TRUE; + + if (compiler->has_iterator_opcode) { + emit_region1 = FALSE; + } + if (compiler->loop_shift == 0) { + emit_region1 = FALSE; + emit_region3 = FALSE; + } + + if (emit_region1) { + int save_loop_shift; + int l; + + save_loop_shift = compiler->loop_shift; + compiler->vars[align_var].is_aligned = FALSE; + + for (l=0;lloop_shift = l; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + + orc_x86_emit_test_imm_memoffset (compiler, 4, 1<loop_shift, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_STEP_UP(compiler->loop_shift)); + orc_mmx_emit_loop (compiler, 0, 1<loop_shift); + orc_x86_emit_label (compiler, LABEL_STEP_UP(compiler->loop_shift)); + } + + compiler->loop_shift = save_loop_shift; + compiler->vars[align_var].is_aligned = TRUE; + } + + orc_x86_emit_label (compiler, LABEL_REGION1_SKIP); + + orc_x86_emit_cmp_imm_memoffset (compiler, 4, 0, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_REGION2_SKIP); + + if (compiler->loop_counter != ORC_REG_INVALID) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, counter2), compiler->exec_reg, + compiler->loop_counter); + } + + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + orc_x86_emit_align (compiler); + orc_x86_emit_label (compiler, LABEL_INNER_LOOP_START); + ui_max = 1<unroll_shift; + for(ui=0;uioffset = ui<loop_shift; + orc_mmx_emit_loop (compiler, compiler->offset, + (ui==ui_max-1) << (compiler->loop_shift + compiler->unroll_shift)); + } + compiler->offset = 0; + if (compiler->loop_counter != ORC_REG_INVALID) { + orc_x86_emit_add_imm_reg (compiler, 4, -1, compiler->loop_counter, TRUE); + } else { + orc_x86_emit_dec_memoffset (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), + compiler->exec_reg); + } + orc_x86_emit_jne (compiler, LABEL_INNER_LOOP_START); + orc_x86_emit_label (compiler, LABEL_REGION2_SKIP); + + if (emit_region3) { + int save_loop_shift; + int l; + + save_loop_shift = compiler->loop_shift + compiler->unroll_shift; + compiler->vars[align_var].is_aligned = FALSE; + + for(l=save_loop_shift - 1; l >= 0; l--) { + compiler->loop_shift = l; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + + orc_x86_emit_test_imm_memoffset (compiler, 4, 1<loop_shift, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_STEP_DOWN(compiler->loop_shift)); + orc_mmx_emit_loop (compiler, 0, 1<loop_shift); + orc_x86_emit_label (compiler, LABEL_STEP_DOWN(compiler->loop_shift)); + } + + compiler->loop_shift = save_loop_shift; + } + } + + if (compiler->program->is_2d && compiler->program->constant_m != 1) { + mmx_add_strides (compiler); + + orc_x86_emit_add_imm_memoffset (compiler, 4, -1, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2]), + compiler->exec_reg); + orc_x86_emit_jne (compiler, LABEL_OUTER_LOOP); + orc_x86_emit_label (compiler, LABEL_OUTER_LOOP_SKIP); + } + + mmx_save_accumulators (compiler); + +#ifndef MMX + if (set_mxcsr) { + orc_mmx_restore_mxcsr (compiler); + } +#else + orc_x86_emit_emms (compiler); +#endif + orc_x86_emit_epilogue (compiler); + + orc_x86_do_fixups (compiler); +} + +void +orc_mmx_emit_loop (OrcCompiler *compiler, int offset, int update) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + compiler->insn_index = j; + + if (insn->flags & ORC_INSN_FLAG_INVARIANT) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", j, insn->opcode->name); + + compiler->min_temp_reg = ORC_VEC_REG_BASE; + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { + if (!(insn->opcode->flags & (ORC_STATIC_OPCODE_ACCUMULATOR|ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_STORE)) && + compiler->vars[insn->dest_args[0]].alloc != + compiler->vars[insn->src_args[0]].alloc) { + orc_x86_emit_mov_mmx_reg_reg (compiler, + compiler->vars[insn->src_args[0]].alloc, + compiler->vars[insn->dest_args[0]].alloc); + } + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } + + if (update) { + for(k=0;kvars + k; + + if (var->name == NULL) continue; + if (var->vartype == ORC_VAR_TYPE_SRC || + var->vartype == ORC_VAR_TYPE_DEST) { + int offset; + if (var->update_type == 0) { + offset = 0; + } else if (var->update_type == 1) { + offset = (var->size * update) >> 1; + } else { + offset = var->size * update; + } + + if (offset != 0) { + if (compiler->vars[k].ptr_register) { + orc_x86_emit_add_imm_reg (compiler, compiler->is_64bit ? 8 : 4, + offset, + compiler->vars[k].ptr_register, FALSE); + } else { + orc_x86_emit_add_imm_memoffset (compiler, compiler->is_64bit ? 8 : 4, + offset, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k]), + compiler->exec_reg); + } + } + } + } + } +} + +void +orc_mmx_emit_invariants (OrcCompiler *compiler) +{ + int j; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + if (!(insn->flags & ORC_INSN_FLAG_INVARIANT)) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", j, insn->opcode->name); + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } +} + diff --git a/orc/orcprogram-neon.c b/orc/orcprogram-neon.c new file mode 100644 index 0000000..6da9083 --- /dev/null +++ b/orc/orcprogram-neon.c @@ -0,0 +1,939 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#define SIZE 65536 + +void orc_neon_emit_loop (OrcCompiler *compiler, int unroll_index); + +void orc_compiler_neon_register_rules (OrcTarget *target); +unsigned int orc_compiler_neon_get_default_flags (void); + +void orc_compiler_neon_init (OrcCompiler *compiler); +void orc_compiler_neon_assemble (OrcCompiler *compiler); + +void orc_compiler_rewrite_vars (OrcCompiler *compiler); +void orc_compiler_dump (OrcCompiler *compiler); +void orc_neon_save_accumulators (OrcCompiler *compiler); +void neon_add_strides (OrcCompiler *compiler); + + +void +orc_neon_emit_prologue (OrcCompiler *compiler) +{ + unsigned int regs = 0; + int i; + + orc_compiler_append_code(compiler,".global %s\n", compiler->program->name); + orc_compiler_append_code(compiler,"%s:\n", compiler->program->name); + + for(i=0;i<16;i++){ + if (compiler->used_regs[ORC_GP_REG_BASE + i] && + compiler->save_regs[ORC_GP_REG_BASE + i]) { + regs |= (1<used_regs[ORC_GP_REG_BASE + i] && + compiler->save_regs[ORC_GP_REG_BASE + i]) { + regs |= (1<valid_regs[i] = 1; + } + for(i=ORC_VEC_REG_BASE+0;ivalid_regs[i] = 1; + } + //compiler->valid_regs[ORC_ARM_SB] = 0; + compiler->valid_regs[ORC_ARM_IP] = 0; + compiler->valid_regs[ORC_ARM_SP] = 0; + compiler->valid_regs[ORC_ARM_LR] = 0; + compiler->valid_regs[ORC_ARM_PC] = 0; + for(i=4;i<12;i++) { + compiler->save_regs[ORC_GP_REG_BASE+i] = 1; + } + + for(i=0;ialloc_regs[i] = 0; + compiler->used_regs[i] = 0; + } + + compiler->exec_reg = ORC_ARM_A1; + compiler->valid_regs[compiler->exec_reg] = 0; + compiler->gp_tmpreg = ORC_ARM_A2; + compiler->valid_regs[compiler->gp_tmpreg] = 0; + compiler->tmpreg = ORC_VEC_REG_BASE + 0; + compiler->valid_regs[compiler->tmpreg] = 0; + + loop_shift = 0; + switch (compiler->max_var_size) { + case 1: + compiler->loop_shift = 4; + break; + case 2: + compiler->loop_shift = 3; + break; + case 4: + compiler->loop_shift = 2; + break; + case 8: + compiler->loop_shift = 1; + break; + default: + ORC_ERROR("unhandled max var size %d", compiler->max_var_size); + break; + } + + switch (orc_program_get_max_array_size (compiler->program)) { + case 0: + case 1: + loop_shift = 4; + break; + case 2: + loop_shift = 3; + break; + case 4: + loop_shift = 2; + break; + case 8: + loop_shift = 1; + break; + default: + ORC_ERROR("unhandled max array size %d", + orc_program_get_max_array_size (compiler->program)); + break; + } + if (loop_shift < compiler->loop_shift) { + compiler->loop_shift = loop_shift; + } + + switch (orc_program_get_max_accumulator_size (compiler->program)) { + case 0: + loop_shift = 4; + break; + case 1: + loop_shift = 3; + break; + case 2: + loop_shift = 2; + break; + case 4: + loop_shift = 1; + break; + case 8: + loop_shift = 0; + break; + default: + ORC_ERROR("unhandled max accumulator size %d", + orc_program_get_max_accumulator_size (compiler->program)); + break; + } + if (loop_shift < compiler->loop_shift) { + compiler->loop_shift = loop_shift; + } + + /* Unrolling isn't helpful until neon gets an instruction + * scheduler. This decreases the raw amount of code generated + * while still keeping the feature active. */ + if (compiler->n_insns < 5) { + compiler->unroll_shift = 0; + } + + if (0) { + compiler->need_mask_regs = TRUE; + } +} + +void +orc_neon_load_constants_outer (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + break; + case ORC_VAR_TYPE_ACCUMULATOR: + orc_neon_emit_loadil (compiler, compiler->vars[i].alloc, 0); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_PROGRAM_ERROR(compiler,"bad vartype"); + break; + } + } + + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + OrcRule *rule; + + if (!(insn->flags & ORC_INSN_FLAG_INVARIANT)) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", i, insn->opcode->name); + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } +} + +void +orc_neon_load_constants_inner (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_arm_emit_load_reg (compiler, + compiler->vars[i].ptr_register, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_PROGRAM_ERROR(compiler,"bad vartype"); + break; + } + } +} + +#if 0 +void +orc_neon_emit_load_src (OrcCompiler *compiler, OrcVariable *var, int unroll_index) +{ + int ptr_reg; + int update; + + if (var->ptr_register == 0) { + int i; + i = var - compiler->vars; + //arm_emit_mov_memoffset_reg (compiler, arm_ptr_size, + // (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + // p->exec_reg, X86_ECX); + ptr_reg = ORC_ARM_PC; + } else { + ptr_reg = var->ptr_register; + } + if (var->vartype == ORC_VAR_TYPE_DEST) { + update = FALSE; + } else { + update = TRUE; + } + switch (var->size) { + case 1: + orc_neon_loadb (compiler, var, update); + break; + case 2: + orc_neon_loadw (compiler, var, update); + break; + case 4: + orc_neon_loadl (compiler, var, update); + break; + case 8: + orc_neon_loadq (compiler, var->alloc, ptr_reg, update, var->is_aligned); + break; + default: + ORC_ERROR("bad size"); + } + + if (unroll_index == 0) { + switch (compiler->size_region) { + case 0: + case 1: + orc_neon_preload (compiler, var, FALSE, 208); + break; + case 2: + case 3: + orc_neon_preload (compiler, var, FALSE, 208); + break; + } + } +} + +void +orc_neon_emit_store_dest (OrcCompiler *compiler, OrcVariable *var) +{ + int ptr_reg; + if (var->ptr_register == 0) { + //arm_emit_mov_memoffset_reg (compiler, arm_ptr_size, + // var->ptr_offset, p->exec_reg, X86_ECX); + ptr_reg = ORC_ARM_PC; + } else { + ptr_reg = var->ptr_register; + } + switch (var->size) { + case 1: + orc_neon_storeb (compiler, ptr_reg, TRUE, var->alloc, var->is_aligned); + break; + case 2: + orc_neon_storew (compiler, ptr_reg, TRUE, var->alloc, var->is_aligned); + break; + case 4: + orc_neon_storel (compiler, ptr_reg, TRUE, var->alloc, var->is_aligned); + break; + case 8: + orc_neon_storeq (compiler, ptr_reg, TRUE, var->alloc, var->is_aligned); + break; + default: + ORC_ERROR("bad size"); + } + + switch (compiler->size_region) { + case 0: + break; + case 1: + /* assume hot cache, see below */ + break; + case 2: + /* This is only useful for cold cache and for memset-like operations, + which isn't the usual case, thus it's disabled. */ +#if 0 + orc_neon_preload (compiler, var, FALSE, 208); +#endif + break; + case 3: + /* none */ + break; + } +} +#endif + +static int +get_shift (int size) +{ + switch (size) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + ORC_ERROR("bad size %d", size); + } + return -1; +} + +static int +get_align_var (OrcCompiler *compiler) +{ + if (compiler->vars[ORC_VAR_D1].size) return ORC_VAR_D1; + if (compiler->vars[ORC_VAR_S1].size) return ORC_VAR_S1; + + ORC_PROGRAM_ERROR(compiler, "could not find alignment variable"); + + return -1; +} + +enum { + LABEL_ONE_REGION = 1, + LABEL_ONE_REGION_AFTER, + LABEL_REGION0_LOOP, + LABEL_REGION0_SKIP, + LABEL_REGION1_LOOP, + LABEL_REGION1_SKIP, + LABEL_REGION2_LOOP_SMALL, + LABEL_REGION2_LOOP_MEDIUM, + LABEL_REGION2_LOOP_LARGE, + LABEL_REGION2_SMALL, + LABEL_REGION2_MEDIUM, + LABEL_REGION2_SKIP, + LABEL_REGION3_LOOP, + LABEL_REGION3_SKIP, + LABEL_OUTER_LOOP, + LABEL_OUTER_LOOP_SKIP, + LABEL_L1L2_AFTER, +}; + +void +orc_compiler_neon_assemble (OrcCompiler *compiler) +{ + int align_var; + int align_shift; + int var_size_shift; + int i; + + align_var = get_align_var (compiler); + if (compiler->error) return; + + var_size_shift = get_shift (compiler->vars[align_var].size); + align_shift = 4; + + compiler->vars[align_var].is_aligned = FALSE; + + orc_neon_emit_prologue (compiler); + + orc_neon_load_constants_outer (compiler); + + if (compiler->program->is_2d) { + if (compiler->program->constant_m > 0) { + orc_arm_emit_load_imm (compiler, ORC_ARM_A3, compiler->program->constant_m); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + } else { + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A1])); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + } + + orc_arm_emit_label (compiler, LABEL_OUTER_LOOP); + } + +#define ORC_NEON_ALIGNED_DEST_CUTOFF 64 + + if (compiler->loop_shift > 0 && compiler->n_insns < 5) { + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n)); + orc_arm_emit_cmp_imm (compiler, ORC_ARM_A3, ORC_NEON_ALIGNED_DEST_CUTOFF); + orc_arm_emit_branch (compiler, ORC_ARM_COND_GT, LABEL_REGION0_SKIP); + + orc_arm_emit_asr_imm (compiler, ORC_ARM_A2, ORC_ARM_A3, + compiler->loop_shift); + orc_arm_emit_store_reg (compiler, ORC_ARM_A2, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2)); + + orc_arm_emit_and_imm (compiler, ORC_ARM_A3, ORC_ARM_A3, + (1<loop_shift)-1); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3)); + + orc_neon_load_constants_inner (compiler); + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2)); + orc_arm_emit_cmp_imm (compiler, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION2_SKIP); + + compiler->size_region = 0; + orc_arm_emit_label (compiler, LABEL_REGION0_LOOP); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + orc_neon_emit_loop (compiler, -1); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION0_LOOP); + + + orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, LABEL_REGION2_SKIP); + + orc_arm_emit_label (compiler, LABEL_REGION0_SKIP); + } + + if (compiler->loop_shift > 0) { + orc_arm_emit_load_imm (compiler, ORC_ARM_IP, 1<exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,arrays[align_var])); + orc_arm_emit_sub (compiler, ORC_ARM_IP, ORC_ARM_IP, ORC_ARM_A2); + orc_arm_emit_and_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, + (1< 0) { + orc_arm_emit_asr_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, var_size_shift); + } + + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n)); + orc_arm_emit_cmp (compiler, ORC_ARM_A3, ORC_ARM_IP); + orc_arm_emit_branch (compiler, ORC_ARM_COND_LE, LABEL_ONE_REGION); + + orc_arm_emit_store_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1)); + orc_arm_emit_sub (compiler, ORC_ARM_A2, ORC_ARM_A3, ORC_ARM_IP); + + orc_arm_emit_asr_imm (compiler, ORC_ARM_A3, ORC_ARM_A2, + compiler->loop_shift + compiler->unroll_shift); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2)); + + orc_arm_emit_and_imm (compiler, ORC_ARM_A3, ORC_ARM_A2, + (1<<(compiler->loop_shift + compiler->unroll_shift))-1); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3)); + + orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, LABEL_ONE_REGION_AFTER); + orc_arm_emit_label (compiler, LABEL_ONE_REGION); + + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1)); + + orc_arm_emit_load_imm (compiler, ORC_ARM_A3, 0); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2)); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3)); + + orc_arm_emit_label (compiler, LABEL_ONE_REGION_AFTER); + } + + orc_neon_load_constants_inner (compiler); + + if (compiler->loop_shift > 0) { + int save_loop_shift = compiler->loop_shift; + compiler->loop_shift = 0; + + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1)); + + orc_arm_emit_cmp_imm (compiler, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION1_SKIP); + + orc_arm_emit_label (compiler, LABEL_REGION1_LOOP); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + orc_neon_emit_loop (compiler, -1); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION1_LOOP); + orc_arm_emit_label (compiler, LABEL_REGION1_SKIP); + + compiler->loop_shift = save_loop_shift; + compiler->vars[align_var].is_aligned = TRUE; + } + + if (compiler->loop_shift > 0) { + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2)); + } else { + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n)); + } + + orc_arm_emit_cmp_imm (compiler, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION2_SKIP); + + orc_arm_emit_asr_imm (compiler, compiler->gp_tmpreg, ORC_ARM_IP, + 17 + var_size_shift - compiler->loop_shift - compiler->unroll_shift); + orc_arm_emit_cmp_imm (compiler, compiler->gp_tmpreg, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION2_MEDIUM); + + /* N is larger than L2 cache size */ + compiler->size_region = 3; + orc_arm_emit_label (compiler, LABEL_REGION2_LOOP_LARGE); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + for(i=0;i<(1<unroll_shift);i++){ + orc_neon_emit_loop (compiler, i); + } + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION2_LOOP_LARGE); + orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, LABEL_REGION2_SKIP); + + orc_arm_emit_label (compiler, LABEL_REGION2_MEDIUM); + orc_arm_emit_asr_imm (compiler, compiler->gp_tmpreg, ORC_ARM_IP, + 13 + var_size_shift - compiler->loop_shift - compiler->unroll_shift); + orc_arm_emit_cmp_imm (compiler, compiler->gp_tmpreg, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION2_SMALL); + + /* N is smaller than L2 cache size */ + compiler->size_region = 2; + orc_arm_emit_label (compiler, LABEL_REGION2_LOOP_MEDIUM); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + for(i=0;i<(1<unroll_shift);i++){ + orc_neon_emit_loop (compiler, i); + } + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION2_LOOP_MEDIUM); + orc_arm_emit_branch (compiler, ORC_ARM_COND_AL, LABEL_REGION2_SKIP); + + orc_arm_emit_label (compiler, LABEL_REGION2_SMALL); + /* N is smaller than L2 cache size */ + compiler->size_region = 1; + orc_arm_emit_label (compiler, LABEL_REGION2_LOOP_SMALL); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + for(i=0;i<(1<unroll_shift);i++){ + orc_neon_emit_loop (compiler, i); + } + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION2_LOOP_SMALL); + + orc_arm_emit_label (compiler, LABEL_REGION2_SKIP); + + if (compiler->loop_shift > 0) { + int save_loop_shift = compiler->loop_shift; + + compiler->loop_shift = 0; + + compiler->vars[align_var].is_aligned = FALSE; + + orc_arm_emit_load_reg (compiler, ORC_ARM_IP, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3)); + + orc_arm_emit_cmp_imm (compiler, ORC_ARM_IP, 0); + orc_arm_emit_branch (compiler, ORC_ARM_COND_EQ, LABEL_REGION3_SKIP); + + orc_arm_emit_label (compiler, LABEL_REGION3_LOOP); + orc_arm_emit_sub_imm (compiler, ORC_ARM_IP, ORC_ARM_IP, 1, TRUE); + orc_neon_emit_loop (compiler, -1); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_REGION3_LOOP); + orc_arm_emit_label (compiler, LABEL_REGION3_SKIP); + + compiler->loop_shift = save_loop_shift; + } + + if (compiler->program->is_2d) { + neon_add_strides (compiler); + + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2])); + orc_arm_emit_sub_imm (compiler, ORC_ARM_A3, ORC_ARM_A3, 1, TRUE); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2])); + orc_arm_emit_branch (compiler, ORC_ARM_COND_NE, LABEL_OUTER_LOOP); + } + + orc_neon_save_accumulators (compiler); + + orc_neon_emit_epilogue (compiler); + + orc_arm_emit_align (compiler, 4); + + orc_arm_emit_label (compiler, 20); + orc_arm_emit_data (compiler, 0x07060706); + orc_arm_emit_data (compiler, 0x07060706); + orc_arm_emit_data (compiler, 0x0f0e0f0e); + orc_arm_emit_data (compiler, 0x0f0e0f0e); + + orc_arm_do_fixups (compiler); +} + +void +orc_neon_emit_loop (OrcCompiler *compiler, int unroll_index) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + orc_compiler_append_code(compiler,"# LOOP shift %d\n", compiler->loop_shift); + for(j=0;jn_insns;j++){ + compiler->insn_index = j; + insn = compiler->insns + j; + opcode = insn->opcode; + + if (insn->flags & ORC_INSN_FLAG_INVARIANT) continue; + + orc_compiler_append_code(compiler,"# %d: %s", j, insn->opcode->name); + + /* set up args */ +#if 0 + for(k=0;kn_src + opcode->n_dest;k++){ + args[k] = compiler->vars + insn->args[k]; + orc_compiler_append_code(compiler," %d", args[k]->alloc); + if (args[k]->is_chained) { + orc_compiler_append_code(compiler," (chained)"); + } + } +#endif + orc_compiler_append_code(compiler,"\n"); + + for(k=0;ksrc_size[k] == 0) continue; + + switch (compiler->vars[insn->src_args[k]].vartype) { + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + //orc_neon_emit_load_src (compiler, &compiler->vars[insn->src_args[k]], unroll_index); + break; + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { +#if 0 + if (compiler->vars[insn->dest_args[0]].alloc != + compiler->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (compiler, compiler->vars[insn->dest_args[0]].alloc, + compiler->vars[insn->src_args[0]].alloc); + } +#endif + rule->emit (compiler, rule->emit_user, insn); + } else { + orc_compiler_append_code(compiler,"No rule for: %s\n", opcode->name); + } + + for(k=0;kdest_size[k] == 0) continue; + + switch (compiler->vars[insn->dest_args[k]].vartype) { + case ORC_VAR_TYPE_DEST: + //orc_neon_emit_store_dest (compiler, &compiler->vars[insn->dest_args[k]]); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + break; + } + } + } + + for(k=0;kvars[k].name == NULL) continue; + if (compiler->vars[k].vartype == ORC_VAR_TYPE_SRC || + compiler->vars[k].vartype == ORC_VAR_TYPE_DEST) { + if (compiler->vars[k].ptr_register) { + orc_arm_emit_add_imm (compiler, + compiler->vars[k].ptr_register, + compiler->vars[k].ptr_register, + compiler->vars[k].size << compiler->loop_shift); + } else { + //arm_emit_add_imm_memoffset (compiler, arm_ptr_size, + // compiler->vars[k].size << compiler->loop_shift, + // (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k]), + // p->exec_reg); + } + } + } +} + +#define NEON_BINARY(code,a,b,c) \ + ((code) | \ + (((a)&0xf)<<12) | \ + ((((a)>>4)&0x1)<<22) | \ + (((b)&0xf)<<16) | \ + ((((b)>>4)&0x1)<<7) | \ + (((c)&0xf)<<0) | \ + ((((c)>>4)&0x1)<<5)) + +void +orc_neon_save_accumulators (OrcCompiler *compiler) +{ + int i; + int src; + unsigned int code; + + for(i=0;ivars + i; + + if (compiler->vars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_ACCUMULATOR: + src = compiler->vars[i].alloc; + + orc_arm_emit_load_imm (compiler, compiler->gp_tmpreg, + ORC_STRUCT_OFFSET(OrcExecutor, accumulators[i-ORC_VAR_A1])); + orc_arm_emit_add (compiler, compiler->gp_tmpreg, + compiler->gp_tmpreg, compiler->exec_reg); + switch (var->size) { + case 2: + if (compiler->loop_shift > 0) { + ORC_ASM_CODE(compiler," vpaddl.u16 %s, %s\n", + orc_neon_reg_name (src), + orc_neon_reg_name (src)); + code = 0xf3b40280; + code |= (src&0xf) << 12; + code |= ((src>>4)&0x1) << 22; + code |= (src&0xf) << 0; + orc_arm_emit (compiler, code); + + ORC_ASM_CODE(compiler," vpaddl.u32 %s, %s\n", + orc_neon_reg_name (src), + orc_neon_reg_name (src)); + code = 0xf3b80280; + code |= (src&0xf) << 12; + code |= ((src>>4)&0x1) << 22; + code |= (src&0xf) << 0; + orc_arm_emit (compiler, code); + } + + ORC_ASM_CODE(compiler," vst1.16 %s[%d], [%s]\n", + orc_neon_reg_name (src), 0, + orc_arm_reg_name (compiler->gp_tmpreg)); + code = 0xf480040f; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (src&0xf) << 12; + code |= ((src>>4)&0x1) << 22; + orc_arm_emit (compiler, code); + break; + case 4: + if (compiler->loop_shift > 0) { + ORC_ASM_CODE(compiler," vpadd.u32 %s, %s, %s\n", + orc_neon_reg_name (src), + orc_neon_reg_name (src), + orc_neon_reg_name (src)); + code = NEON_BINARY(0xf2200b10, src, src, src); + orc_arm_emit (compiler, code); + } + + ORC_ASM_CODE(compiler," vst1.32 %s[%d], [%s]\n", + orc_neon_reg_name (src), 0, + orc_arm_reg_name (compiler->gp_tmpreg)); + code = 0xf480080f; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (src&0xf) << 12; + code |= ((src>>4)&0x1) << 22; + orc_arm_emit (compiler, code); + break; + default: + ORC_ERROR("bad size"); + } + + break; + default: + break; + } + } +} + +void +neon_add_strides (OrcCompiler *compiler) +{ + int i; + + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_arm_emit_load_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + orc_arm_emit_load_reg (compiler, ORC_ARM_A2, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[i])); + orc_arm_emit_add (compiler, ORC_ARM_A3, ORC_ARM_A3, ORC_ARM_A2); + orc_arm_emit_store_reg (compiler, ORC_ARM_A3, compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i])); + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + diff --git a/orc/orcprogram-sse.c b/orc/orcprogram-sse.c new file mode 100644 index 0000000..21c980c --- /dev/null +++ b/orc/orcprogram-sse.c @@ -0,0 +1,1097 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#undef MMX +#define SIZE 65536 + +#define ORC_SSE_ALIGNED_DEST_CUTOFF 64 + +void orc_sse_emit_loop (OrcCompiler *compiler, int offset, int update); + +void orc_compiler_sse_init (OrcCompiler *compiler); +unsigned int orc_compiler_sse_get_default_flags (void); +void orc_compiler_sse_assemble (OrcCompiler *compiler); +void orc_compiler_sse_register_rules (OrcTarget *target); +void orc_sse_emit_invariants (OrcCompiler *compiler); + + +void orc_compiler_rewrite_vars (OrcCompiler *compiler); +void orc_compiler_dump (OrcCompiler *compiler); +void sse_load_constant (OrcCompiler *compiler, int reg, int size, int value); +void sse_load_constant_long (OrcCompiler *compiler, int reg, + OrcConstant *constant); +static const char * sse_get_flag_name (int shift); + +static OrcTarget sse_target = { + "sse", +#if defined(HAVE_I386) || defined(HAVE_AMD64) + TRUE, +#else + FALSE, +#endif + ORC_VEC_REG_BASE, + orc_compiler_sse_get_default_flags, + orc_compiler_sse_init, + orc_compiler_sse_assemble, + { { 0 } }, + 0, + NULL, + sse_load_constant, + sse_get_flag_name, + NULL, + sse_load_constant_long +}; + + +extern int orc_x86_sse_flags; +extern int orc_x86_mmx_flags; + +void +orc_sse_init (void) +{ +#if defined(HAVE_AMD64) || defined(HAVE_I386) + /* initializes cache information */ + orc_sse_get_cpu_flags (); +#endif + +#if defined(HAVE_I386) +#ifndef MMX + if (!(orc_x86_sse_flags & ORC_TARGET_SSE_SSE2)) { + sse_target.executable = FALSE; + } +#else + if (!(orc_x86_mmx_flags & ORC_TARGET_MMX_MMX)) { + mmx_target.executable = FALSE; + } +#endif +#endif + + orc_target_register (&sse_target); + + orc_compiler_sse_register_rules (&sse_target); +} + +unsigned int +orc_compiler_sse_get_default_flags (void) +{ + unsigned int flags = 0; + +#ifdef HAVE_AMD64 + flags |= ORC_TARGET_SSE_64BIT; +#endif + if (_orc_compiler_flag_debug) { + flags |= ORC_TARGET_SSE_FRAME_POINTER; + } + +#if defined(HAVE_AMD64) || defined(HAVE_I386) +#ifndef MMX + flags |= orc_x86_sse_flags; +#else + flags |= orc_x86_mmx_flags; +#endif +#else +#ifndef MMX + flags |= ORC_TARGET_SSE_SSE2; + flags |= ORC_TARGET_SSE_SSE3; + flags |= ORC_TARGET_SSE_SSSE3; +#else + flags |= ORC_TARGET_MMX_MMX; + flags |= ORC_TARGET_MMX_3DNOW; +#endif +#endif + + return flags; +} + +static const char * +sse_get_flag_name (int shift) +{ + static const char *flags[] = { +#ifndef MMX + "sse2", "sse3", "ssse3", "sse41", "sse42", "sse4a", "sse5", + "frame_pointer", "short_jumps", "64bit" +#else + "mmx", "mmxext", "3dnow", "3dnowext", "ssse3", "sse41", "", + "frame_pointer", "short_jumps", "64bit" +#endif + }; + + if (shift >= 0 && shift < sizeof(flags)/sizeof(flags[0])) { + return flags[shift]; + } + + return NULL; +} + +void +orc_compiler_sse_init (OrcCompiler *compiler) +{ + int i; + + if (compiler->target_flags & ORC_TARGET_SSE_64BIT) { + compiler->is_64bit = TRUE; + } + if (compiler->target_flags & ORC_TARGET_SSE_FRAME_POINTER) { + compiler->use_frame_pointer = TRUE; + } + if (!(compiler->target_flags & ORC_TARGET_SSE_SHORT_JUMPS)) { + compiler->long_jumps = TRUE; + } + + + if (compiler->is_64bit) { + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->valid_regs[X86_ESP] = 0; +#ifndef MMX + for(i=X86_XMM0;ivalid_regs[i] = 1; + } +#else + for(i=X86_XMM0;ivalid_regs[i] = 1; + } +#endif + compiler->save_regs[X86_EBX] = 1; + compiler->save_regs[X86_EBP] = 1; + compiler->save_regs[X86_R12] = 1; + compiler->save_regs[X86_R13] = 1; + compiler->save_regs[X86_R14] = 1; + compiler->save_regs[X86_R15] = 1; +#ifdef HAVE_OS_WIN32 + compiler->save_regs[X86_EDI] = 1; + compiler->save_regs[X86_ESI] = 1; + for(i=X86_XMM0+6;isave_regs[i] = 1; + } +#endif + } else { + for(i=ORC_GP_REG_BASE;ivalid_regs[i] = 1; + } + compiler->valid_regs[X86_ESP] = 0; + if (compiler->use_frame_pointer) { + compiler->valid_regs[X86_EBP] = 0; + } + for(i=X86_XMM0;ivalid_regs[i] = 1; + } + compiler->save_regs[X86_EBX] = 1; + compiler->save_regs[X86_EDI] = 1; + compiler->save_regs[X86_EBP] = 1; + } + for(i=0;i<128;i++){ + compiler->alloc_regs[i] = 0; + compiler->used_regs[i] = 0; + } + + if (compiler->is_64bit) { +#ifdef HAVE_OS_WIN32 + compiler->exec_reg = X86_ECX; + compiler->gp_tmpreg = X86_EDX; +#else + compiler->exec_reg = X86_EDI; + compiler->gp_tmpreg = X86_ECX; +#endif + } else { + compiler->gp_tmpreg = X86_ECX; + if (compiler->use_frame_pointer) { + compiler->exec_reg = X86_EBX; + } else { + compiler->exec_reg = X86_EBP; + } + } + compiler->valid_regs[compiler->gp_tmpreg] = 0; + compiler->valid_regs[compiler->exec_reg] = 0; + + switch (compiler->max_var_size) { + case 1: + compiler->loop_shift = 4; + break; + case 2: + compiler->loop_shift = 3; + break; + case 4: + compiler->loop_shift = 2; + break; + case 8: + compiler->loop_shift = 1; + break; + default: + ORC_ERROR("unhandled max var size %d", compiler->max_var_size); + break; + } +#ifdef MMX + compiler->loop_shift--; +#endif + + /* This limit is arbitrary, but some large functions run slightly + slower when unrolled (ginger Core2 6,15,6), and only some small + functions run faster when unrolled. Most are the same speed. */ + if (compiler->n_insns <= 10) { + compiler->unroll_shift = 1; + } + if (!compiler->long_jumps) { + compiler->unroll_shift = 0; + } + if (compiler->loop_shift == 0) { + /* FIXME something is broken with loop_shift=0, unroll_shift=1 */ + compiler->unroll_shift = 0; + } + compiler->alloc_loop_counter = TRUE; + compiler->allow_gp_on_stack = TRUE; + + { + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + if (strcmp (opcode->name, "ldreslinb") == 0 || + strcmp (opcode->name, "ldreslinl") == 0 || + strcmp (opcode->name, "ldresnearb") == 0 || + strcmp (opcode->name, "ldresnearl") == 0) { + compiler->vars[insn->src_args[0]].need_offset_reg = TRUE; + } + } + } +} + +void +sse_save_accumulators (OrcCompiler *compiler) +{ + int i; + int src; + int tmp; + + for(i=0;ivars + i; + + if (compiler->vars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_ACCUMULATOR: + src = compiler->vars[i].alloc; + tmp = orc_compiler_get_temp_reg (compiler); + +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(3,2,3,2), src, tmp); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(3,2,3,2), src, tmp); +#endif + + if (compiler->vars[i].size == 2) { + orc_sse_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } else { + orc_sse_emit_660f (compiler, "paddd", 0xfe, tmp, src); + } + +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(1,1,1,1), src, tmp); + + if (compiler->vars[i].size == 2) { + orc_sse_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } else { + orc_sse_emit_660f (compiler, "paddd", 0xfe, tmp, src); + } +#endif + + if (compiler->vars[i].size == 2) { +#ifndef MMX + orc_sse_emit_pshuflw (compiler, ORC_SSE_SHUF(1,1,1,1), src, tmp); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,1,1,1), src, tmp); +#endif + + orc_sse_emit_660f (compiler, "paddw", 0xfd, tmp, src); + } + + if (compiler->vars[i].size == 2) { + orc_x86_emit_mov_sse_reg (compiler, src, compiler->gp_tmpreg); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, accumulators[i-ORC_VAR_A1]), + compiler->exec_reg); + } else { + orc_x86_emit_mov_sse_memoffset (compiler, 4, src, + (int)ORC_STRUCT_OFFSET(OrcExecutor, accumulators[i-ORC_VAR_A1]), + compiler->exec_reg, + var->is_aligned, var->is_uncached); + } + + break; + default: + break; + } + } +} + +void +sse_load_constant (OrcCompiler *compiler, int reg, int size, int value) +{ + orc_sse_load_constant (compiler, reg, size, value); +} + +void +orc_sse_load_constant (OrcCompiler *compiler, int reg, int size, orc_uint64 value) +{ + int i; + + if (size == 8) { + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + /* FIXME how ugly and slow! */ + orc_x86_emit_mov_imm_reg (compiler, 4, value>>0, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 0, compiler->exec_reg); + + orc_x86_emit_mov_imm_reg (compiler, 4, value>>32, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 4, compiler->exec_reg); + + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset, compiler->exec_reg, + reg, FALSE); +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(1,0,1,0), reg, reg); +#endif + return; + } + + if (size == 1) { + value &= 0xff; + value |= (value << 8); + value |= (value << 16); + } + if (size == 2) { + value &= 0xffff; + value |= (value << 16); + } + + ORC_ASM_CODE(compiler, "# loading constant %d 0x%08x\n", (int)value, (int)value); + if (value == 0) { + orc_sse_emit_pxor(compiler, reg, reg); + return; + } + if (value == 0xffffffff) { + orc_sse_emit_pcmpeqb (compiler, reg, reg); + return; + } + if (compiler->target_flags & ORC_TARGET_SSE_SSSE3) { + if (value == 0x01010101) { + orc_sse_emit_pcmpeqb (compiler, reg, reg); + orc_sse_emit_pabsb (compiler, reg, reg); + return; + } + } + + for(i=1;i<32;i++){ + orc_uint32 v; + v = (0xffffffff<>i); + if (value == v) { + orc_sse_emit_pcmpeqb (compiler, reg, reg); + orc_sse_emit_psrld (compiler, i, reg); + return; + } + } + for(i=1;i<16;i++){ + orc_uint32 v; + v = (0xffff & (0xffff<>i)) | (0xffff0000 & (0xffff0000>>i)); + if (value == v) { + orc_sse_emit_pcmpeqb (compiler, reg, reg); + orc_sse_emit_psrlw (compiler, i, reg); + return; + } + } + + orc_x86_emit_mov_imm_reg (compiler, 4, value, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_sse (compiler, compiler->gp_tmpreg, reg); +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(0,0,0,0), reg, reg); +#else + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); +#endif +} + +void +sse_load_constant_long (OrcCompiler *compiler, int reg, + OrcConstant *constant) +{ + int i; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + /* FIXME this is slower than it could be */ + + ORC_ASM_CODE(compiler, "# loading constant %08x %08x %08x %08x\n", + constant->full_value[0], constant->full_value[1], + constant->full_value[2], constant->full_value[3]); + + for(i=0;i<4;i++){ + orc_x86_emit_mov_imm_reg (compiler, 4, constant->full_value[i], + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + offset + 4*i, compiler->exec_reg); + } + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset, compiler->exec_reg, + reg, FALSE); + +} + +void +sse_load_constants_outer (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + break; + case ORC_VAR_TYPE_ACCUMULATOR: + orc_sse_emit_pxor (compiler, + compiler->vars[i].alloc, compiler->vars[i].alloc); + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } + + orc_sse_emit_invariants (compiler); + + /* FIXME move to a better place */ + for(i=0;in_constants;i++){ + compiler->constants[i].alloc_reg = + orc_compiler_get_constant_reg (compiler); + } + + for(i=0;in_constants;i++){ + if (compiler->constants[i].alloc_reg) { + if (compiler->constants[i].is_long) { + sse_load_constant_long (compiler, compiler->constants[i].alloc_reg, + compiler->constants + i); + } else { + sse_load_constant (compiler, compiler->constants[i].alloc_reg, + 4, compiler->constants[i].value); + } + } + } + + { + for(i=0;in_insns;i++){ + OrcInstruction *insn = compiler->insns + i; + OrcStaticOpcode *opcode = insn->opcode; + + if (strcmp (opcode->name, "ldreslinb") == 0 || + strcmp (opcode->name, "ldreslinl") == 0 || + strcmp (opcode->name, "ldresnearb") == 0 || + strcmp (opcode->name, "ldresnearl") == 0) { + if (compiler->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[1]]), + compiler->exec_reg, + compiler->vars[insn->src_args[0]].ptr_offset); + } else { + orc_x86_emit_mov_imm_reg (compiler, 4, + compiler->vars[insn->src_args[1]].value.i, + compiler->vars[insn->src_args[0]].ptr_offset); + } + } + } + } +} + +void +sse_load_constants_inner (OrcCompiler *compiler) +{ + int i; + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + if (compiler->vars[i].ptr_register) { + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), compiler->exec_reg, + compiler->vars[i].ptr_register); + } + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + +void +sse_add_strides (OrcCompiler *compiler) +{ + int i; + + for(i=0;ivars[i].name == NULL) continue; + switch (compiler->vars[i].vartype) { + case ORC_VAR_TYPE_CONST: + break; + case ORC_VAR_TYPE_PARAM: + break; + case ORC_VAR_TYPE_SRC: + case ORC_VAR_TYPE_DEST: + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[i]), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_add_reg_memoffset (compiler, compiler->is_64bit ? 8 : 4, + compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), compiler->exec_reg); + + if (compiler->vars[i].ptr_register == 0) { + ORC_COMPILER_ERROR(compiler, "unimplemented: stride on mem pointer"); + } + break; + case ORC_VAR_TYPE_ACCUMULATOR: + break; + case ORC_VAR_TYPE_TEMP: + break; + default: + ORC_COMPILER_ERROR(compiler,"bad vartype"); + break; + } + } +} + +static int +get_align_var (OrcCompiler *compiler) +{ + int i; + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + if ((compiler->vars[i].size << compiler->loop_shift) >= 16) { + return i; + } + } + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + if ((compiler->vars[i].size << compiler->loop_shift) >= 8) { + return i; + } + } + for(i=ORC_VAR_D1;i<=ORC_VAR_S8;i++){ + if (compiler->vars[i].size == 0) continue; + return i; + } + + ORC_COMPILER_ERROR(compiler, "could not find alignment variable"); + + return -1; +} + +static int +get_shift (int size) +{ + switch (size) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + ORC_ERROR("bad size %d", size); + } + return -1; +} + + +static void +orc_emit_split_3_regions (OrcCompiler *compiler) +{ + int align_var; + int align_shift; + int var_size_shift; + + align_var = get_align_var (compiler); + var_size_shift = get_shift (compiler->vars[align_var].size); + align_shift = var_size_shift + compiler->loop_shift; + + /* determine how many iterations until align array is aligned (n1) */ + orc_x86_emit_mov_imm_reg (compiler, 4, 16, X86_EAX); + orc_x86_emit_sub_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[align_var]), + compiler->exec_reg, X86_EAX); + orc_x86_emit_and_imm_reg (compiler, 4, (1<exec_reg); + + orc_x86_emit_jle (compiler, 6); + + /* If so, we have a standard 3-region split. */ + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + + /* Calculate n2 */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_sub_reg_reg (compiler, 4, X86_EAX, compiler->gp_tmpreg); + + orc_x86_emit_mov_reg_reg (compiler, 4, compiler->gp_tmpreg, X86_EAX); + + orc_x86_emit_sar_imm_reg (compiler, 4, + compiler->loop_shift + compiler->unroll_shift, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + + /* Calculate n3 */ + orc_x86_emit_and_imm_reg (compiler, 4, + (1<<(compiler->loop_shift + compiler->unroll_shift))-1, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + + orc_x86_emit_jmp (compiler, 7); + + /* else, iterations are all unaligned: n1=n, n2=0, n3=0 */ + orc_x86_emit_label (compiler, 6); + + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + orc_x86_emit_mov_imm_reg (compiler, 4, 0, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + + orc_x86_emit_label (compiler, 7); +} + +static void +orc_emit_split_2_regions (OrcCompiler *compiler) +{ + int align_var; + int align_shift; + int var_size_shift; + + align_var = get_align_var (compiler); + var_size_shift = get_shift (compiler->vars[align_var].size); + align_shift = var_size_shift + compiler->loop_shift; + + /* Calculate n2 */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_reg (compiler, 4, compiler->gp_tmpreg, X86_EAX); + orc_x86_emit_sar_imm_reg (compiler, 4, + compiler->loop_shift + compiler->unroll_shift, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + + /* Calculate n3 */ + orc_x86_emit_and_imm_reg (compiler, 4, + (1<<(compiler->loop_shift + compiler->unroll_shift))-1, X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); +} + +#ifndef MMX +static int +orc_program_has_float (OrcCompiler *compiler) +{ + int j; + for(j=0;jn_insns;j++){ + OrcInstruction *insn = compiler->insns + j; + OrcStaticOpcode *opcode = insn->opcode; + if (opcode->flags & ORC_STATIC_OPCODE_FLOAT) return TRUE; + } + return FALSE; +} +#endif + +#define LABEL_REGION1_SKIP 1 +#define LABEL_INNER_LOOP_START 2 +#define LABEL_REGION2_SKIP 3 +#define LABEL_OUTER_LOOP 4 +#define LABEL_OUTER_LOOP_SKIP 5 +#define LABEL_STEP_DOWN(x) (8+(x)) +#define LABEL_STEP_UP(x) (13+(x)) + + +void +orc_compiler_sse_assemble (OrcCompiler *compiler) +{ +#ifndef MMX + int set_mxcsr = FALSE; +#endif + int align_var; + + if (0 && orc_x86_assemble_copy_check (compiler)) { + /* The rep movs implementation isn't faster most of the time */ + orc_x86_assemble_copy (compiler); + return; + } + + align_var = get_align_var (compiler); + + compiler->vars[align_var].is_aligned = FALSE; + + { + orc_sse_emit_loop (compiler, 0, 0); + + compiler->codeptr = compiler->code; + free (compiler->asm_code); + compiler->asm_code = NULL; + compiler->asm_code_len = 0; + memset (compiler->labels, 0, sizeof (compiler->labels)); + compiler->n_fixups = 0; + } + + if (compiler->error) return; + + orc_x86_emit_prologue (compiler); + +#ifndef MMX + if (orc_program_has_float (compiler)) { + set_mxcsr = TRUE; + orc_sse_set_mxcsr (compiler); + } +#endif + + sse_load_constants_outer (compiler); + + if (compiler->program->is_2d) { + if (compiler->program->constant_m > 0) { + orc_x86_emit_mov_imm_reg (compiler, 4, compiler->program->constant_m, + X86_EAX); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2]), + compiler->exec_reg); + } else { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A1]), + compiler->exec_reg, X86_EAX); + orc_x86_emit_test_reg_reg (compiler, 4, X86_EAX, X86_EAX); + orc_x86_emit_jle (compiler, LABEL_OUTER_LOOP_SKIP); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[ORC_VAR_A2]), + compiler->exec_reg); + } + + orc_x86_emit_label (compiler, LABEL_OUTER_LOOP); + } + + if (compiler->program->constant_n > 0 && + compiler->program->constant_n <= ORC_SSE_ALIGNED_DEST_CUTOFF) { + /* don't need to load n */ + } else if (compiler->loop_shift > 0) { + if (!compiler->has_iterator_opcode) { + /* split n into three regions, with center region being aligned */ + orc_emit_split_3_regions (compiler); + } else { + orc_emit_split_2_regions (compiler); + } + } else { + /* loop shift is 0, no need to split */ + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + } + + sse_load_constants_inner (compiler); + + if (compiler->program->constant_n > 0 && + compiler->program->constant_n <= ORC_SSE_ALIGNED_DEST_CUTOFF) { + int n_left = compiler->program->constant_n; + int save_loop_shift; + int loop_shift; + + compiler->offset = 0; + + save_loop_shift = compiler->loop_shift; + while (n_left >= (1<loop_shift)) { + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + orc_sse_emit_loop (compiler, compiler->offset, 0); + + n_left -= 1<loop_shift; + compiler->offset += 1<loop_shift; + } + for(loop_shift = compiler->loop_shift-1; loop_shift>=0; loop_shift--) { + if (n_left >= (1<loop_shift = loop_shift; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", loop_shift); + orc_sse_emit_loop (compiler, compiler->offset, 0); + n_left -= 1<offset += 1<loop_shift = save_loop_shift; + + } else { + int ui, ui_max; + int emit_region1 = TRUE; + int emit_region3 = TRUE; + + if (compiler->has_iterator_opcode) { + emit_region1 = FALSE; + } + if (compiler->loop_shift == 0) { + emit_region1 = FALSE; + emit_region3 = FALSE; + } + + if (emit_region1) { + int save_loop_shift; + int l; + + save_loop_shift = compiler->loop_shift; + compiler->vars[align_var].is_aligned = FALSE; + + for (l=0;lloop_shift = l; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + + orc_x86_emit_test_imm_memoffset (compiler, 4, 1<loop_shift, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter1), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_STEP_UP(compiler->loop_shift)); + orc_sse_emit_loop (compiler, 0, 1<loop_shift); + orc_x86_emit_label (compiler, LABEL_STEP_UP(compiler->loop_shift)); + } + + compiler->loop_shift = save_loop_shift; + compiler->vars[align_var].is_aligned = TRUE; + } + + orc_x86_emit_label (compiler, LABEL_REGION1_SKIP); + + orc_x86_emit_cmp_imm_memoffset (compiler, 4, 0, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_REGION2_SKIP); + + if (compiler->loop_counter != ORC_REG_INVALID) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, counter2), compiler->exec_reg, + compiler->loop_counter); + } + + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + orc_x86_emit_align (compiler); + orc_x86_emit_label (compiler, LABEL_INNER_LOOP_START); + ui_max = 1<unroll_shift; + for(ui=0;uioffset = ui<loop_shift; + orc_sse_emit_loop (compiler, compiler->offset, + (ui==ui_max-1) << (compiler->loop_shift + compiler->unroll_shift)); + } + compiler->offset = 0; + if (compiler->loop_counter != ORC_REG_INVALID) { + orc_x86_emit_add_imm_reg (compiler, 4, -1, compiler->loop_counter, TRUE); + } else { + orc_x86_emit_dec_memoffset (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter2), + compiler->exec_reg); + } + orc_x86_emit_jne (compiler, LABEL_INNER_LOOP_START); + orc_x86_emit_label (compiler, LABEL_REGION2_SKIP); + + if (emit_region3) { + int save_loop_shift; + int l; + + save_loop_shift = compiler->loop_shift + compiler->unroll_shift; + compiler->vars[align_var].is_aligned = FALSE; + + for(l=save_loop_shift - 1; l >= 0; l--) { + compiler->loop_shift = l; + ORC_ASM_CODE(compiler, "# LOOP SHIFT %d\n", compiler->loop_shift); + + orc_x86_emit_test_imm_memoffset (compiler, 4, 1<loop_shift, + (int)ORC_STRUCT_OFFSET(OrcExecutor,counter3), compiler->exec_reg); + orc_x86_emit_je (compiler, LABEL_STEP_DOWN(compiler->loop_shift)); + orc_sse_emit_loop (compiler, 0, 1<loop_shift); + orc_x86_emit_label (compiler, LABEL_STEP_DOWN(compiler->loop_shift)); + } + + compiler->loop_shift = save_loop_shift; + } + } + + if (compiler->program->is_2d && compiler->program->constant_m != 1) { + sse_add_strides (compiler); + + orc_x86_emit_add_imm_memoffset (compiler, 4, -1, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A2]), + compiler->exec_reg); + orc_x86_emit_jne (compiler, LABEL_OUTER_LOOP); + orc_x86_emit_label (compiler, LABEL_OUTER_LOOP_SKIP); + } + + sse_save_accumulators (compiler); + +#ifndef MMX + if (set_mxcsr) { + orc_sse_restore_mxcsr (compiler); + } +#else + orc_x86_emit_emms (compiler); +#endif + orc_x86_emit_epilogue (compiler); + + orc_x86_do_fixups (compiler); +} + +void +orc_sse_emit_loop (OrcCompiler *compiler, int offset, int update) +{ + int j; + int k; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + compiler->insn_index = j; + + if (insn->flags & ORC_INSN_FLAG_INVARIANT) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", j, insn->opcode->name); + + compiler->min_temp_reg = ORC_VEC_REG_BASE; + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { + if (!(insn->opcode->flags & (ORC_STATIC_OPCODE_ACCUMULATOR|ORC_STATIC_OPCODE_LOAD|ORC_STATIC_OPCODE_STORE)) && + compiler->vars[insn->dest_args[0]].alloc != + compiler->vars[insn->src_args[0]].alloc) { + orc_x86_emit_mov_sse_reg_reg (compiler, + compiler->vars[insn->src_args[0]].alloc, + compiler->vars[insn->dest_args[0]].alloc); + } + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } + + if (update) { + for(k=0;kvars + k; + + if (var->name == NULL) continue; + if (var->vartype == ORC_VAR_TYPE_SRC || + var->vartype == ORC_VAR_TYPE_DEST) { + int offset; + if (var->update_type == 0) { + offset = 0; + } else if (var->update_type == 1) { + offset = (var->size * update) >> 1; + } else { + offset = var->size * update; + } + + if (offset != 0) { + if (compiler->vars[k].ptr_register) { + orc_x86_emit_add_imm_reg (compiler, compiler->is_64bit ? 8 : 4, + offset, + compiler->vars[k].ptr_register, FALSE); + } else { + orc_x86_emit_add_imm_memoffset (compiler, compiler->is_64bit ? 8 : 4, + offset, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[k]), + compiler->exec_reg); + } + } + } + } + } +} + +void +orc_sse_emit_invariants (OrcCompiler *compiler) +{ + int j; + OrcInstruction *insn; + OrcStaticOpcode *opcode; + OrcRule *rule; + + for(j=0;jn_insns;j++){ + insn = compiler->insns + j; + opcode = insn->opcode; + + if (!(insn->flags & ORC_INSN_FLAG_INVARIANT)) continue; + + ORC_ASM_CODE(compiler,"# %d: %s\n", j, insn->opcode->name); + + compiler->insn_shift = compiler->loop_shift; + if (insn->flags & ORC_INSTRUCTION_FLAG_X2) { + compiler->insn_shift += 1; + } + if (insn->flags & ORC_INSTRUCTION_FLAG_X4) { + compiler->insn_shift += 2; + } + + rule = insn->rule; + if (rule && rule->emit) { + rule->emit (compiler, rule->emit_user, insn); + } else { + ORC_COMPILER_ERROR(compiler,"No rule for: %s", opcode->name); + } + } +} + diff --git a/orc/orcprogram.c b/orc/orcprogram.c new file mode 100644 index 0000000..fd7d32d --- /dev/null +++ b/orc/orcprogram.c @@ -0,0 +1,961 @@ + +#include "config.h" + +#include +#include +#include +#include + +#include +#include + +/** + * SECTION:orcprogram + * @title: OrcProgram + * @short_description: Creating and manipulating Orc programs + */ + + +/** + * orc_program_new: + * + * Create a new OrcProgram. The program should be freed using + * @orc_program_free(). + * + * Returns: a pointer to an OrcProgram structure + */ +OrcProgram * +orc_program_new (void) +{ + OrcProgram *p; + + orc_init (); + + p = malloc(sizeof(OrcProgram)); + memset (p, 0, sizeof(OrcProgram)); + + p->name = malloc (40); + sprintf(p->name, "func_%p", p); + + return p; +} + +/** + * orc_program_new_dss: + * @size1: size of destination array members + * @size2: size of first source array members + * @size3: size of second source array members + * + * Create a new OrcProgram, with a destination named "d1" and + * two sources named "s1" and "s2". + * + * Returns: a pointer to an OrcProgram structure + */ +OrcProgram * +orc_program_new_dss (int size1, int size2, int size3) +{ + OrcProgram *p; + + p = orc_program_new (); + + orc_program_add_destination (p, size1, "d1"); + orc_program_add_source (p, size2, "s1"); + orc_program_add_source (p, size3, "s2"); + + return p; +} + +/** + * orc_program_new_ds: + * @size1: size of destination array members + * @size2: size of source array members + * + * Create a new OrcProgram, with a destination named "d1" and + * one source named "s1". + * + * Returns: a pointer to an OrcProgram structure + */ +OrcProgram * +orc_program_new_ds (int size1, int size2) +{ + OrcProgram *p; + + p = orc_program_new (); + + orc_program_add_destination (p, size1, "d1"); + orc_program_add_source (p, size2, "s1"); + + return p; +} + +/** + * orc_program_new_ass: + * @size1: size of destination array members + * @size2: size of first source array members + * @size3: size of second source array members + * + * Create a new OrcProgram, with an accumulator named "a1" and + * two source named "s1" and "s2". + * + * Returns: a pointer to an OrcProgram structure + */ +OrcProgram * +orc_program_new_ass (int size1, int size2, int size3) +{ + OrcProgram *p; + + p = orc_program_new (); + + orc_program_add_accumulator (p, size1, "a1"); + orc_program_add_source (p, size2, "s1"); + orc_program_add_source (p, size3, "s2"); + + return p; +} + +/** + * orc_program_new_as: + * @size1: size of destination array members + * @size2: size of source array members + * + * Create a new OrcProgram, with an accumulator named "a1" and + * one source named "s1". + * + * Returns: a pointer to an OrcProgram structure + */ +OrcProgram * +orc_program_new_as (int size1, int size2) +{ + OrcProgram *p; + + p = orc_program_new (); + + orc_program_add_accumulator (p, size1, "a1"); + orc_program_add_source (p, size2, "s1"); + + return p; +} + +/** + * orc_program_free: + * @program: a pointer to an OrcProgram structure + * + * Frees an OrcProgram. + */ +void +orc_program_free (OrcProgram *program) +{ + int i; + for(i=0;ivars[i].name) { + free (program->vars[i].name); + program->vars[i].name = NULL; + } + } + if (program->asm_code) { + free (program->asm_code); + program->asm_code = NULL; + } + if (program->name) { + free (program->name); + program->name = NULL; + } + free (program); +} + +/** + * orc_program_set_name: + * @program: a pointer to an OrcProgram structure + * @name: string to set the name to + * + * Sets the name of the program. The string is copied. + */ +void +orc_program_set_name (OrcProgram *program, const char *name) +{ + if (program->name) { + free (program->name); + } + program->name = strdup (name); +} + +/** + * orc_program_set_2d: + * @program: a pointer to an OrcProgram structure + * + * Sets a flag on the program indicating that arrays are two + * dimensional. This causes the compiler to generate code for + * an OrcExec2D executor. + */ +void +orc_program_set_2d (OrcProgram *program) +{ + program->is_2d = TRUE; +} + +void orc_program_set_constant_n (OrcProgram *program, int n) +{ + program->constant_n = n; +} + +void orc_program_set_constant_m (OrcProgram *program, int m) +{ + program->constant_m = m; +} + +/** + * orc_program_set_backup_function: + * @program: a pointer to an OrcProgram structure + * @func: a function that performs the operations in the program + * + * Normally, if a program cannot be compiled for a particular CPU, + * Orc will emulate the function, which is typically very slow. This + * function allows the developer to provide a function that is called + * instead of resorting to emulation. + */ +void +orc_program_set_backup_function (OrcProgram *program, OrcExecutorFunc func) +{ + program->backup_func = func; + if (program->code_exec == NULL) { + program->code_exec = func; + } +} + +/** + * orc_program_get_name: + * @program: a pointer to an OrcProgram structure + * + * Gets the name of the program. The string is valid until the name + * is changed or the program is freed. + * + * Returns: a character string + */ +const char * +orc_program_get_name (OrcProgram *program) +{ + return program->name; +} + +/** + * orc_program_add_temporary: + * @program: a pointer to an OrcProgram structure + * @size: size of data values + * @name: name of variable + * + * Creates a new variable holding temporary values. + * + * Returns: the index of the new variable + */ +int +orc_program_add_temporary (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_T1 + program->n_temp_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_TEMP; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_temp_vars++; + + return i; +} + +/** + * orc_program_dup_temporary: + * @program: a pointer to an OrcProgram structure + * @var: variable to duplicate + * @j: index + * + * Internal function. + * + * Returns: the index of the new variable + */ +int +orc_program_dup_temporary (OrcProgram *program, int var, int j) +{ + int i = ORC_VAR_T1 + program->n_temp_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_TEMP; + program->vars[i].size = program->vars[var].size; + program->vars[i].name = malloc (strlen(program->vars[var].name) + 10); + sprintf(program->vars[i].name, "%s.dup%d", program->vars[var].name, j); + program->n_temp_vars++; + + return i; +} + +/** + * orc_program_add_source: + * @program: a pointer to an OrcProgram structure + * @size: size of data values + * @name: name of variable + * + * Creates a new variable representing a source array. + * + * Returns: the index of the new variable + */ +int +orc_program_add_source (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_S1 + program->n_src_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_SRC; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_src_vars++; + + return i; +} + +/** + * orc_program_add_destination: + * @program: a pointer to an OrcProgram structure + * @size: size of data values + * @name: name of variable + * + * Creates a new variable representing a destination array. + * + * Returns: the index of the new variable + */ +int +orc_program_add_destination (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_D1 + program->n_dest_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_DEST; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_dest_vars++; + + return i; +} + +/** + * orc_program_add_constant: + * @program: a pointer to an OrcProgram structure + * @size: size of data value + * @value: the value + * @name: name of variable + * + * Creates a new variable representing a constant value. + * + * Returns: the index of the new variable + */ +int +orc_program_add_constant (OrcProgram *program, int size, int value, const char *name) +{ + int i; + + i = ORC_VAR_C1 + program->n_const_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_CONST; + program->vars[i].size = size; + program->vars[i].value.i = value; + program->vars[i].name = strdup(name); + program->n_const_vars++; + + return i; +} + +int +orc_program_add_constant_int64 (OrcProgram *program, int size, + orc_int64 value, const char *name) +{ + int i; + + i = ORC_VAR_C1 + program->n_const_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_CONST; + program->vars[i].size = size; + program->vars[i].value.i = value; + program->vars[i].name = strdup(name); + program->n_const_vars++; + + return i; +} + +int +orc_program_add_constant_float (OrcProgram *program, int size, + float value, const char *name) +{ + orc_union32 u; + u.f = value; + return orc_program_add_constant (program, size, u.i, name); +} + +int +orc_program_add_constant_double (OrcProgram *program, int size, + double value, const char *name) +{ + orc_union64 u; + u.f = value; + return orc_program_add_constant_int64 (program, size, u.i, name); +} + +int +orc_program_add_constant_str (OrcProgram *program, int size, + const char *value, const char *name) +{ + int i; + char *end; + orc_int64 val_i; + double val_d; + int j; + + i = ORC_VAR_C1 + program->n_const_vars; + + val_i = _strtoll (value, &end, 0); + if (end[0] == 0) { + program->vars[i].value.i = val_i; + if (size == 0) + size = 4; + } else if ((end[0] == 'l' || end[0] == 'L') && end[1] == 0) { + program->vars[i].value.i = val_i; + if (size == 0) + size = 8; + } else { + val_d = strtod (value, &end); + + if (end[0] == 0) { + orc_union32 u; + u.f = val_d; + program->vars[i].value.i = u.i; + if (size == 0) + size = 4; + } else if ((end[0] == 'l' || end[0] == 'L') && end[1] == 0) { + program->vars[i].value.f = val_d; + if (size == 0) + size = 8; + } else { + return -1; + } + } + + for(j=0;jn_const_vars;j++){ + if (program->vars[ORC_VAR_C1 + j].value.i == program->vars[i].value.i) { + return ORC_VAR_C1 + j; + } + } + + program->vars[i].vartype = ORC_VAR_TYPE_CONST; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_const_vars++; + + return i; +} + +/** + * orc_program_add_parameter: + * @program: a pointer to an OrcProgram structure + * @size: size of data value + * @name: name of variable + * + * Creates a new variable representing a scalar parameter. + * + * Returns: the index of the new variable + */ +int +orc_program_add_parameter (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_P1 + program->n_param_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_PARAM; + program->vars[i].param_type = ORC_PARAM_TYPE_INT; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_param_vars++; + + return i; +} + +/** + * orc_program_add_parameter_float: + * @program: a pointer to an OrcProgram structure + * @size: size of data value + * @name: name of variable + * + * Creates a new variable representing a scalar parameter. + * + * Returns: the index of the new variable + */ +int +orc_program_add_parameter_float (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_P1 + program->n_param_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_PARAM; + program->vars[i].param_type = ORC_PARAM_TYPE_FLOAT; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_param_vars++; + + return i; +} + +int +orc_program_add_parameter_double (OrcProgram *program, int size, + const char *name) +{ + int i = ORC_VAR_P1 + program->n_param_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_PARAM; + program->vars[i].param_type = ORC_PARAM_TYPE_DOUBLE; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_param_vars++; + + return i; +} + +int +orc_program_add_parameter_int64 (OrcProgram *program, int size, + const char *name) +{ + int i = ORC_VAR_P1 + program->n_param_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_PARAM; + program->vars[i].param_type = ORC_PARAM_TYPE_INT64; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_param_vars++; + + return i; +} + +/** + * orc_program_add_accumulator: + * @program: a pointer to an OrcProgram structure + * @size: size of data value + * @name: name of variable + * + * Creates a new variable representing an accumulator. + * + * Returns: the index of the new variable + */ +int +orc_program_add_accumulator (OrcProgram *program, int size, const char *name) +{ + int i = ORC_VAR_A1 + program->n_accum_vars; + + program->vars[i].vartype = ORC_VAR_TYPE_ACCUMULATOR; + program->vars[i].size = size; + program->vars[i].name = strdup(name); + program->n_param_vars++; + + return i; +} + +void +orc_program_set_type_name (OrcProgram *program, int var, const char *type_name) +{ + program->vars[var].type_name = strdup(type_name); +} + +void +orc_program_set_sampling_type (OrcProgram *program, int var, + int sampling_type) +{ + /* This doesn't do anything yet */ +} + +/** + * orc_program_append_ds: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @arg0: index of first variable + * @arg1: index of second variable + * + * Appends an instruction to the program, with arguments @arg0 and + * @arg1. The instruction must take 2 operands. + */ +void +orc_program_append_ds (OrcProgram *program, const char *name, int arg0, + int arg1) +{ + OrcInstruction *insn; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->dest_args[0] = arg0; + insn->src_args[0] = arg1; + + program->n_insns++; +} + +/** + * orc_program_append_ds: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @arg0: index of first variable + * @arg1: index of second variable + * @arg2: index of second variable + * + * Appends an instruction to the program, with arguments @arg0, + * @arg1, and @arg2. The instruction must take 3 operands. + */ +void +orc_program_append (OrcProgram *program, const char *name, int arg0, + int arg1, int arg2) +{ + OrcInstruction *insn; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->dest_args[0] = arg0; + insn->src_args[0] = arg1; + insn->src_args[1] = arg2; + + program->n_insns++; +} + +/** + * orc_program_append_ds_2: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @arg0: index of first variable + * @arg1: index of second variable + * @arg2: index of third variable + * @arg3: index of fourth variable + * + * Appends an instruction to the program, with arguments @arg0, + * @arg1, @arg2, and @arg3. + */ +void +orc_program_append_2 (OrcProgram *program, const char *name, unsigned int flags, + int arg0, int arg1, int arg2, int arg3) +{ + OrcInstruction *insn; + int args[4]; + int i; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->flags = flags; + args[0] = arg0; + args[1] = arg1; + args[2] = arg2; + args[3] = arg3; + insn->flags = flags; + i = 0; + insn->dest_args[0] = args[i++]; + if (insn->opcode->dest_size[1] != 0) { + insn->dest_args[1] = args[i++]; + } + if (insn->opcode->src_size[0] != 0) { + insn->src_args[0] = args[i++]; + } + if (insn->opcode->src_size[1] != 0) { + insn->src_args[1] = args[i++]; + } + if (insn->opcode->src_size[2] != 0) { + insn->src_args[2] = args[i++]; + } + + program->n_insns++; +} + +/** + * orc_program_find_var_by_name: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * + * Finds the variable with the name @name. If no variable with the + * given name exists in the program, -1 is returned. + * + * Returns: the index of the variable + */ +int +orc_program_find_var_by_name (OrcProgram *program, const char *name) +{ + int i; + + if (name == NULL) return -1; + + for(i=0;ivars[i].name && strcmp (program->vars[i].name, name) == 0) { + return i; + } + } + + return -1; +} + +/** + * orc_program_append_str: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @arg0: name of first variable + * @arg1: name of second variable + * @arg2: name of third variable + * + * Appends an instruction to the program, with arguments @arg0, + * @arg1, and @arg2. The instruction must take 3 operands. + */ +void +orc_program_append_str (OrcProgram *program, const char *name, + const char *arg1, const char *arg2, const char *arg3) +{ + OrcInstruction *insn; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->dest_args[0] = orc_program_find_var_by_name (program, arg1); + if (insn->opcode->dest_size[1] != 0) { + insn->dest_args[1] = orc_program_find_var_by_name (program, arg2); + insn->src_args[0] = orc_program_find_var_by_name (program, arg3); + } else { + insn->src_args[0] = orc_program_find_var_by_name (program, arg2); + insn->src_args[1] = orc_program_find_var_by_name (program, arg3); + } + + program->n_insns++; +} + +/** + * orc_program_append_str_2: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @flags: flags + * @arg0: name of first variable + * @arg1: name of second variable + * @arg2: name of third variable + * @arg3: name of fourth variable + * + * Appends an instruction to the program, with arguments @arg0, + * @arg1, @arg2, and @arg3. + */ +void +orc_program_append_str_2 (OrcProgram *program, const char *name, + unsigned int flags, const char *arg1, const char *arg2, const char *arg3, + const char *arg4) +{ + OrcInstruction *insn; + int args[4]; + int i; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + args[0] = orc_program_find_var_by_name (program, arg1); + args[1] = orc_program_find_var_by_name (program, arg2); + args[2] = orc_program_find_var_by_name (program, arg3); + args[3] = orc_program_find_var_by_name (program, arg4); + insn->flags = flags; + i = 0; + insn->dest_args[0] = args[i++]; + if (insn->opcode->dest_size[1] != 0) { + insn->dest_args[1] = args[i++]; + } + if (insn->opcode->src_size[0] != 0) { + insn->src_args[0] = args[i++]; + } + if (insn->opcode->src_size[1] != 0) { + insn->src_args[1] = args[i++]; + } + if (insn->opcode->src_size[2] != 0) { + insn->src_args[2] = args[i++]; + } + + program->n_insns++; +} + +/** + * orc_program_append_ds_str: + * @program: a pointer to an OrcProgram structure + * @name: name of instruction + * @arg0: name of first variable + * @arg1: name of second variable + * + * Appends an instruction to the program, with arguments @arg0 and + * @arg2. The instruction must take 2 operands. + */ +void +orc_program_append_ds_str (OrcProgram *program, const char *name, + const char *arg1, const char *arg2) +{ + OrcInstruction *insn; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->dest_args[0] = orc_program_find_var_by_name (program, arg1); + insn->src_args[0] = orc_program_find_var_by_name (program, arg2); + + program->n_insns++; +} + +void +orc_program_append_dds_str (OrcProgram *program, const char *name, + const char *arg1, const char *arg2, const char *arg3) +{ + OrcInstruction *insn; + + insn = program->insns + program->n_insns; + + insn->opcode = orc_opcode_find_by_name (name); + if (!insn->opcode) { + ORC_ERROR ("unknown opcode: %s", name); + } + insn->dest_args[0] = orc_program_find_var_by_name (program, arg1); + insn->dest_args[1] = orc_program_find_var_by_name (program, arg2); + insn->src_args[0] = orc_program_find_var_by_name (program, arg3); + + program->n_insns++; +} + +/** + * orc_program_get_asm_code: + * @program: a pointer to an OrcProgram structure + * + * Returns a character string containing the assembly code created + * by compiling the program. This string is valid until the program + * is compiled again or the program is freed. + * + * Returns: a character string + */ +const char * +orc_program_get_asm_code (OrcProgram *program) +{ + return program->asm_code; +} + +/** + * orc_program_get_max_array_size: + * @program: a pointer to an OrcProgram structure + * + * Returns the size of the largest array used in the program. + * + * Returns: the number of bytes + */ +int +orc_program_get_max_array_size (OrcProgram *program) +{ + int i; + int max; + + max = 0; + for(i=0;ivars[i].size) { + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC || + program->vars[i].vartype == ORC_VAR_TYPE_DEST) { + max = MAX(max, program->vars[i].size); + } + } + } + + return max; +} + +/** + * orc_program_get_max_accumulator_size: + * @program: a pointer to an OrcProgram structure + * + * Returns the size of the largest array used in the program. + * + * Returns: the number of bytes + */ +int +orc_program_get_max_accumulator_size (OrcProgram *program) +{ + int i; + int max; + + max = 0; + for(i=0;ivars[i].size) { + if (program->vars[i].vartype == ORC_VAR_TYPE_ACCUMULATOR) { + max = MAX(max, program->vars[i].size); + } + } + } + + return max; +} + +int _orc_data_cache_size_level1; +int _orc_data_cache_size_level2; +int _orc_data_cache_size_level3; +int _orc_cpu_family; +int _orc_cpu_model; +int _orc_cpu_stepping; +const char *_orc_cpu_name = "unknown"; + +void +orc_get_data_cache_sizes (int *level1, int *level2, int *level3) +{ + if (level1) { + *level1 = _orc_data_cache_size_level1; + } + if (level2) { + *level2 = _orc_data_cache_size_level2; + } + if (level3) { + *level3 = _orc_data_cache_size_level3; + } + +} + +void +orc_get_cpu_family_model_stepping (int *family, int *model, int *stepping) +{ + if (family) { + *family = _orc_cpu_family; + } + if (model) { + *model = _orc_cpu_model; + } + if (stepping) { + *stepping = _orc_cpu_stepping; + } +} + +const char * +orc_get_cpu_name (void) +{ + return _orc_cpu_name; +} + +void +orc_program_reset (OrcProgram *program) +{ + if (program->orccode) { + orc_code_free (program->orccode); + program->orccode = NULL; + } + if (program->asm_code) { + free(program->asm_code); + program->asm_code = NULL; + } +} + +OrcCode * +orc_program_take_code (OrcProgram *program) +{ + OrcCode *code = program->orccode; + program->orccode = NULL; + return code; +} + diff --git a/orc/orcprogram.h b/orc/orcprogram.h new file mode 100644 index 0000000..844f9ae --- /dev/null +++ b/orc/orcprogram.h @@ -0,0 +1,778 @@ + +#ifndef _ORC_PROGRAM_H_ +#define _ORC_PROGRAM_H_ + +#include + +typedef struct _OrcOpcodeExecutor OrcOpcodeExecutor; +typedef struct _OrcExecutor OrcExecutor; +typedef struct _OrcExecutorAlt OrcExecutorAlt; +typedef struct _OrcVariable OrcVariable; +typedef struct _OrcOpcodeSet OrcOpcodeSet; +typedef struct _OrcStaticOpcode OrcStaticOpcode; +typedef struct _OrcInstruction OrcInstruction; +typedef struct _OrcProgram OrcProgram; +typedef struct _OrcCompiler OrcCompiler; +typedef struct _OrcRule OrcRule; +typedef struct _OrcRuleSet OrcRuleSet; +typedef struct _OrcConstant OrcConstant; +typedef struct _OrcFixup OrcFixup; +typedef struct _OrcTarget OrcTarget; +typedef struct _OrcCode OrcCode; +typedef struct _OrcCodeChunk OrcCodeChunk; + +typedef void (*OrcOpcodeEmulateFunc)(OrcOpcodeExecutor *ex, void *user); +typedef void (*OrcOpcodeEmulateNFunc)(OrcOpcodeExecutor *ex, int index, int n); +typedef void (*OrcOpcodeEmulate16Func)(OrcOpcodeExecutor *ex); +typedef void (*OrcRuleEmitFunc)(OrcCompiler *p, void *user, OrcInstruction *insn); +typedef void (*OrcExecutorFunc)(OrcExecutor *ex); + +#define ORC_N_REGS (32*4) +#define ORC_N_INSNS 100 +#define ORC_N_VARIABLES 64 +#define ORC_N_ARRAYS 12 +#define ORC_N_REGISTERS 20 +#define ORC_N_FIXUPS 100 +#define ORC_N_CONSTANTS 20 +#define ORC_N_LABELS 40 +#define ORC_N_COMPILER_VARIABLES (ORC_N_VARIABLES+32) + +#define ORC_GP_REG_BASE 32 +#define ORC_VEC_REG_BASE 64 +#define ORC_REG_INVALID 0 + +#define ORC_STATIC_OPCODE_N_SRC 4 +#define ORC_STATIC_OPCODE_N_DEST 2 + +#define ORC_OPCODE_N_ARGS 4 +#define ORC_N_TARGETS 10 +#define ORC_N_RULE_SETS 10 + +#define ORC_MAX_VAR_SIZE 8 + +#define ORC_STRUCT_OFFSET(struct_type, member) \ + ((long) ((unsigned int *) &((struct_type*) 0)->member)) + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +#define ORC_ENABLE_ASM_CODE +#ifdef ORC_ENABLE_ASM_CODE +#define ORC_ASM_CODE(compiler,...) orc_compiler_append_code(compiler, __VA_ARGS__) +#else +#define ORC_ASM_CODE(compiler,...) +#endif + +#define ORC_PROGRAM_ERROR(program, ...) do { \ + program->error = TRUE; \ + orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA_ARGS__); \ +} while (0) + +#define ORC_COMPILER_ERROR(compiler, ...) do { \ + compiler->error = TRUE; \ + compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \ + orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA_ARGS__); \ +} while (0) + +enum { + ORC_TARGET_C_C99 = (1<<0), + ORC_TARGET_C_BARE = (1<<1), + ORC_TARGET_C_NOEXEC = (1<<2), + ORC_TARGET_C_OPCODE = (1<<3), + ORC_TARGET_CLEAN_COMPILE = (1<<29), + ORC_TARGET_FAST_NAN = (1<<30), + ORC_TARGET_FAST_DENORMAL = (1<<31) +}; + +enum { + ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) +}; + +enum { + ORC_TARGET_NEON_CLEAN_COMPILE = (1<<0), + ORC_TARGET_NEON_NEON = (1<<1), + ORC_TARGET_NEON_EDSP = (1<<2) +}; + +enum { + ORC_TARGET_ARM_EDSP = (1<<2), + ORC_TARGET_ARM_ARM6 = (1<<3) +}; + +typedef enum { + ORC_VAR_TYPE_TEMP, + ORC_VAR_TYPE_SRC, + ORC_VAR_TYPE_DEST, + ORC_VAR_TYPE_CONST, + ORC_VAR_TYPE_PARAM, + ORC_VAR_TYPE_ACCUMULATOR +} OrcVarType; + +enum { + ORC_VAR_D1, + ORC_VAR_D2, + ORC_VAR_D3, + ORC_VAR_D4, + ORC_VAR_S1, + ORC_VAR_S2, + ORC_VAR_S3, + ORC_VAR_S4, + ORC_VAR_S5, + ORC_VAR_S6, + ORC_VAR_S7, + ORC_VAR_S8, + ORC_VAR_A1, + ORC_VAR_A2, + ORC_VAR_A3, + ORC_VAR_A4, + ORC_VAR_C1, + ORC_VAR_C2, + ORC_VAR_C3, + ORC_VAR_C4, + ORC_VAR_C5, + ORC_VAR_C6, + ORC_VAR_C7, + ORC_VAR_C8, + ORC_VAR_P1, + ORC_VAR_P2, + ORC_VAR_P3, + ORC_VAR_P4, + ORC_VAR_P5, + ORC_VAR_P6, + ORC_VAR_P7, + ORC_VAR_P8, + ORC_VAR_T1, + ORC_VAR_T2, + ORC_VAR_T3, + ORC_VAR_T4, + ORC_VAR_T5, + ORC_VAR_T6, + ORC_VAR_T7, + ORC_VAR_T8, + ORC_VAR_T9, + ORC_VAR_T10, + ORC_VAR_T11, + ORC_VAR_T12, + ORC_VAR_T13, + ORC_VAR_T14, + ORC_VAR_T15, + ORC_VAR_T16 +}; + +enum { + ORC_CONST_ZERO, + ORC_CONST_SPLAT_B, + ORC_CONST_SPLAT_W, + ORC_CONST_SPLAT_L, + ORC_CONST_FULL +}; + +enum { + ORC_SAMPLE_REGULAR = 0, + ORC_SAMPLE_TRANSPOSED, + ORC_SAMPLE_NEAREST, + ORC_SAMPLE_BILINEAR, + ORC_SAMPLE_FOUR_TAP +}; + +enum { + ORC_PARAM_TYPE_INT = 0, + ORC_PARAM_TYPE_FLOAT, + ORC_PARAM_TYPE_INT64, + ORC_PARAM_TYPE_DOUBLE +}; + +typedef enum { + ORC_COMPILE_RESULT_OK = 0, + + ORC_COMPILE_RESULT_UNKNOWN_COMPILE = 0x100, + ORC_COMPILE_RESULT_MISSING_RULE = 0x101, + + ORC_COMPILE_RESULT_UNKNOWN_PARSE = 0x200, + ORC_COMPILE_RESULT_PARSE = 0x201, + ORC_COMPILE_RESULT_VARIABLE = 0x202 + +} OrcCompileResult; + +#define ORC_COMPILE_RESULT_IS_SUCCESSFUL(x) ((x) < 0x100) +#define ORC_COMPILE_RESULT_IS_FATAL(x) ((x) >= 0x200) + +/** + * OrcVariable: + * + * The OrcVariable structure has no public members + */ +struct _OrcVariable { + /*< private >*/ + char *name; + char *type_name; + + int size; + OrcVarType vartype; + + int used; + int first_use; + int last_use; + int replaced; + int replacement; + + int alloc; + int is_chained; + int is_aligned; + int is_uncached; + + orc_union64 value; + + int ptr_register; + int ptr_offset; + int mask_alloc; + int aligned_data; + int param_type; + int load_dest; + int update_type; + int need_offset_reg; +}; + +/** + * OrcRule: + * + * The OrcRule structure has no public members + */ +struct _OrcRule { + /*< private >*/ + OrcRuleEmitFunc emit; + void *emit_user; +}; + +/** + * OrcRuleSet: + * + * The OrcRuleSet structure has no public members + */ +struct _OrcRuleSet { + /*< private >*/ + int opcode_major; + int required_target_flags; + + OrcRule *rules; + int n_rules; +}; + +/** + * OrcOpcodeSet: + * + * The OrcOpcodeSet structure has no public members + */ +struct _OrcOpcodeSet { + /*< private >*/ + int opcode_major; + char prefix[8]; + + int n_opcodes; + OrcStaticOpcode *opcodes; +}; + +#define ORC_STATIC_OPCODE_ACCUMULATOR (1<<0) +#define ORC_STATIC_OPCODE_FLOAT_SRC (1<<1) +#define ORC_STATIC_OPCODE_FLOAT_DEST (1<<2) +#define ORC_STATIC_OPCODE_FLOAT (ORC_STATIC_OPCODE_FLOAT_SRC|ORC_STATIC_OPCODE_FLOAT_DEST) +#define ORC_STATIC_OPCODE_SCALAR (1<<3) +#define ORC_STATIC_OPCODE_LOAD (1<<4) +#define ORC_STATIC_OPCODE_STORE (1<<5) +#define ORC_STATIC_OPCODE_INVARIANT (1<<6) +#define ORC_STATIC_OPCODE_ITERATOR (1<<7) + + +struct _OrcStaticOpcode { + char name[16]; + unsigned int flags; + int dest_size[ORC_STATIC_OPCODE_N_DEST]; + int src_size[ORC_STATIC_OPCODE_N_SRC]; + OrcOpcodeEmulateNFunc emulateN; +}; + +/** + * OrcInstruction: + * + * The OrcInstruction structure has no public members + */ +struct _OrcInstruction { + /*< private >*/ + OrcStaticOpcode *opcode; + int dest_args[ORC_STATIC_OPCODE_N_DEST]; + int src_args[ORC_STATIC_OPCODE_N_SRC]; + + OrcRule *rule; + unsigned int flags; +}; + +#define ORC_INSTRUCTION_FLAG_X2 (1<<0) +#define ORC_INSTRUCTION_FLAG_X4 (1<<1) + +#define ORC_INSN_FLAG_INVARIANT (1<<2) +#define ORC_INSN_FLAG_ADDED (1<<3) + + +/** + * OrcConstant: + * + * The OrcConstant structure has no public members + */ +struct _OrcConstant { + /*< private >*/ + int type; + int alloc_reg; + unsigned int value; + unsigned int full_value[4]; + int use_count; + int is_long; +}; + +/** + * OrcFixup: + * + * The OrcFixup structure has no public members + */ +struct _OrcFixup { + /*< private >*/ + unsigned char *ptr; + int type; + int label; +}; + +/** + * OrcProgram: + * + * The OrcProgram structure has no public members + */ +struct _OrcProgram { + /*< private >*/ + struct { + OrcStaticOpcode *opcode; + int dest_args[ORC_STATIC_OPCODE_N_DEST]; + int src_args[ORC_STATIC_OPCODE_N_SRC]; + + OrcRule *rule; + } _unused[ORC_N_INSNS]; /* needed for ABI compatibility */ + int n_insns; + + struct { + char *name; + char *type_name; + + int size; + OrcVarType vartype; + + int used; + int first_use; + int last_use; + int replaced; + int replacement; + + int alloc; + int is_chained; + int is_aligned; + int is_uncached; + + int value; + + int ptr_register; + int ptr_offset; + int mask_alloc; + int aligned_data; + int param_type; + int load_dest; + } _unused3[ORC_N_VARIABLES]; /* needed for ABI compatibility */ + + int n_src_vars; + int n_dest_vars; + int n_param_vars; + int n_const_vars; + int n_temp_vars; + int n_accum_vars; + + char *name; + char *asm_code; + + unsigned char *_unused2; + /* The offset of code_exec in this structure is part of the ABI */ + void *code_exec; + + OrcInstruction insns[ORC_N_INSNS]; + OrcVariable vars[ORC_N_VARIABLES]; + + void *backup_func; + int is_2d; + int constant_n; + int constant_m; + + OrcCode *orccode; + + /* Hide this here. Belongs in a Parser object */ + char *init_function; +}; + +/** + * OrcCompiler: + * + * The OrcCompiler structure has no public members + */ +struct _OrcCompiler { + /*< private >*/ + OrcProgram *program; + OrcTarget *target; + + unsigned int target_flags; + + OrcInstruction insns[ORC_N_INSNS]; + int n_insns; + + OrcVariable vars[ORC_N_COMPILER_VARIABLES]; + int n_temp_vars; + int n_dup_vars; + + unsigned char *code; + unsigned char *codeptr; + + OrcConstant constants[ORC_N_CONSTANTS]; + int n_constants; + + OrcFixup fixups[ORC_N_FIXUPS]; + int n_fixups; + unsigned char *labels[ORC_N_LABELS]; + int n_labels; + + int error; + OrcCompileResult result; + + int valid_regs[ORC_N_REGS]; + int save_regs[ORC_N_REGS]; + int used_regs[ORC_N_REGS]; + int alloc_regs[ORC_N_REGS]; + + int loop_shift; + int long_jumps; + int use_frame_pointer; + + char *asm_code; + int asm_code_len; + + int is_64bit; + int tmpreg; + int exec_reg; + int gp_tmpreg; + + int insn_index; + int unroll_index; + int need_mask_regs; + int unroll_shift; + + int alloc_loop_counter; + int allow_gp_on_stack; + int loop_counter; + int size_region; + int has_iterator_opcode; + + int offset; + int min_temp_reg; + int max_used_temp_reg; + + int insn_shift; /* used when emitting rules */ + int max_var_size; /* size of largest var */ +}; + +#define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc) +#define ORC_DEST_ARG(p,i,n) ((p)->vars[(i)->dest_args[(n)]].alloc) +#define ORC_SRC_TYPE(p,i,n) ((p)->vars[(i)->src_args[(n)]].vartype) +#define ORC_DEST_TYPE(p,i,n) ((p)->vars[(i)->dest_args[(n)]].vartype) +#define ORC_SRC_VAL(p,insn,n) ((p)->vars[(insn)->src_args[(n)]].value.i) +#define ORC_DEST_VAL(p,insn,n) ((p)->vars[(insn)->dest_args[(n)]].value.i) + +/** + * OrcOpcodeExecutor: + * + * The OrcOpcodeExecutor structure has no public members + */ +struct _OrcOpcodeExecutor { + /*< private >*/ + int src_values[ORC_STATIC_OPCODE_N_SRC]; + int dest_values[ORC_STATIC_OPCODE_N_DEST]; + + OrcOpcodeEmulateNFunc emulateN; + + void *src_ptrs[ORC_STATIC_OPCODE_N_SRC]; + void *dest_ptrs[ORC_STATIC_OPCODE_N_DEST]; + int shift; +}; + +/** + * OrcExecutor: + * + */ +struct _OrcExecutor { + /*< private >*/ + OrcProgram *program; + int n; + int counter1; + int counter2; + int counter3; + + void *arrays[ORC_N_VARIABLES]; + int params[ORC_N_VARIABLES]; + int accumulators[4]; + /* exec pointer is stored in arrays[ORC_VAR_A1] */ + /* row pointers are stored in arrays[i+ORC_VAR_C1] */ + /* the stride for arrays[x] is stored in params[x] */ + /* m is stored in params[ORC_VAR_A1] */ + /* m_index is stored in params[ORC_VAR_A2] */ + /* elapsed time is stored in params[ORC_VAR_A3] */ + /* high half of params is stored in params[ORC_VAR_T1..] */ +}; + +/* the alternate view of OrcExecutor */ +struct _OrcExecutorAlt { + /*< private >*/ + OrcProgram *program; + int n; + int counter1; + int counter2; + int counter3; + + void *arrays[ORC_N_ARRAYS]; + OrcExecutorFunc exec; + void *unused1[ORC_N_VARIABLES - ORC_N_ARRAYS - 1]; + int strides[ORC_N_ARRAYS]; + int m; + int m_index; + int time; + int unused2; + int unused4[8]; + int params[ORC_VAR_T1-ORC_VAR_P1]; + int params_hi[ORC_VAR_T1-ORC_VAR_P1]; + int unused3[ORC_N_VARIABLES - ORC_VAR_T9]; + int accumulators[4]; +}; +#define ORC_EXECUTOR_EXEC(ex) ((OrcExecutorFunc)((ex)->arrays[ORC_VAR_A1])) +#define ORC_EXECUTOR_M(ex) ((ex)->params[ORC_VAR_A1]) +#define ORC_EXECUTOR_M_INDEX(ex) ((ex)->params[ORC_VAR_A2]) +#define ORC_EXECUTOR_TIME(ex) ((ex)->params[ORC_VAR_A3]) + +typedef struct _OrcCodeVariable OrcCodeVariable; +struct _OrcCodeVariable { + /*< private >*/ + int vartype; + int size; + orc_union64 value; +}; + +struct _OrcCode { + /*< private >*/ + OrcCompileResult result; + char *name; + + /* for execution */ + OrcExecutorFunc exec; + unsigned char *code; + int code_size; + void *chunk; + + /* for emulation */ + int n_insns; + OrcInstruction *insns; + OrcCodeVariable *vars; + int is_2d; + int constant_n; + int constant_m; +}; + +/** + * OrcTarget: + * + */ +struct _OrcTarget { + const char *name; + orc_bool executable; + int data_register_offset; + + unsigned int (*get_default_flags)(void); + void (*compiler_init)(OrcCompiler *compiler); + void (*compile)(OrcCompiler *compiler); + + OrcRuleSet rule_sets[ORC_N_RULE_SETS]; + int n_rule_sets; + + const char * (*get_asm_preamble)(void); + void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value); + const char * (*get_flag_name)(int shift); + void (*flush_cache) (OrcCode *code); + void (*load_constant_long)(OrcCompiler *compiler, int reg, + OrcConstant *constant); + + void *_unused[5]; +}; + + +void orc_init (void); + +OrcProgram * orc_program_new (void); +OrcProgram * orc_program_new_ds (int size1, int size2); +OrcProgram * orc_program_new_dss (int size1, int size2, int size3); +OrcProgram * orc_program_new_as (int size1, int size2); +OrcProgram * orc_program_new_ass (int size1, int size2, int size3); +OrcStaticOpcode * orc_opcode_find_by_name (const char *name); +void orc_opcode_init (void); + +const char * orc_program_get_name (OrcProgram *program); +void orc_program_set_name (OrcProgram *program, const char *name); +void orc_program_set_2d (OrcProgram *program); +void orc_program_set_constant_n (OrcProgram *program, int n); +void orc_program_set_constant_m (OrcProgram *program, int m); + +void orc_program_append (OrcProgram *p, const char *opcode, int arg0, int arg1, int arg2); +void orc_program_append_2 (OrcProgram *program, const char *name, + unsigned int flags, int arg0, int arg1, int arg2, int arg3); +void orc_program_append_str (OrcProgram *p, const char *opcode, + const char * arg0, const char * arg1, const char * arg2); +void orc_program_append_str_2 (OrcProgram *program, const char *name, + unsigned int flags, const char *arg1, const char *arg2, const char *arg3, + const char *arg4); +void orc_program_append_ds (OrcProgram *program, const char *opcode, int arg0, + int arg1); +void orc_program_append_ds_str (OrcProgram *p, const char *opcode, + const char * arg0, const char * arg1); +void orc_program_append_dds_str (OrcProgram *program, const char *name, + const char *arg1, const char *arg2, const char *arg3); + +void orc_mmx_init (void); +void orc_sse_init (void); +void orc_arm_init (void); +void orc_powerpc_init (void); +void orc_c_init (void); +void orc_neon_init (void); +void orc_c64x_init (void); +void orc_c64x_c_init (void); + +OrcCompileResult orc_program_compile (OrcProgram *p); +OrcCompileResult orc_program_compile_for_target (OrcProgram *p, OrcTarget *target); +OrcCompileResult orc_program_compile_full (OrcProgram *p, OrcTarget *target, + unsigned int flags); +void orc_program_set_backup_function (OrcProgram *p, OrcExecutorFunc func); +void orc_program_free (OrcProgram *program); + +int orc_program_find_var_by_name (OrcProgram *program, const char *name); + +int orc_program_add_temporary (OrcProgram *program, int size, const char *name); +int orc_program_dup_temporary (OrcProgram *program, int i, int j); +int orc_program_add_source (OrcProgram *program, int size, const char *name); +int orc_program_add_destination (OrcProgram *program, int size, const char *name); +int orc_program_add_constant (OrcProgram *program, int size, int value, const char *name); +int orc_program_add_constant_int64 (OrcProgram *program, int size, orc_int64 value, const char *name); +int orc_program_add_constant_float (OrcProgram *program, int size, float value, const char *name); +int orc_program_add_constant_double (OrcProgram *program, int size, double value, const char *name); +int orc_program_add_constant_str (OrcProgram *program, int size, const char *value, const char *name); +int orc_program_add_parameter (OrcProgram *program, int size, const char *name); +int orc_program_add_parameter_float (OrcProgram *program, int size, const char *name); +int orc_program_add_parameter_double (OrcProgram *program, int size, const char *name); +int orc_program_add_parameter_int64 (OrcProgram *program, int size, const char *name); +int orc_program_add_accumulator (OrcProgram *program, int size, const char *name); +void orc_program_set_type_name (OrcProgram *program, int var, const char *type_name); +void orc_program_set_sampling_type (OrcProgram *program, int var, int sampling_type); + +OrcExecutor * orc_executor_new (OrcProgram *program); +void orc_executor_free (OrcExecutor *ex); +void orc_executor_set_program (OrcExecutor *ex, OrcProgram *program); +void orc_executor_set_array (OrcExecutor *ex, int var, void *ptr); +void orc_executor_set_stride (OrcExecutor *ex, int var, int stride); +void orc_executor_set_array_str (OrcExecutor *ex, const char *name, void *ptr); +void orc_executor_set_param (OrcExecutor *ex, int var, int value); +void orc_executor_set_param_str (OrcExecutor *ex, const char *name, int value); +void orc_executor_set_param_float (OrcExecutor *ex, int var, float value); +void orc_executor_set_param_int64 (OrcExecutor *ex, int var, orc_int64 value); +void orc_executor_set_param_double (OrcExecutor *ex, int var, double value); +int orc_executor_get_accumulator (OrcExecutor *ex, int var); +int orc_executor_get_accumulator_str (OrcExecutor *ex, const char *name); +void orc_executor_set_n (OrcExecutor *ex, int n); +void orc_executor_set_m (OrcExecutor *ex, int m); +void orc_executor_emulate (OrcExecutor *ex); +void orc_executor_run (OrcExecutor *ex); +void orc_executor_run_backup (OrcExecutor *ex); + +OrcOpcodeSet *orc_opcode_set_get (const char *name); +OrcOpcodeSet *orc_opcode_set_get_nth (int opcode_major); +int orc_opcode_set_find_by_name (OrcOpcodeSet *opcode_set, const char *name); +int orc_opcode_register_static (OrcStaticOpcode *sopcode, char *prefix); + +OrcRuleSet * orc_rule_set_new (OrcOpcodeSet *opcode_set, OrcTarget *target, + unsigned int required_flags); +void orc_rule_register (OrcRuleSet *rule_set, const char *opcode_name, + OrcRuleEmitFunc emit, void *emit_user); +OrcRule * orc_target_get_rule (OrcTarget *target, OrcStaticOpcode *opcode, + unsigned int target_flags); +OrcTarget * orc_target_get_default (void); +unsigned int orc_target_get_default_flags (OrcTarget *target); +const char * orc_target_get_name (OrcTarget *target); +const char * orc_target_get_flag_name (OrcTarget *target, int shift); + +int orc_program_allocate_register (OrcProgram *program, int is_data); + +void orc_code_allocate_codemem (OrcCode *code, int size); +int orc_compiler_label_new (OrcCompiler *compiler); +int orc_compiler_get_constant (OrcCompiler *compiler, int size, int value); +int orc_compiler_get_constant_long (OrcCompiler *compiler, orc_uint32 a, + orc_uint32 b, orc_uint32 c, orc_uint32 d); +int orc_compiler_try_get_constant_long (OrcCompiler *compiler, orc_uint32 a, + orc_uint32 b, orc_uint32 c, orc_uint32 d); +int orc_compiler_get_temp_constant (OrcCompiler *compiler, int size, int value); +int orc_compiler_get_temp_reg (OrcCompiler *compiler); +int orc_compiler_get_constant_reg (OrcCompiler *compiler); + +void orc_program_reset (OrcProgram *program); +OrcCode *orc_program_take_code (OrcProgram *program); + +const char *orc_program_get_asm_code (OrcProgram *program); +const char *orc_target_get_asm_preamble (const char *target); +const char * orc_target_get_preamble (OrcTarget *target); +const char * orc_target_c_get_typedefs (void); + +void orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...) + ORC_GNU_PRINTF(2,3); + +void orc_target_register (OrcTarget *target); +OrcTarget *orc_target_get_by_name (const char *target_name); +int orc_program_get_max_array_size (OrcProgram *program); +int orc_program_get_max_accumulator_size (OrcProgram *program); + +void orc_get_data_cache_sizes (int *level1, int *level2, int *level3); +void orc_get_cpu_family_model_stepping (int *family, int *model, int *stepping); +const char * orc_get_cpu_name (void); + +OrcCode * orc_code_new (void); +void orc_code_free (OrcCode *code); + + +#ifdef ORC_ENABLE_UNSTABLE_API + +int orc_compiler_flag_check (const char *flag); + +extern int _orc_data_cache_size_level1; +extern int _orc_data_cache_size_level2; +extern int _orc_data_cache_size_level3; +extern int _orc_cpu_family; +extern int _orc_cpu_model; +extern int _orc_cpu_stepping; +extern const char *_orc_cpu_name; + +extern int _orc_compiler_flag_backup; +extern int _orc_compiler_flag_emulate; +extern int _orc_compiler_flag_debug; + +void orc_code_chunk_free (OrcCodeChunk *chunk); + +#endif + +#endif + diff --git a/orc/orcrule.c b/orc/orcrule.c new file mode 100644 index 0000000..4cd9910 --- /dev/null +++ b/orc/orcrule.c @@ -0,0 +1,37 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include + +/** + * SECTION:orcrule + * @title: OrcRule + * @short_description: Creating rules for code generation + */ + + +void +orc_rule_register (OrcRuleSet *rule_set, + const char *opcode_name, + OrcRuleEmitFunc emit, void *emit_user) +{ + int i; + OrcOpcodeSet *opcode_set; + + opcode_set = orc_opcode_set_get_nth (rule_set->opcode_major); + + i = orc_opcode_set_find_by_name (opcode_set, opcode_name); + if (i == -1) { + ORC_ERROR("failed to find opcode \"%s\"", opcode_name); + return; + } + + rule_set->rules[i].emit = emit; + rule_set->rules[i].emit_user = emit_user; +} + diff --git a/orc/orcrules-altivec.c b/orc/orcrules-altivec.c new file mode 100644 index 0000000..e86802c --- /dev/null +++ b/orc/orcrules-altivec.c @@ -0,0 +1,1199 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + + + +/* rules */ + +static void +powerpc_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int size = ORC_PTR_TO_INT(user); + + if (src->vartype == ORC_VAR_TYPE_PARAM) { + int greg = compiler->gp_tmpreg; + + powerpc_emit_addi (compiler, + greg, POWERPC_R3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]])); + ORC_ASM_CODE(compiler," lvewx %s, 0, %s\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (greg)); + powerpc_emit_X (compiler, 0x7c00008e, powerpc_regnum(dest->alloc), + 0, powerpc_regnum(greg)); + + ORC_ASM_CODE(compiler," lvsl %s, 0, %s\n", + powerpc_get_regname (POWERPC_V0), + powerpc_get_regname (greg)); + powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(POWERPC_V0), + 0, powerpc_regnum(greg)); + + powerpc_emit_vperm (compiler, dest->alloc, dest->alloc, dest->alloc, + POWERPC_V0); + switch (size) { + case 1: + ORC_ASM_CODE(compiler," vspltb %s, %s, 3\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (dest->alloc)); + powerpc_emit_VX (compiler, 0x1000020c, + powerpc_regnum(dest->alloc), 3, powerpc_regnum(dest->alloc)); + break; + case 2: + ORC_ASM_CODE(compiler," vsplth %s, %s, 1\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (dest->alloc)); + powerpc_emit_VX (compiler, 0x1000024c, + powerpc_regnum(dest->alloc), 1, powerpc_regnum(dest->alloc)); + break; + case 4: + ORC_ASM_CODE(compiler," vspltw %s, %s, 0\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (dest->alloc)); + powerpc_emit_VX (compiler, 0x1000028c, + powerpc_regnum(dest->alloc), 0, powerpc_regnum(dest->alloc)); + break; + } + } else { + int value = src->value.i; + + switch (size) { + case 1: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(compiler," vspltisb %s, %d\n", + powerpc_get_regname(dest->alloc), value&0x1f); + powerpc_emit_VX(compiler, 0x1000030c, + powerpc_regnum(dest->alloc), value & 0x1f, 0); + } else { + ORC_COMPILER_ERROR(compiler,"can't load constant"); + } + break; + case 2: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(compiler," vspltish %s, %d\n", + powerpc_get_regname(dest->alloc), value&0x1f); + powerpc_emit_VX(compiler, 0x1000034c, + powerpc_regnum(dest->alloc), value & 0x1f, 0); + } else { + ORC_COMPILER_ERROR(compiler,"can't load constant"); + } + break; + case 4: + if (value < 16 && value >= -16) { + ORC_ASM_CODE(compiler," vspltisw %s, %d\n", + powerpc_get_regname(dest->alloc), value&0x1f); + powerpc_emit_VX(compiler, 0x1000038c, + powerpc_regnum(dest->alloc), value & 0x1f, 0); + } else { + ORC_COMPILER_ERROR(compiler,"can't load constant"); + } + break; + } + } + +} + +static void +powerpc_rule_loadX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int size = src->size << compiler->loop_shift; + int perm = orc_compiler_get_temp_reg (compiler); + + switch (size) { + case 1: + ORC_ASM_CODE(compiler," lvebx %s, 0, %s\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (src->ptr_register)); + powerpc_emit_X (compiler, 0x7c00000e, powerpc_regnum(dest->alloc), + 0, powerpc_regnum(src->ptr_register)); + break; + case 2: + ORC_ASM_CODE(compiler," lvehx %s, 0, %s\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (src->ptr_register)); + powerpc_emit_X (compiler, 0x7c00004e, powerpc_regnum(dest->alloc), + 0, powerpc_regnum(src->ptr_register)); + break; + case 4: + ORC_ASM_CODE(compiler," lvewx %s, 0, %s\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (src->ptr_register)); + powerpc_emit_X (compiler, 0x7c00008e, powerpc_regnum(dest->alloc), + 0, powerpc_regnum(src->ptr_register)); + break; + case 8: + case 16: + ORC_ASM_CODE(compiler," lvx %s, 0, %s\n", + powerpc_get_regname (dest->alloc), + powerpc_get_regname (src->ptr_register)); + powerpc_emit_X (compiler, 0x7c0000ce, powerpc_regnum(dest->alloc), + 0, powerpc_regnum(src->ptr_register)); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + ORC_ASM_CODE(compiler," lvsl %s, 0, %s\n", + powerpc_get_regname (perm), + powerpc_get_regname (src->ptr_register)); + powerpc_emit_X (compiler, 0x7c00000c, powerpc_regnum(perm), + 0, powerpc_regnum(src->ptr_register)); + powerpc_emit_vperm (compiler, dest->alloc, dest->alloc, dest->alloc, perm); +} + +static void +powerpc_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int size = dest->size << compiler->loop_shift; + int perm = orc_compiler_get_temp_reg (compiler); + int tmp = orc_compiler_get_temp_reg (compiler); + + ORC_ASM_CODE(compiler," lvsr %s, 0, %s\n", + powerpc_get_regname (perm), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00004c, powerpc_regnum(perm), + 0, powerpc_regnum(dest->ptr_register)); + + powerpc_emit_vperm (compiler, tmp, src->alloc, src->alloc, perm); + + switch (size) { + case 1: + ORC_ASM_CODE(compiler," stvebx %s, 0, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00010e, + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + break; + case 2: + ORC_ASM_CODE(compiler," stvehx %s, 0, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00014e, + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + break; + case 4: + ORC_ASM_CODE(compiler," stvewx %s, 0, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00018e, + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + break; + case 8: + ORC_ASM_CODE(compiler," stvewx %s, 0, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00018e, + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + + powerpc_emit_D (compiler, "addi", 0x38000000, compiler->gp_tmpreg, + POWERPC_R0, 4); + + ORC_ASM_CODE(compiler," stvewx %s, %s, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (compiler->gp_tmpreg), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c00018e, + powerpc_regnum(tmp), + powerpc_regnum(compiler->gp_tmpreg), + powerpc_regnum(dest->ptr_register)); + break; + case 16: + ORC_ASM_CODE(compiler," stvx %s, 0, %s\n", + powerpc_get_regname (tmp), + powerpc_get_regname (dest->ptr_register)); + powerpc_emit_X (compiler, 0x7c0001ce, + powerpc_regnum(tmp), + 0, powerpc_regnum(dest->ptr_register)); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad store size %d", + dest->size << compiler->loop_shift); + break; + } +} + + + +#define RULE(name, opcode, code) \ +static void \ +powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + int src1 = ORC_SRC_ARG (p, insn, 0); \ + int src2 = ORC_SRC_ARG (p, insn, 1); \ + int dest = ORC_DEST_ARG (p, insn, 0); \ + powerpc_emit_VX_2 (p, opcode, code , dest, src1, src2);\ +} + +#define RULE_SHIFT(name, opcode, code) \ +static void \ +powerpc_rule_ ## name (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + int src1 = ORC_SRC_ARG (p, insn, 0); \ + int src2 = ORC_SRC_ARG (p, insn, 1); \ + int dest = ORC_DEST_ARG (p, insn, 0); \ + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { \ + ORC_ASM_CODE(p," vspltisb %s, %d\n", \ + powerpc_get_regname(p->tmpreg), (int)p->vars[insn->src_args[1]].value.i); \ + powerpc_emit_VX(p, 0x1000030c, \ + powerpc_regnum(p->tmpreg), (int)p->vars[insn->src_args[1]].value.i, 0); \ + powerpc_emit_VX_2 (p, opcode, code , dest, src1, p->tmpreg);\ + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { \ + ORC_COMPILER_ERROR(p,"rule only works with constants"); \ + powerpc_emit_VX_2 (p, opcode, code , dest, src1, src2);\ + } else { \ + ORC_COMPILER_ERROR(p,"rule only works with constants or params"); \ + } \ +} + +RULE(addb, "vaddubm", 0x10000000) +RULE(addssb, "vaddsbs", 0x10000300) +RULE(addusb, "vaddubs", 0x10000200) +RULE(andb, "vand", 0x10000404) +//RULE(andnb, "vandc", 0x10000444) +RULE(avgsb, "vavgsb", 0x10000502) +RULE(avgub, "vavgub", 0x10000402) +RULE(cmpeqb, "vcmpequb", 0x10000006) +RULE(cmpgtsb, "vcmpgtsb", 0x10000306) +RULE(maxsb, "vmaxsb", 0x10000102) +RULE(maxub, "vmaxub", 0x10000002) +RULE(minsb, "vminsb", 0x10000302) +RULE(minub, "vminub", 0x10000202) +RULE(orb, "vor", 0x10000484) +RULE_SHIFT(shlb, "vslb", 0x10000104) +RULE_SHIFT(shrsb, "vsrab", 0x10000304) +RULE_SHIFT(shrub, "vsrb", 0x10000204) +RULE(subb, "vsububm", 0x10000400) +RULE(subssb, "vsubsbs", 0x10000700) +RULE(subusb, "vsububs", 0x10000600) +RULE(xorb, "vxor", 0x100004c4) + +RULE(addw, "vadduhm", 0x10000040) +RULE(addssw, "vaddshs", 0x10000340) +RULE(addusw, "vadduhs", 0x10000240) +RULE(andw, "vand", 0x10000404) +//RULE(andnw, "vandc", 0x10000444) +RULE(avgsw, "vavgsh", 0x10000542) +RULE(avguw, "vavguh", 0x10000442) +RULE(cmpeqw, "vcmpequh", 0x10000046) +RULE(cmpgtsw, "vcmpgtsh", 0x10000346) +RULE(maxsw, "vmaxsh", 0x10000142) +RULE(maxuw, "vmaxuh", 0x10000042) +RULE(minsw, "vminsh", 0x10000342) +RULE(minuw, "vminuh", 0x10000242) +RULE(orw, "vor", 0x10000484) +RULE_SHIFT(shlw, "vslh", 0x10000144) +RULE_SHIFT(shrsw, "vsrah", 0x10000344) +RULE_SHIFT(shruw, "vsrh", 0x10000244) +RULE(subw, "vsubuhm", 0x10000440) +RULE(subssw, "vsubshs", 0x10000740) +RULE(subusw, "vsubuhs", 0x10000640) +RULE(xorw, "vxor", 0x100004c4) + +RULE(addl, "vadduwm", 0x10000080) +RULE(addssl, "vaddsws", 0x10000380) +RULE(addusl, "vadduws", 0x10000280) +RULE(andl, "vand", 0x10000404) +//RULE(andnl, "vandc", 0x10000444) +RULE(avgsl, "vavgsw", 0x10000582) +RULE(avgul, "vavguw", 0x10000482) +RULE(cmpeql, "vcmpequw", 0x10000086) +RULE(cmpgtsl, "vcmpgtsw", 0x10000386) +RULE(maxsl, "vmaxsw", 0x10000182) +RULE(maxul, "vmaxuw", 0x10000082) +RULE(minsl, "vminsw", 0x10000382) +RULE(minul, "vminuw", 0x10000282) +RULE(orl, "vor", 0x10000484) +RULE_SHIFT(shll, "vslw", 0x10000184) +RULE_SHIFT(shrsl, "vsraw", 0x10000384) +RULE_SHIFT(shrul, "vsrw", 0x10000284) +RULE(subl, "vsubuwm", 0x10000480) +RULE(subssl, "vsubsws", 0x10000780) +RULE(subusl, "vsubuws", 0x10000680) +RULE(xorl, "vxor", 0x100004c4) + +RULE(addf, "vaddfp", 0x1000000a) +RULE(subf, "vsubfp", 0x1000004a) +RULE(maxf, "vmaxfp", 0x1000040a) +RULE(minf, "vminfp", 0x1000044a) +RULE(cmpeqf, "vcmpeqfp", 0x100000c6) + +static void +powerpc_rule_andnX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vandc (p, dest, src2, src1); +} + +static void +powerpc_rule_copyX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vor (p, dest, src1, src1); +} + +static void +powerpc_rule_mullb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesb (p, dest, src1, src2); + powerpc_emit_vsldoi (p, dest, dest, dest, 1); +} + +static void +powerpc_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesb (p, dest, src1, src2); +} + +static void +powerpc_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmuleub (p, dest, src1, src2); +} + +static void +powerpc_rule_mullw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesh (p, dest, src1, src2); + powerpc_emit_vsldoi (p, dest, dest, dest, 2); +} + +static void +powerpc_rule_mulhsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesh (p, dest, src1, src2); +} + +static void +powerpc_rule_mulhuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmuleuh (p, dest, src1, src2); +} + +#ifdef alternate +static void +powerpc_rule_mullw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = POWERPC_V0; + + powerpc_emit_vxor (p, tmp, tmp, tmp); + powerpc_emit_vmladduhm (p, dest, src1, src2, POWERPC_V0); +} +#endif + +static void +powerpc_rule_convsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vupkhsb (p, dest, src1); +} + +static void +powerpc_rule_convswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vupkhsh (p, dest, src1); +} + +static void +powerpc_rule_convubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int reg = powerpc_get_constant (p, ORC_CONST_ZERO, 0); + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmrghb (p, dest, reg, src1); +} + +static void +powerpc_rule_convuwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int reg = powerpc_get_constant (p, ORC_CONST_ZERO, 0); + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmrghh (p, dest, reg, src1); +} + +static void +powerpc_rule_convssswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkshss (p, dest, src1, src1); +} + +static void +powerpc_rule_convssslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkswss (p, dest, src1, src1); +} + +static void +powerpc_rule_convsuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkshus (p, dest, src1, src1); +} + +static void +powerpc_rule_convsuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkswus (p, dest, src1, src1); +} + +static void +powerpc_rule_convuuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuhus (p, dest, src1, src1); +} + +static void +powerpc_rule_convuuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuwus (p, dest, src1, src1); +} + +static void +powerpc_rule_convwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuhum (p, dest, src1, src1); +} + +static void +powerpc_rule_convlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuwum (p, dest, src1, src1); +} + +static void +powerpc_rule_mulsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesb (p, dest, src1, src2); +} + +static void +powerpc_rule_mulubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmuleub (p, dest, src1, src2); +} + +static void +powerpc_rule_mulswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmulesh (p, dest, src1, src2); +} + +static void +powerpc_rule_muluwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmuleuh (p, dest, src1, src2); +} + +#if 0 +/* doesn't work */ +static void +powerpc_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vadduhm (p, dest, dest, src1); +} +#endif + +static void +powerpc_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vadduwm (p, dest, dest, src1); +} + +#if 0 +/* doesn't work */ +static void +powerpc_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmp1 = p->tmpreg; + int tmp2 = POWERPC_V31; + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vmaxub (p, tmp1, src1, src2); + powerpc_emit_vminub (p, tmp2, src1, src2); + powerpc_emit_vsububm (p, tmp1, tmp1, tmp2); + powerpc_emit_vsum4ubs (p, dest, dest, tmp1); +} +#endif + +static void +powerpc_rule_signb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int reg; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 1); + powerpc_emit_vminsb (p, dest, src1, reg); + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_B, -1); + powerpc_emit_vmaxsb (p, dest, dest, reg); +} + +static void +powerpc_rule_signw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int reg; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_W, 1); + powerpc_emit_vminsh(p, dest, src1, reg); + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_W, -1); + powerpc_emit_vmaxsh(p, dest, dest, reg); +} + +static void +powerpc_rule_signl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int reg; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 1); + powerpc_emit_vminsw (p, dest, src1, reg); + reg = powerpc_get_constant (p, ORC_CONST_SPLAT_L, -1); + powerpc_emit_vmaxsw (p, dest, dest, reg); +} + +static void +powerpc_rule_select0wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuhum (p, dest, src1, src1); +} + +static void +powerpc_rule_select1wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x00010405, 0x08090c0d, + 0x10111415, 0x18191c1d); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_select0lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_vpkuwum (p, dest, src1, src1); +} + +static void +powerpc_rule_select1lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x00010405, 0x08090c0d, + 0x10111415, 0x18191c1d); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_mergebw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x10001101, 0x12021303, + 0x14041505, 0x16061707); + powerpc_emit_vperm (p, dest, src1, src2, perm); +} + +static void +powerpc_rule_mergewl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x10110001, 0x12130203, + 0x14150405, 0x16170607); + powerpc_emit_vperm (p, dest, src1, src2, perm); +} + +static void +powerpc_rule_absb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmpc; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp; + + tmpc = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 0); + if (src1 != dest) { + tmp = dest; + } else { + tmp = orc_compiler_get_temp_reg (p); + } + powerpc_emit_VX_2 (p, "vsububm", 0x10000400, tmp, tmpc, src1); + powerpc_emit_vminub (p, dest, tmp, src1); +} + +static void +powerpc_rule_absw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmp; + int tmpc; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + tmpc = powerpc_get_constant (p, ORC_CONST_SPLAT_W, 0); + if (src1 != dest) { + tmp = dest; + } else { + tmp = orc_compiler_get_temp_reg (p); + } + powerpc_emit_VX_2 (p, "vsubuhm", 0x10000440, tmp, tmpc, src1); + powerpc_emit_VX_2 (p, "vminuh", 0x10000242, dest, tmp, src1); +} + +static void +powerpc_rule_absl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int tmp; + int tmpc; + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + tmpc = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0); + if (src1 != dest) { + tmp = dest; + } else { + tmp = orc_compiler_get_temp_reg (p); + } + powerpc_emit_VX_2 (p, "vsubuwm", 0x10000480, tmp, tmpc, src1); + powerpc_emit_VX_2 (p, "vminuw", 0x10000282, dest, tmp, src1); +} + +static void +powerpc_rule_splatw3q (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x00010001, 0x00010001, + 0x08090809, 0x08090809); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_splatbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_VX_2 (p, "vmrghb", 0x1000000c, dest, src1, src1); +} + +static void +powerpc_rule_splatbl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); +#if 0 + int perm; + + perm = powerpc_get_constant_full (p, 0x00000000, 0x01010101, + 0x02020202, 0x03030303); + powerpc_emit_vperm (p, dest, src1, src1, perm); +#else + powerpc_emit_VX_2 (p, "vmrghb", 0x1000000c, dest, src1, src1); + powerpc_emit_VX_2 (p, "vmrghh", 0x1000004c, dest, dest, dest); +#endif +} + +static void +powerpc_rule_convulq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + int zero; + + zero = powerpc_get_constant (p, ORC_CONST_SPLAT_B, 0); + perm = powerpc_get_constant_full (p, 0x10101010, 0x00010203, + 0x10101010, 0x04050607); + powerpc_emit_vperm (p, dest, src1, zero, perm); +} + +static void +powerpc_rule_convslq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + int tmp = orc_compiler_get_temp_reg (p); + + ORC_ASM_CODE(p," vspltisb %s, -1\n", powerpc_get_regname(tmp)); + powerpc_emit_VX(p, 0x1000030c, powerpc_regnum(tmp), 0x1f, 0); + + powerpc_emit_VX_2 (p, "vsraw", 0x10000384, tmp, src1, tmp); + + perm = powerpc_get_constant_full (p, 0x10101010, 0x00010203, + 0x10101010, 0x04050607); + powerpc_emit_vperm (p, dest, src1, tmp, perm); +} + +static void +powerpc_rule_convhwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x00020406, 0x080a0c0e, + 0x10121416, 0x181a1c1e); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_convhlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x00010405, 0x08090c0d, + 0x10111415, 0x18191c1d); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_convql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x04050607, 0x0c0d0e0f, + 0x14151617, 0x1c1d1e1f); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_swapw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x01000302, 0x05040706, + 0x09080b0a, 0x0d0c0f0e); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_swapl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int perm; + + perm = powerpc_get_constant_full (p, 0x03020100, 0x07060504, + 0x0b0a0908, 0x0f0e0d0c); + powerpc_emit_vperm (p, dest, src1, src1, perm); +} + +static void +powerpc_rule_splitlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest1 = ORC_DEST_ARG (p, insn, 0); + int dest2 = ORC_DEST_ARG (p, insn, 1); + int perm; + + powerpc_emit_vpkuwum (p, dest2, src1, src1); + perm = powerpc_get_constant_full (p, 0x00010405, 0x08090c0d, + 0x10111415, 0x18191c1d); + powerpc_emit_vperm (p, dest1, src1, src1, perm); +} + +static void +powerpc_rule_splitwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest1 = ORC_DEST_ARG (p, insn, 0); + int dest2 = ORC_DEST_ARG (p, insn, 1); + int perm; + + powerpc_emit_vpkuhum (p, dest2, src1, src1); + perm = powerpc_get_constant_full (p, 0x00020406, 0x080a0c0e, + 0x10121416, 0x181a1c1e); + powerpc_emit_vperm (p, dest1, src1, src1, perm); +} + +static void +powerpc_rule_mulf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp; + + tmp = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0x80000000); + powerpc_emit_VA_acb (p, "vmaddfp", 0x1000002e, dest, src1, tmp, src2); +} + +static void +powerpc_rule_divf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int y = orc_compiler_get_temp_reg (p); + int t = orc_compiler_get_temp_reg (p); + int c1; + int c0; + + c1 = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0x3f800000); /* 1.0 */ + + powerpc_emit_VX_db (p, "vrefp", 0x1000010a, y, src2); + + powerpc_emit_VA_acb (p, "vnmsubfp", 0x1000002f, t, y, c1, src2); + powerpc_emit_VA_acb (p, "vmaddfp", 0x1000002e, y, y, y, t); + + c0 = powerpc_get_constant (p, ORC_CONST_SPLAT_L, 0x00000000); /* 0.0 */ + powerpc_emit_VA_acb (p, "vmaddfp", 0x1000002e, dest, y, c0, src1); +} + +static void +powerpc_rule_cmpltf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_VXR (p, "vcmpgefp", 0x100001c6, dest, src2, src1, FALSE); +} + +static void +powerpc_rule_cmplef (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_VXR (p, "vcmpgtfp", 0x100002c6, dest, src2, src1, FALSE); +} + +static void +powerpc_rule_convfl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + //powerpc_emit_VX_db (p, "vrfin", 0x1000020a, dest, src1); + powerpc_emit_VX_dbi (p, "vctsxs", 0x100003ca, dest, src1, 0); +} + +static void +powerpc_rule_convlf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + powerpc_emit_VX_dbi (p, "vcfsx", 0x1000034a, dest, src1, 0); +} + +static void +powerpc_rule_div255w (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = powerpc_get_constant (p, ORC_CONST_SPLAT_W, 0x0080); + powerpc_emit_VX_2 (p, "vadduhm", 0x10000040, dest, src1, tmpc); + + ORC_ASM_CODE(p," vspltish %s, 8\n", powerpc_get_regname(tmp2)); + powerpc_emit_VX(p, 0x1000034c, powerpc_regnum(tmp2), 8, 0); + + powerpc_emit_VX_2 (p, "vsrw", 0x10000284, tmp, dest, tmp2); + powerpc_emit_VX_2 (p, "vadduhm", 0x10000040, dest, dest, tmp); + powerpc_emit_VX_2 (p, "vsrw", 0x10000284, dest, dest, tmp2); +} + +void +orc_compiler_powerpc_register_rules (OrcTarget *target) +{ + OrcRuleSet *rule_set; + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, 0); + +#define REG(name) \ + orc_rule_register (rule_set, #name , powerpc_rule_ ## name , NULL); + + REG(addb); + REG(addssb); + REG(addusb); + REG(andb); + REG(avgsb); + REG(avgub); + REG(cmpeqb); + REG(cmpgtsb); + REG(maxsb); + REG(maxub); + REG(minsb); + REG(minub); + REG(orb); + REG(shlb); + REG(shrsb); + REG(shrub); + REG(subb); + REG(subssb); + REG(subusb); + REG(xorb); + + REG(addw); + REG(addssw); + REG(addusw); + REG(andw); + REG(avgsw); + REG(avguw); + REG(cmpeqw); + REG(cmpgtsw); + REG(maxsw); + REG(maxuw); + REG(minsw); + REG(minuw); + REG(orw); + REG(shlw); + REG(shrsw); + REG(shruw); + REG(subw); + REG(subssw); + REG(subusw); + REG(xorw); + + REG(addl); + REG(addssl); + REG(addusl); + REG(andl); + REG(avgsl); + REG(avgul); + REG(cmpeql); + REG(cmpgtsl); + REG(maxsl); + REG(maxul); + REG(minsl); + REG(minul); + REG(orl); + REG(shll); + REG(shrsl); + REG(shrul); + REG(subl); + REG(subssl); + REG(subusl); + REG(xorl); + + REG(mullb); + REG(mulhsb); + REG(mulhub); + REG(mullw); + REG(mulhsw); + REG(mulhuw); + + REG(convsbw); + REG(convswl); + REG(convubw); + REG(convuwl); + REG(convssswb); + REG(convssslw); + REG(convsuswb); + REG(convsuslw); + REG(convuuswb); + REG(convuuslw); + REG(convwb); + REG(convlw); + + REG(mulsbw); + REG(mulubw); + REG(mulswl); + REG(muluwl); + + //REG(accw); + REG(accl); + //REG(accsadubl); + + REG(signb); + REG(signw); + REG(signl); + + REG(select0wb); + REG(select1wb); + REG(select0lw); + REG(select1lw); + REG(mergebw); + REG(mergewl); + + REG(absb); + REG(absw); + REG(absl); + REG(splatw3q); + REG(splatbw); + REG(splatbl); + REG(convslq); + REG(convulq); + REG(convhwb); + REG(convhlw); + REG(convql); + REG(swapw); + REG(swapl); + REG(splitlw); + REG(splitwb); + REG(div255w); + + REG(addf); + REG(subf); + REG(minf); + REG(maxf); + REG(cmpeqf); + REG(cmplef); + REG(cmpltf); + REG(mulf); + if (0) REG(divf); /* not accurate enough */ + REG(convfl); + REG(convlf); + + orc_rule_register (rule_set, "loadpb", powerpc_rule_loadpX, (void *)1); + orc_rule_register (rule_set, "loadpw", powerpc_rule_loadpX, (void *)2); + orc_rule_register (rule_set, "loadpl", powerpc_rule_loadpX, (void *)4); + orc_rule_register (rule_set, "loadb", powerpc_rule_loadX, NULL); + orc_rule_register (rule_set, "loadw", powerpc_rule_loadX, NULL); + orc_rule_register (rule_set, "loadl", powerpc_rule_loadX, NULL); + orc_rule_register (rule_set, "loadq", powerpc_rule_loadX, NULL); + orc_rule_register (rule_set, "storeb", powerpc_rule_storeX, NULL); + orc_rule_register (rule_set, "storew", powerpc_rule_storeX, NULL); + orc_rule_register (rule_set, "storel", powerpc_rule_storeX, NULL); + orc_rule_register (rule_set, "storeq", powerpc_rule_storeX, NULL); + + orc_rule_register (rule_set, "andnb", powerpc_rule_andnX, NULL); + orc_rule_register (rule_set, "andnw", powerpc_rule_andnX, NULL); + orc_rule_register (rule_set, "andnl", powerpc_rule_andnX, NULL); + + orc_rule_register (rule_set, "copyb", powerpc_rule_copyX, NULL); + orc_rule_register (rule_set, "copyw", powerpc_rule_copyX, NULL); + orc_rule_register (rule_set, "copyl", powerpc_rule_copyX, NULL); + +} + diff --git a/orc/orcrules-arm.c b/orc/orcrules-arm.c new file mode 100644 index 0000000..b5b0e76 --- /dev/null +++ b/orc/orcrules-arm.c @@ -0,0 +1,1718 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +#define BINARY_DP(opcode,insn_name) \ +static void \ +arm_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + int src1 = ORC_SRC_ARG (p, insn, 0); \ + int src2 = ORC_SRC_ARG (p, insn, 1); \ + int dest = ORC_DEST_ARG (p, insn, 0); \ + \ + orc_arm_emit_ ##insn_name## _r (p, ORC_ARM_COND_AL, 0, \ + dest, src1, src2); \ +} + +#define BINARY_MM(opcode,insn_name) \ +static void \ +arm_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + int src1 = ORC_SRC_ARG (p, insn, 0); \ + int src2 = ORC_SRC_ARG (p, insn, 1); \ + int dest = ORC_DEST_ARG (p, insn, 0); \ + \ + orc_arm_emit_##insn_name (p, ORC_ARM_COND_AL, dest, src1, src2); \ +} + +/* multiplies */ +#define orc_arm_smulxy(cond,x,y,Rd,Rm,Rs) (0x01600080|((cond)<<28)|(((Rd)&15)<<16)|(((Rs)&15)<<8)|((y)<<6)|((x)<<5)|((Rm)&15)) +#define orc_arm_emit_smulbb(p,cond,Rd,Rm,Rs) do { \ + ORC_ASM_CODE (p, "smulbb %s, %s, %s\n", orc_arm_reg_name (Rd), \ + orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \ + orc_arm_emit (p, orc_arm_smulxy (cond,0,0,Rd,Rm,Rs)); \ +} while (0) +#define orc_arm_emit_smulbt(p,cond,Rd,Rm,Rs) do { \ + ORC_ASM_CODE (p, "smulbt %s, %s, %s\n", orc_arm_reg_name (Rd), \ + orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \ + orc_arm_emit (p, orc_arm_smulxy (cond,0,1,Rd,Rm,Rs)); \ +} while (0) +#define orc_arm_emit_smultb(p,cond,Rd,Rm,Rs) do { \ + ORC_ASM_CODE (p, "smultb %s, %s, %s\n", orc_arm_reg_name (Rd), \ + orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \ + orc_arm_emit (p, orc_arm_smulxy (cond,1,0,Rd,Rm,Rs)); \ +} while (0) +#define orc_arm_emit_smultt(p,cond,Rd,Rm,Rs) do { \ + ORC_ASM_CODE (p, "smultt %s, %s, %s\n", orc_arm_reg_name (Rd), \ + orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \ + orc_arm_emit (p, orc_arm_smulxy (cond,1,1,Rd,Rm,Rs)); \ +} while (0) + +#define orc_arm_mul(cond,S,Rd,Rm,Rs) (0x00000090|((cond)<<28)|((S)<<20)|(((Rd)&15)<<16)|(((Rs)&15)<<8)|((Rm)&15)) +#define orc_arm_emit_mul(p,cond,S,Rd,Rm,Rs) do { \ + ORC_ASM_CODE (p, "mul %s, %s, %s\n", orc_arm_reg_name (Rd), \ + orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \ + orc_arm_emit (p, orc_arm_mul (cond,S,Rd,Rm,Rs)); \ +} while (0) + +#define orc_arm_mull(op,cond,S,RdL,RdH,Rn,Rm) (op|((cond)<<28)|((S)<<20)|(((Rn)&15)<<16)|(((RdL)&15)<<12)|(((RdH)&15)<<8)|((Rm)&15)) +#define orc_arm_emit_smull(p,cond,S,RdL,RdH,Rn,Rm) do { \ + ORC_ASM_CODE (p, "smull %s, %s, %s, %s\n", orc_arm_reg_name (RdL), \ + orc_arm_reg_name (RdH), \ + orc_arm_reg_name (Rn), orc_arm_reg_name(Rm)); \ + orc_arm_emit(p,orc_arm_mull (0x00c00090,cond,S,RdL,Rm,RdH,Rn)); \ +} while (0) +#define orc_arm_emit_umull(p,cond,S,RdL,RdH,Rn,Rm) do { \ + ORC_ASM_CODE (p, "umull %s, %s, %s, %s\n", orc_arm_reg_name (RdL), \ + orc_arm_reg_name (RdH), \ + orc_arm_reg_name (Rn), orc_arm_reg_name(Rm)); \ + orc_arm_emit(p,orc_arm_mull (0x00800090,cond,S,RdL,RdH,Rn,Rm)); \ +} while (0) + +static void +arm_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + if (compiler->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_CONST) { + orc_arm_emit_load_imm (compiler, compiler->vars[insn->dest_args[0]].alloc, + (int)compiler->vars[insn->src_args[0]].value.i); + } else { + orc_arm_loadw (compiler, compiler->vars[insn->dest_args[0]].alloc, + compiler->exec_reg, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]])); + } +} + +static void +arm_rule_loadX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + int src = compiler->vars[insn->src_args[0]].ptr_register; + int dest = compiler->vars[insn->dest_args[0]].alloc; + int size; + orc_uint32 code; + int offset = 0; + + size = (compiler->vars[insn->src_args[0]].size << compiler->loop_shift); + + if (size == 4) { + code = 0xe5900000; + ORC_ASM_CODE(compiler," ldr %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src), offset); + } else if (size == 2) { + code = 0xe1d000b0; + ORC_ASM_CODE(compiler," ldrh %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src), offset); + } else { + code = 0xe5d00000; + ORC_ASM_CODE(compiler," ldrb %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src), offset); + } + code |= (src&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + orc_arm_emit (compiler, code); +} + +static void +arm_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + int src = compiler->vars[insn->src_args[0]].alloc; + int dest = compiler->vars[insn->dest_args[0]].ptr_register; + int size; + orc_uint32 code; + int offset = 0; + + size = (compiler->vars[insn->src_args[0]].size << compiler->loop_shift); + + if (size == 4) { + code = 0xe5800000; + ORC_ASM_CODE(compiler," str %s, [%s, #%d]\n", + orc_arm_reg_name (src), + orc_arm_reg_name (dest), offset); + } else if (size == 2) { + code = 0xe1c000b0; + ORC_ASM_CODE(compiler," strh %s, [%s, #%d]\n", + orc_arm_reg_name (src), + orc_arm_reg_name (dest), offset); + } else { + code = 0xe5c00000; + ORC_ASM_CODE(compiler," strb %s, [%s, #%d]\n", + orc_arm_reg_name (src), + orc_arm_reg_name (dest), offset); + } + code |= (dest&0xf) << 16; + code |= (src&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + orc_arm_emit (compiler, code); +} + +void +orc_arm_loadb (OrcCompiler *compiler, int dest, int src1, int offset) +{ + orc_uint32 code; + + code = 0xe5d00000; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," ldrb %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_storeb (OrcCompiler *compiler, int dest, int offset, int src1) +{ + orc_uint32 code; + + code = 0xe5c00000; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," strb %s, [%s, #%d]\n", + orc_arm_reg_name (src1), + orc_arm_reg_name (dest), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_loadl (OrcCompiler *compiler, int dest, int src1, int offset) +{ + orc_uint32 code; + + code = 0xe5900000; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," ldr %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_storel (OrcCompiler *compiler, int dest, int offset, int src1) +{ + orc_uint32 code; + + code = 0xe5800000; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," str %s, [%s, #%d]\n", + orc_arm_reg_name (src1), + orc_arm_reg_name (dest), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_loadw (OrcCompiler *compiler, int dest, int src1, int offset) +{ + orc_uint32 code; + + code = 0xe1d000b0; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," ldrh %s, [%s, #%d]\n", + orc_arm_reg_name (dest), + orc_arm_reg_name (src1), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_storew (OrcCompiler *compiler, int dest, int offset, int src1) +{ + orc_uint32 code; + + code = 0xe1c000b0; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= (offset&0xf0) << 4; + code |= offset&0x0f; + + ORC_ASM_CODE(compiler," strh %s, [%s, #%d]\n", + orc_arm_reg_name (src1), + orc_arm_reg_name (dest), offset); + orc_arm_emit (compiler, code); +} + +void +orc_arm_emit_mov_iw (OrcCompiler *p, int cond, int dest, int val, int loop) +{ + /* dest = val */ + orc_arm_emit_mov_i (p, cond, 0, dest, val); + if (loop > 1) + /* 2 words: dest |= dest << 16 */ + orc_arm_emit_orr_rsi (p, cond, 0, dest, dest, dest, ORC_ARM_LSL, 16); +} + +void +orc_arm_emit_mov_ib (OrcCompiler *p, int cond, int dest, int val, int loop) +{ + /* 1 byte */ + orc_arm_emit_mov_i (p, cond, 0, dest, val); + if (loop > 1) + /* 2 bytes: dest |= dest << 8 */ + orc_arm_emit_orr_rsi (p, cond, 0, dest, dest, dest, ORC_ARM_LSL, 8); + if (loop > 2) + /* 4 bytes: dest |= dest << 16 */ + orc_arm_emit_orr_rsi (p, cond, 0, dest, dest, dest, ORC_ARM_LSL, 16); +} + +/* byte instructions */ +static void +arm_rule_absX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int type = ORC_PTR_TO_INT(user); + + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, dest, 0); + + if (type == 0) { + /* negate tmp = 0 - src1 */ + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, tmp, dest, src1); + /* check sign dest = src1 - 0 */ + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, src1, dest); + } else { + /* negate tmp = 0 - src1 */ + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, tmp, dest, src1); + /* check sign dest = src1 - 0 */ + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, src1, dest); + } + /* take positive or negative values */ + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src1, tmp); +} +BINARY_MM (addb, sadd8); +BINARY_MM (addssb, qadd8); +BINARY_MM (addusb, uqadd8); +BINARY_DP (andX, and); + +static void +arm_rule_andnX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_bic_r (p, ORC_ARM_COND_AL, 0, dest, src2, src1); +} + +static void +arm_rule_avgX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int mask = p->tmpreg; + int tmp = p->gp_tmpreg; + int dest = ORC_DEST_ARG (p, insn, 0); + int type = ORC_PTR_TO_INT(user); + + /* signed variant, make a mask, FIXME, instruction constants */ + if (type >= 2) { + /* mask for word 0x80008000 */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, mask, 0x80000000); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, mask, mask, mask, ORC_ARM_LSR, 16); + + if (type >= 3) { + /* mask for byte 0x80808080 */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, mask, mask, mask, ORC_ARM_LSR, 8); + } + + /* signed variant, bias the inputs */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, src1, src1, mask); + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, src2, src2, mask); + } + + /* dest = (s1 | s2) - (((s1 ^ s2) & ~(0x1 >>> (shift*2))) >> 1) */ + /* (s1 | s2) */ + orc_arm_emit_orr_r (p, ORC_ARM_COND_AL, 0, tmp, src1, src2); + /* (s1 ^ s2) */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, dest, src1, src2); + + /* clear the bits we will shift into view in the next instruction, FIXME, we + * need instruction wide constants */ + if (type <= 1) { + /* clear 0x00010000 */ + orc_arm_emit_bic_i (p, ORC_ARM_COND_AL, 0, dest, dest, 0x00010000); + if (type == 0) { + /* clear 0x00000100 */ + orc_arm_emit_bic_i (p, ORC_ARM_COND_AL, 0, dest, dest, 0x00000100); + /* clear 0x01000000 */ + orc_arm_emit_bic_i (p, ORC_ARM_COND_AL, 0, dest, dest, 0x01000000); + } + } else if (type >= 2) { + /* already have a mask, use it here */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, mask, ORC_ARM_LSR, 7); + } + + /* do final right shift and subtraction */ + orc_arm_emit_sub_rsi (p, ORC_ARM_COND_AL, 0, dest, tmp, dest, ORC_ARM_LSR, 1); + + if (type >= 2) { + /* signed variant, unbias input again */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, src1, src1, mask); + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, src2, src2, mask); + } +} +static void +arm_rule_cmpeqX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int size = ORC_PTR_TO_INT(user); + + /* bytes that are equal will have all bits 0 */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_AL, 0, tmp, src1, src2); + + /* clear dest register */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, dest, 0); + + /* tmp = 0 - tmp, set GE flags for 0 bytes */ + if (size == 1) { + orc_arm_emit_usub8 (p, ORC_ARM_COND_AL, tmp, dest, tmp); + } else { + orc_arm_emit_usub16 (p, ORC_ARM_COND_AL, tmp, dest, tmp); + } + + /* make 0xffffffff in tmp */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_AL, 0, tmp, 0); + + /* set 0xff for 0 bytes, 0x00 otherwise */ + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, tmp, dest); +} +static void +arm_rule_cmpgtsX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int size = ORC_PTR_TO_INT(user); + + /* dest = src2 - src1, set GE flags for src2 >= src1 */ + if (size == 1) { + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, src2, src1); + } else { + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, src2, src1); + } + + /* clear dest register */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, dest, 0); + /* make 0xffffffff in tmp */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_AL, 0, tmp, 0); + + /* set 0x00 for src2 >= src1 bytes, 0xff if src2 < src1 */ + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, dest, tmp); +} +static void +arm_rule_copyX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_mov_r (p, ORC_ARM_COND_AL, 0, dest, src1); +} + +static void +arm_rule_maxsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src1, src2); +} +static void +arm_rule_maxub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_usub8 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src1, src2); +} +static void +arm_rule_minsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src2, src1); +} +static void +arm_rule_minub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_usub8 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src2, src1); +} + +static void +arm_rule_mullb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int tmp3 = ORC_ARM_V8; + int loop = 1; + + /* extract and multiply first item */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp2, src2); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, tmp1, tmp2); + + if (loop > 1) { + if (loop > 2) { + /* third item, reuse extracted bits for first item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with first */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, dest, tmp1, 16); + } + /* clear upper bits */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + + /* extract and multiply second item */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 8); + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 8); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, tmp3, tmp1, tmp2); + + if (loop > 2) { + /* forth item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with second */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, tmp3, tmp3, tmp1, 16); + } + /* clear upper bits */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp3, tmp3); + + /* merge results */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp3, ORC_ARM_LSL, 8); + } +} + +static void +arm_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_SB(mulhsb, "(%s * %s) >> 8") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int tmp3 = ORC_ARM_V8; + int loop = 1; + + /* first item (and third) */ + orc_arm_emit_sxtb16 (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_sxtb16 (p, ORC_ARM_COND_AL, tmp2, src2); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, tmp1, tmp2); + + if (loop > 1) { + if (loop > 2) { + /* third item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with first */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, dest, tmp1, 16); + } + /* extract upper bits */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, dest, dest, 8); + + /* second item (and fourth) */ + orc_arm_emit_sxtb16_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 8); + orc_arm_emit_sxtb16_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 8); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, tmp3, tmp1, tmp2); + + if (loop > 2) { + /* forth item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with second */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, tmp3, tmp3, tmp1, 16); + } + /* extract upper bits */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp3, tmp3, 8); + + /* merge tmp3 */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp3, ORC_ARM_LSL, 8); + } else { + /* bring upper bits in position */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, ORC_ARM_LSR, 8); + } +} + +static void +arm_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_UB(mulhub, "((orc_uint32)(uint8_t)%s * (orc_uint32)(uint8_t)%s) >> 8") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int tmp3 = ORC_ARM_V8; + int loop = 1; + + /* first item (and third) */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp2, src2); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, tmp1, tmp2); + + if (loop > 1) { + if (loop > 2) { + /* third item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with first */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, dest, tmp1, 16); + } + /* extract upper bits */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, dest, dest, 8); + + /* second item (and fourth) */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 8); + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 8); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, tmp3, tmp1, tmp2); + + if (loop > 2) { + /* forth item */ + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + /* merge with second */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, tmp3, tmp3, tmp1, 16); + } + /* extract upper bits */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp3, tmp3, 8); + + /* merge tmp3 */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp3, ORC_ARM_LSL, 8); + } else { + /* bring upper bits in position */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, ORC_ARM_LSR, 8); + } +} + +BINARY_DP (orX, orr); +static void +arm_rule_shlX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* degrades nicely to trivial shift when not doing parallel shifts */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int mask = p->tmpreg; + int src2type = ORC_SRC_TYPE (p, insn, 1); + int size = ORC_PTR_TO_INT(user); + int loop = 4 / size; /* number of items in one register */ + + if (src2type == ORC_VAR_TYPE_CONST) { + int val = ORC_SRC_VAL (p, insn, 1); + + if (loop > 1 && size != 4 && val < 5) { + for (;val; val--) { + /* small values, do a series of additions, we need at least 5 + * instructions for the generic case below. */ + if (size == 1) + orc_arm_emit_uadd8 (p, ORC_ARM_COND_AL, dest, src1, src1); + else + orc_arm_emit_uadd16 (p, ORC_ARM_COND_AL, dest, src1, src1); + } + } + else { + /* bigger values, shift and mask out excess bits */ + if (val >= size) { + /* too big, clear all */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, dest, 0); + } else if (val > 0) { + if (loop > 1 && size < 4) { + /* shift, note that we skip the next instructions when 0 */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSL, val); + if (size == 1) + /* make loop * 0x80 */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_NE, mask, 0x80, loop); + else + /* make loop * 0x8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_NE, mask, 0x8000, loop); + /* make mask, this mask has enough bits but is shifted one position to the right */ + orc_arm_emit_sub_rsi (p, ORC_ARM_COND_NE, 0, mask, mask, mask, ORC_ARM_LSR, val); + /* clear upper bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, mask, ORC_ARM_LSL, 1); + } else { + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSL, val); + } + } + } + } else if (src2type == ORC_VAR_TYPE_PARAM) { + int src2 = ORC_SRC_ARG (p, insn, 1); + + if (loop > 1 && size < 4) { + /* shift with register value, note that we skip the next instructions when 0 */ + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSL, src2); + if (size == 1) + /* make loop * 0x80 */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_NE, mask, 0x80, loop); + else + /* make loop * 0x8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_NE, mask, 0x8000, loop); + /* make mask */ + orc_arm_emit_sub_rsr (p, ORC_ARM_COND_NE, 0, mask, mask, mask, ORC_ARM_LSR, src2); + /* clear bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, mask, ORC_ARM_LSL, 1); + } else { + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSL, src2); + } + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants or parameters"); + } +} + +static void +arm_rule_shrsX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* degrades nicely to trivial shift when not doing parallel shifts */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int mask = p->tmpreg; + int tmp = p->gp_tmpreg; + int src2type = ORC_SRC_TYPE (p, insn, 1); + int size = ORC_PTR_TO_INT(user); + int loop = 4 / size; /* number of items in one register */ + + if (src2type == ORC_VAR_TYPE_CONST) { + int val = ORC_SRC_VAL (p, insn, 1); + + if (val > 0) { + /* clamp max shift so we can sign extend */ + if (val >= size) + val = size - 1; + + /* shift */ + if (size < 4) { + if (size == 2 && val == 8) { + /* half word shift by 8 */ + orc_arm_emit_sxtb16_r8 (p, ORC_ARM_COND_AL, dest, src1, 8); + } else { + if (size == 1) + /* make loop * 80, position of sign bit after shift */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_AL, mask, 0x80, loop); + else + /* make loop * 8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_AL, mask, 0x8000, loop); + /* make mask, save in tmp, we need the original mask */ + orc_arm_emit_sub_rsi (p, ORC_ARM_COND_AL, 0, tmp, mask, mask, ORC_ARM_LSR, val); + + /* do the shift */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSR, val); + /* clear upper bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, tmp, ORC_ARM_LSL, 1); + + /* flip sign bit */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_NE, 0, dest, dest, mask); + /* extend sign bits */ + if (size == 1) + orc_arm_emit_usub8 (p, ORC_ARM_COND_NE, dest, dest, mask); + else + orc_arm_emit_usub16 (p, ORC_ARM_COND_NE, dest, dest, mask); + } + } else { + /* full word shift */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_ASR, val); + } + } + } else if (src2type == ORC_VAR_TYPE_PARAM) { + int src2 = ORC_SRC_ARG (p, insn, 1); + + if (size < 4) { + if (size == 1) + /* make loop * 0x80 */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_AL, mask, 0x80, loop); + else + /* make loop * 0x8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_AL, mask, 0x8000, loop); + /* make mask */ + orc_arm_emit_sub_rsr (p, ORC_ARM_COND_AL, 0, tmp, mask, mask, ORC_ARM_LSR, src2); + + /* do the shift */ + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSR, src2); + /* clear upper bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, tmp, ORC_ARM_LSL, 1); + + /* flip sign bit */ + orc_arm_emit_eor_r (p, ORC_ARM_COND_NE, 0, dest, dest, mask); + /* extend sign bits */ + if (size == 1) + orc_arm_emit_usub8 (p, ORC_ARM_COND_NE, dest, dest, mask); + else + orc_arm_emit_usub16 (p, ORC_ARM_COND_NE, dest, dest, mask); + } else { + /* full word shift with register value */ + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 0, dest, dest, ORC_ARM_ASR, src2); + } + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants or parameters"); + } +} + +static void +arm_rule_shruX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* degrades nicely to trivial shift when not doing parallel shifts */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int mask = p->tmpreg; + int src2type = ORC_SRC_TYPE (p, insn, 1); + int size = ORC_PTR_TO_INT(user); + int loop = 4 / size; /* number of items in one register */ + + if (src2type == ORC_VAR_TYPE_CONST) { + int val = ORC_SRC_VAL (p, insn, 1); + + /* shift and mask out excess bits */ + if (val >= size) { + /* too big, clear all */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, dest, 0); + } else if (val > 0) { + if (size < 4) { + if (size == 2 && val == 8) { + /* half word shift by 8 */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, dest, src1, 8); + } else { + /* do the shift, set S flags */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSR, val); + + if (size == 1) + /* make loop * 0x80 */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_NE, mask, 0x80, loop); + else + /* make loop * 0x8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_NE, mask, 0x8000, loop); + /* make mask */ + orc_arm_emit_sub_rsi (p, ORC_ARM_COND_NE, 0, mask, mask, mask, ORC_ARM_LSR, val); + + /* clear upper bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, mask, ORC_ARM_LSL, 1); + } + } else { + /* one 4 byte shift, no need for the S flag */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSR, val); + } + } + } else if (src2type == ORC_VAR_TYPE_PARAM) { + int src2 = ORC_SRC_ARG (p, insn, 1); + + if (size < 4) { + /* shift with register value */ + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 1, dest, src1, ORC_ARM_LSR, src2); + + if (size == 1) + /* make loop * 0x80 */ + orc_arm_emit_mov_ib (p, ORC_ARM_COND_NE, mask, 0x80, loop); + else + /* make loop * 0x8000 */ + orc_arm_emit_mov_iw (p, ORC_ARM_COND_NE, mask, 0x8000, loop); + /* make mask */ + orc_arm_emit_sub_rsr (p, ORC_ARM_COND_NE, 0, mask, mask, mask, ORC_ARM_LSR, src2); + + /* clear bits */ + orc_arm_emit_bic_rsi (p, ORC_ARM_COND_NE, 0, dest, dest, mask, ORC_ARM_LSL, 1); + } else { + /* shift with register value */ + orc_arm_emit_mov_rsr (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSR, src2); + } + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants or parameters"); + } +} + +static void +arm_rule_signX (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int zero = p->tmpreg; + int ones = p->gp_tmpreg; + int tmp = ORC_ARM_V8; + int type = ORC_PTR_TO_INT(user); + + /* make 0 */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_AL, 0, zero, 0); + /* make 0xffffffff */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_AL, 0, ones, 0); + + /* dest = src1 - 0 (src1 >= 0 ? 0 : -1) */ + if (type == 0) + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, src1, zero); + else + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, src1, zero); + + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, zero, ones); + + /* tmp = 0 - src1 (src1 <= 0 ? 0 : -1) */ + if (type == 0) + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, tmp, zero, src1); + else + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, tmp, zero, src1); + + orc_arm_emit_sel (p, ORC_ARM_COND_AL, tmp, zero, ones); + + /* (src1 >= 0 ? 0 : -1) - (src1 <= 0 ? 0 : -1) */ + if (type == 0) + orc_arm_emit_ssub8 (p, ORC_ARM_COND_AL, dest, dest, tmp); + else + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, dest, tmp); +} + +BINARY_MM (subb, ssub8); +BINARY_MM (subssb, qsub8); +BINARY_MM (subusb, uqsub8); +BINARY_DP (xorX, eor); + +BINARY_MM (addw, sadd16); +BINARY_MM (addssw, qadd16); +BINARY_MM (addusw, uqadd16); + +static void +arm_rule_maxsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src1, src2); +} +static void +arm_rule_maxuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_usub16 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src1, src2); +} +static void +arm_rule_minsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_ssub16 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src2, src1); +} +static void +arm_rule_minuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_usub16 (p, ORC_ARM_COND_AL, dest, src1, src2); + orc_arm_emit_sel (p, ORC_ARM_COND_AL, dest, src2, src1); +} + +static void +arm_rule_mullw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int loop = 1; + + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, src1, src2); + + if (loop == 2) { + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp, src1, src2); + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, dest, tmp, 16); + } +} +static void +arm_rule_mulhsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int loop = 1; + + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, src1, src2); + if (loop == 1) { + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, ORC_ARM_ASR, 16); + } else { + orc_arm_emit_smultt (p, ORC_ARM_COND_AL, tmp, src1, src2); + orc_arm_emit_pkhtb_s (p, ORC_ARM_COND_AL, dest, tmp, dest, 16); + } +} +static void +arm_rule_mulhuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_UW(mulhuw, "((orc_uint32)((uint16_t)%s) * (orc_uint32)((uint16_t)%s)) >> 16") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int loop = 1; + + /* extract first halves */ + orc_arm_emit_uxth (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_uxth (p, ORC_ARM_COND_AL, tmp2, src2); + /* multiply, result should fit in the word */ + orc_arm_emit_mul (p, ORC_ARM_COND_AL, 0, dest, tmp1, tmp2); + + if (loop == 1) { + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, ORC_ARM_LSR, 16); + } else { + /* second halves */ + orc_arm_emit_uxth_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 16); + orc_arm_emit_uxth_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 16); + orc_arm_emit_mul (p, ORC_ARM_COND_AL, 0, tmp1, tmp1, tmp2); + /* merge */ + orc_arm_emit_pkhtb_s (p, ORC_ARM_COND_AL, dest, tmp1, dest, 16); + } +} +BINARY_MM (subw, ssub16); +BINARY_MM (subssw, qsub16); +BINARY_MM (subusw, uqsub16); + +static void +arm_rule_absl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* reverse sign 0 - src1, assume the value is negative */ + orc_arm_emit_rsb_i (p, ORC_ARM_COND_AL, 1, dest, src1, 0); + + /* if we got negative, copy the original value again */ + orc_arm_emit_mov_r (p, ORC_ARM_COND_MI, 0, dest, src1); +} + +BINARY_DP (addl, add); +BINARY_MM (addssl, qadd); +static void +arm_rule_addusl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* add numbers */ + orc_arm_emit_add_r (p, ORC_ARM_COND_AL, 1, dest, src1, src2); + + /* on overflow, move ffffffff */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_CS, 0, dest, 0); +} +static void +arm_rule_avgXl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* set the carry flag */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src1); + + /* src1 + src2 + 1 */ + orc_arm_emit_adc_r (p, ORC_ARM_COND_AL, 0, dest, src1, src2); + + /* rotate right, top bit is the carry */ + orc_arm_emit_mov_rrx (p, ORC_ARM_COND_AL, 0, dest, dest); +} +static void +arm_rule_cmpeql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* set to all 0 when not equal */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_NE, 0, dest, 0); + + /* set to all ff when equal */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_EQ, 0, dest, 0); +} +static void +arm_rule_cmpgtsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* set to all 0 when less or equal */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_LE, 0, dest, 0); + + /* set to all ff when greater */ + orc_arm_emit_mvn_i (p, ORC_ARM_COND_GT, 0, dest, 0); +} + +static void +arm_rule_maxsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* conditionally move result */ + orc_arm_emit_mov_r (p, ORC_ARM_COND_GE, 0, dest, src1); + orc_arm_emit_mov_r (p, ORC_ARM_COND_LT, 0, dest, src2); +} +static void +arm_rule_maxul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* conditionally move result */ + orc_arm_emit_mov_r (p, ORC_ARM_COND_CS, 0, dest, src1); + orc_arm_emit_mov_r (p, ORC_ARM_COND_CC, 0, dest, src2); +} +static void +arm_rule_minsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* conditionally move result */ + orc_arm_emit_mov_r (p, ORC_ARM_COND_GE, 0, dest, src2); + orc_arm_emit_mov_r (p, ORC_ARM_COND_LT, 0, dest, src1); +} +static void +arm_rule_minul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* compare */ + orc_arm_emit_cmp_r (p, ORC_ARM_COND_AL, src1, src2); + + /* conditionally move result */ + orc_arm_emit_mov_r (p, ORC_ARM_COND_CS, 0, dest, src2); + orc_arm_emit_mov_r (p, ORC_ARM_COND_CC, 0, dest, src1); +} + +static void +arm_rule_mulll (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_mul (p, ORC_ARM_COND_AL, 0, dest, src1, src2); +} +static void +arm_rule_mulhsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + + orc_arm_emit_smull (p, ORC_ARM_COND_AL, 0, tmp, dest, src1, src2); +} +static void +arm_rule_mulhul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + + orc_arm_emit_umull (p, ORC_ARM_COND_AL, 0, tmp, dest, src1, src2); +} +static void +arm_rule_signl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + + /* dest = 0 - src1 */ + orc_arm_emit_rsb_i (p, ORC_ARM_COND_AL, 0, dest, src1, 0); + + /* move src1 sign into tmp */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, tmp, src1, ORC_ARM_ASR, 31); + + /* dest = tmp - (dest >> 31) */ + orc_arm_emit_sub_rsi (p, ORC_ARM_COND_AL, 0, dest, tmp, dest, ORC_ARM_ASR, 31); +} +BINARY_DP (subl, sub); +BINARY_MM (subssl, qsub); +static void +arm_rule_subusl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* subtract numbers */ + orc_arm_emit_sub_r (p, ORC_ARM_COND_AL, 1, dest, src1, src2); + + /* overflow, move 00000000 */ + orc_arm_emit_mov_i (p, ORC_ARM_COND_CC, 0, dest, 0); +} + +static void +arm_rule_convsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + if (loop == 1) { + /* single byte */ + orc_arm_emit_sxtb (p, ORC_ARM_COND_AL, dest, src1); + } else { + /* two bytes */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, src1, src1, 8); + orc_arm_emit_sxtb16 (p, ORC_ARM_COND_AL, dest, dest); + } +} + +static void +arm_rule_convubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + if (loop == 1) { + /* single byte */ + orc_arm_emit_uxtb (p, ORC_ARM_COND_AL, dest, src1); + } else { + /* two bytes */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, src1, src1, 8); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + } +} + +static void +arm_rule_convswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_sxth (p, ORC_ARM_COND_AL, dest, src1); +} +static void +arm_rule_convuwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_uxth (p, ORC_ARM_COND_AL, dest, src1); +} + +static void +arm_rule_convwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + if (loop == 2) { + /* two words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, src1); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} + +static void +arm_rule_convssswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + orc_arm_emit_ssat16 (p, ORC_ARM_COND_AL, dest, 8, src1); + + if (loop == 2) { + /* two words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} +static void +arm_rule_convsuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + orc_arm_emit_usat16 (p, ORC_ARM_COND_AL, dest, 8, src1); + + if (loop == 2) { + /* two words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} +static void +arm_rule_convusswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + /* sign bias */ + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, src1, 0x00008000); + if (loop == 2) + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, dest, 0x80000000); + + /* saturate to signed region */ + orc_arm_emit_usat16 (p, ORC_ARM_COND_AL, dest, 7, dest); + + if (loop == 2) { + /* pack two words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} +static void +arm_rule_convuuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + /* sign bias */ + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, src1, 0x00008000); + if (loop == 2) + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, dest, 0x80000000); + + /* saturate to unsigned region */ + orc_arm_emit_usat16 (p, ORC_ARM_COND_AL, dest, 8, dest); + + if (loop == 2) { + /* pack two words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} +static void +arm_rule_convlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* NOP */ +} + +static void +arm_rule_convssslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_ssat (p, ORC_ARM_COND_AL, dest, 16, src1); +} +static void +arm_rule_convsuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_usat (p, ORC_ARM_COND_AL, dest, 16, src1); +} +static void +arm_rule_convusslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* sign bias */ + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, src1, 0x80000000); + /* saturate to signed region */ + orc_arm_emit_usat (p, ORC_ARM_COND_AL, dest, 15, dest); +} +static void +arm_rule_convuuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + /* sign bias */ + orc_arm_emit_eor_i (p, ORC_ARM_COND_AL, 0, dest, src1, 0x80000000); + /* saturate to unsigned region */ + orc_arm_emit_usat (p, ORC_ARM_COND_AL, dest, 16, dest); +} + +static void +arm_rule_mulsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_BW(mulsbw, "%s * %s") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int loop = 1; + + /* first item */ + orc_arm_emit_sxtb16 (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_sxtb16 (p, ORC_ARM_COND_AL, tmp2, src2); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, tmp1, tmp2); + + if (loop > 1) { + /* second item */ + orc_arm_emit_sxtb16_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 8); + orc_arm_emit_sxtb16_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 8); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + + /* merge results */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp1, ORC_ARM_LSL, 16); + } +} + +static void +arm_rule_mulubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_BW(mulubw, "(uint8_t)%s * (uint8_t)%s") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + int tmp2 = p->gp_tmpreg; + int loop = 1; + + /* first item */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp2, src2); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, dest, tmp1, tmp2); + + if (loop > 1) { + /* second item */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp1, src1, 8); + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, tmp2, src2, 8); + orc_arm_emit_smulbb (p, ORC_ARM_COND_AL, tmp1, tmp1, tmp2); + + /* merge results */ + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp1, ORC_ARM_LSL, 16); + } +} + +static void +arm_rule_mulswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_WL(mulswl, "%s * %s") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + + orc_arm_emit_sxth (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_sxth (p, ORC_ARM_COND_AL, dest, src2); + orc_arm_emit_mul (p, ORC_ARM_COND_AL, 0, dest, tmp1, dest); +} + +static void +arm_rule_muluwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp1 = p->tmpreg; + + orc_arm_emit_uxth (p, ORC_ARM_COND_AL, tmp1, src1); + orc_arm_emit_uxth (p, ORC_ARM_COND_AL, dest, src2); + orc_arm_emit_mul (p, ORC_ARM_COND_AL, 0, dest, tmp1, dest); +} + +static void +arm_rule_mergewl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, src1, src2, 16); +} +static void +arm_rule_mergebw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* BINARY_BW(mergebw, "((uint8_t)%s) | ((uint8_t)%s << 8)") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int src2 = ORC_SRC_ARG (p, insn, 1); + int dest = ORC_DEST_ARG (p, insn, 0); + int tmp = p->tmpreg; + int loop = 1; + + if (loop == 1) { + /* 1 word */ + orc_arm_emit_uxtb (p, ORC_ARM_COND_AL, dest, src1); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, src2, ORC_ARM_LSL, 8); + } else { + /* 2 words */ + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, dest, src1, src1, 8); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, dest); + orc_arm_emit_pkhbt_s (p, ORC_ARM_COND_AL, tmp, src2, src2, 8); + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, tmp, tmp); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, tmp, ORC_ARM_LSL, 8); + } +} + +static void +arm_rule_select0wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* UNARY_WB(select0wb, "(uint16_t)%s & 0xff") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + if (loop == 1) { + /* 1 words */ + /* NOP */ + } else { + /* 2 words */ + orc_arm_emit_uxtb16 (p, ORC_ARM_COND_AL, dest, src1); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} + +static void +arm_rule_select1wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* UNARY_WB(select1wb, "((uint16_t)%s >> 8)&0xff") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + int loop = 1; + + if (loop == 1) { + /* 1 words */ + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSR, 8); + } else { + /* 2 words */ + orc_arm_emit_uxtb16_r8 (p, ORC_ARM_COND_AL, dest, src1, 8); + orc_arm_emit_orr_rsi (p, ORC_ARM_COND_AL, 0, dest, dest, dest, ORC_ARM_LSR, 8); + } +} +static void +arm_rule_select0lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* UNARY_LW(select0lw, "(orc_uint32)%s & 0xffff") */ + /* NOP */ +} +static void +arm_rule_select1lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* UNARY_LW(select1lw, "((orc_uint32)%s >> 16)&0xffff") */ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_mov_rsi (p, ORC_ARM_COND_AL, 0, dest, src1, ORC_ARM_LSR, 16); +} + +static void +arm_rule_swapw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_rev16 (p, ORC_ARM_COND_AL, dest, src1); +} + +static void +arm_rule_swapl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = ORC_SRC_ARG (p, insn, 0); + int dest = ORC_DEST_ARG (p, insn, 0); + + orc_arm_emit_rev (p, ORC_ARM_COND_AL, dest, src1); +} + +#define FAIL if (0) + +void +orc_compiler_orc_arm_register_rules (OrcTarget *target) +{ + OrcRuleSet *rule_set; + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, 0); + + orc_rule_register (rule_set, "loadpb", arm_rule_loadpX, NULL); + orc_rule_register (rule_set, "loadpw", arm_rule_loadpX, NULL); + orc_rule_register (rule_set, "loadpl", arm_rule_loadpX, NULL); + orc_rule_register (rule_set, "loadb", arm_rule_loadX, NULL); + orc_rule_register (rule_set, "loadw", arm_rule_loadX, NULL); + orc_rule_register (rule_set, "loadl", arm_rule_loadX, NULL); + orc_rule_register (rule_set, "storeb", arm_rule_storeX, NULL); + orc_rule_register (rule_set, "storew", arm_rule_storeX, NULL); + orc_rule_register (rule_set, "storel", arm_rule_storeX, NULL); + + orc_rule_register (rule_set, "andb", arm_rule_andX, NULL); + orc_rule_register (rule_set, "andnb", arm_rule_andnX, NULL); + orc_rule_register (rule_set, "avgsb", arm_rule_avgX, (void *)3); + orc_rule_register (rule_set, "avgub", arm_rule_avgX, (void *)0); + orc_rule_register (rule_set, "copyb", arm_rule_copyX, NULL); + orc_rule_register (rule_set, "orb", arm_rule_orX, NULL); + orc_rule_register (rule_set, "xorb", arm_rule_xorX, NULL); + + orc_rule_register (rule_set, "andw", arm_rule_andX, NULL); + orc_rule_register (rule_set, "andnw", arm_rule_andnX, NULL); + FAIL orc_rule_register (rule_set, "avgsw", arm_rule_avgX, (void *)2); + orc_rule_register (rule_set, "avguw", arm_rule_avgX, (void *)1); + orc_rule_register (rule_set, "copyw", arm_rule_copyX, NULL); + orc_rule_register (rule_set, "orw", arm_rule_orX, NULL); + orc_rule_register (rule_set, "xorw", arm_rule_xorX, NULL); + orc_rule_register (rule_set, "mullw", arm_rule_mullw, NULL); + + FAIL orc_rule_register (rule_set, "absl", arm_rule_absl, NULL); + orc_rule_register (rule_set, "addl", arm_rule_addl, NULL); + orc_rule_register (rule_set, "addssl", arm_rule_addssl, NULL); + orc_rule_register (rule_set, "addusl", arm_rule_addusl, NULL); + orc_rule_register (rule_set, "andl", arm_rule_andX, NULL); + orc_rule_register (rule_set, "andnl", arm_rule_andnX, NULL); + FAIL orc_rule_register (rule_set, "avgul", arm_rule_avgXl, NULL); + FAIL orc_rule_register (rule_set, "avgsl", arm_rule_avgXl, NULL); + orc_rule_register (rule_set, "copyl", arm_rule_copyX, NULL); + orc_rule_register (rule_set, "maxsl", arm_rule_maxsl, NULL); + orc_rule_register (rule_set, "maxul", arm_rule_maxul, NULL); + orc_rule_register (rule_set, "minsl", arm_rule_minsl, NULL); + orc_rule_register (rule_set, "minul", arm_rule_minul, NULL); + orc_rule_register (rule_set, "mulll", arm_rule_mulll, NULL); + orc_rule_register (rule_set, "mulhsl", arm_rule_mulhsl, NULL); + FAIL orc_rule_register (rule_set, "mulhul", arm_rule_mulhul, NULL); + orc_rule_register (rule_set, "orl", arm_rule_orX, NULL); + FAIL orc_rule_register (rule_set, "signl", arm_rule_signl, NULL); + orc_rule_register (rule_set, "subl", arm_rule_subl, NULL); + FAIL orc_rule_register (rule_set, "subssl", arm_rule_subssl, NULL); + orc_rule_register (rule_set, "subusl", arm_rule_subusl, NULL); + orc_rule_register (rule_set, "xorl", arm_rule_xorX, NULL); + + FAIL orc_rule_register (rule_set, "convubw", arm_rule_convubw, NULL); + FAIL orc_rule_register (rule_set, "convswl", arm_rule_convswl, NULL); + FAIL orc_rule_register (rule_set, "convuwl", arm_rule_convuwl, NULL); + orc_rule_register (rule_set, "convwb", arm_rule_convwb, NULL); + orc_rule_register (rule_set, "convlw", arm_rule_convlw, NULL); + + FAIL orc_rule_register (rule_set, "mulubw", arm_rule_mulubw, NULL); + FAIL orc_rule_register (rule_set, "mulswl", arm_rule_mulswl, NULL); + FAIL orc_rule_register (rule_set, "muluwl", arm_rule_muluwl, NULL); + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_ARM_EDSP); + + FAIL orc_rule_register (rule_set, "absb", arm_rule_absX, (void *)0); + orc_rule_register (rule_set, "cmpeqb", arm_rule_cmpeqX, (void *)1); + orc_rule_register (rule_set, "cmpgtsb", arm_rule_cmpgtsX, (void *)1); + FAIL orc_rule_register (rule_set, "maxsb", arm_rule_maxsb, NULL); + FAIL orc_rule_register (rule_set, "maxub", arm_rule_maxub, NULL); + FAIL orc_rule_register (rule_set, "minsb", arm_rule_minsb, NULL); + FAIL orc_rule_register (rule_set, "minub", arm_rule_minub, NULL); + orc_rule_register (rule_set, "shlb", arm_rule_shlX, (void *)1); + FAIL orc_rule_register (rule_set, "shrsb", arm_rule_shrsX, (void *)1); + FAIL orc_rule_register (rule_set, "shrub", arm_rule_shruX, (void *)1); + FAIL orc_rule_register (rule_set, "signb", arm_rule_signX, (void *)0); + + FAIL orc_rule_register (rule_set, "absw", arm_rule_absX, (void *)1); + orc_rule_register (rule_set, "cmpeqw", arm_rule_cmpeqX, (void *)2); + orc_rule_register (rule_set, "cmpgtsw", arm_rule_cmpgtsX, (void *)2); + FAIL orc_rule_register (rule_set, "maxsw", arm_rule_maxsw, NULL); + FAIL orc_rule_register (rule_set, "maxuw", arm_rule_maxuw, NULL); + FAIL orc_rule_register (rule_set, "minsw", arm_rule_minsw, NULL); + FAIL orc_rule_register (rule_set, "minuw", arm_rule_minuw, NULL); + orc_rule_register (rule_set, "mulsbw", arm_rule_mulsbw, NULL); + orc_rule_register (rule_set, "shlw", arm_rule_shlX, (void *)2); + FAIL orc_rule_register (rule_set, "shrsw", arm_rule_shrsX, (void *)2); + orc_rule_register (rule_set, "shruw", arm_rule_shruX, (void *)2); + FAIL orc_rule_register (rule_set, "signw", arm_rule_signX, (void *)1); + orc_rule_register (rule_set, "mulhsw", arm_rule_mulhsw, NULL); + FAIL orc_rule_register (rule_set, "mulhuw", arm_rule_mulhuw, NULL); + + orc_rule_register (rule_set, "cmpeql", arm_rule_cmpeql, NULL); + orc_rule_register (rule_set, "cmpgtsl", arm_rule_cmpgtsl, NULL); + orc_rule_register (rule_set, "shll", arm_rule_shlX, (void *)4); + orc_rule_register (rule_set, "shrsl", arm_rule_shrsX, (void *)4); + orc_rule_register (rule_set, "shrul", arm_rule_shruX, (void *)4); + + orc_rule_register (rule_set, "convsbw", arm_rule_convsbw, NULL); + + orc_rule_register (rule_set, "mergewl", arm_rule_mergewl, NULL); + FAIL orc_rule_register (rule_set, "mergebw", arm_rule_mergebw, NULL); + orc_rule_register (rule_set, "select0wb", arm_rule_select0wb, NULL); + orc_rule_register (rule_set, "select1wb", arm_rule_select1wb, NULL); + orc_rule_register (rule_set, "select0lw", arm_rule_select0lw, NULL); + orc_rule_register (rule_set, "select1lw", arm_rule_select1lw, NULL); + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_ARM_ARM6); + + orc_rule_register (rule_set, "addb", arm_rule_addb, NULL); + orc_rule_register (rule_set, "addssb", arm_rule_addssb, NULL); + orc_rule_register (rule_set, "addusb", arm_rule_addusb, NULL); + orc_rule_register (rule_set, "subb", arm_rule_subb, NULL); + orc_rule_register (rule_set, "subssb", arm_rule_subssb, NULL); + orc_rule_register (rule_set, "subusb", arm_rule_subusb, NULL); + orc_rule_register (rule_set, "addw", arm_rule_addw, NULL); + orc_rule_register (rule_set, "addssw", arm_rule_addssw, NULL); + orc_rule_register (rule_set, "addusw", arm_rule_addusw, NULL); + orc_rule_register (rule_set, "subw", arm_rule_subw, NULL); + orc_rule_register (rule_set, "subssw", arm_rule_subssw, NULL); + orc_rule_register (rule_set, "subusw", arm_rule_subusw, NULL); + orc_rule_register (rule_set, "convsuswb", arm_rule_convsuswb, NULL); + orc_rule_register (rule_set, "convssswb", arm_rule_convssswb, NULL); + FAIL orc_rule_register (rule_set, "convusswb", arm_rule_convusswb, NULL); + FAIL orc_rule_register (rule_set, "convuuswb", arm_rule_convuuswb, NULL); + FAIL orc_rule_register (rule_set, "convssslw", arm_rule_convssslw, NULL); + orc_rule_register (rule_set, "convsuslw", arm_rule_convsuslw, NULL); + FAIL orc_rule_register (rule_set, "convusslw", arm_rule_convusslw, NULL); + FAIL orc_rule_register (rule_set, "convuuslw", arm_rule_convuuslw, NULL); + orc_rule_register (rule_set, "mullb", arm_rule_mullb, NULL); + orc_rule_register (rule_set, "mulhsb", arm_rule_mulhsb, NULL); + FAIL orc_rule_register (rule_set, "mulhub", arm_rule_mulhub, NULL); + orc_rule_register (rule_set, "swapw", arm_rule_swapw, NULL); + orc_rule_register (rule_set, "swapl", arm_rule_swapl, NULL); + +} + diff --git a/orc/orcrules-mmx.c b/orc/orcrules-mmx.c new file mode 100644 index 0000000..bb7b1c1 --- /dev/null +++ b/orc/orcrules-mmx.c @@ -0,0 +1,2949 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +#define MMX 1 +#define SIZE 65536 + +/* sse rules */ + +static void +mmx_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int reg; + int size = ORC_PTR_TO_INT(user); + + if (src->vartype == ORC_VAR_TYPE_PARAM) { + reg = dest->alloc; + + if (size == 8 && src->size == 8) { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]]), + compiler->exec_reg, reg, FALSE); +#ifndef MMX + orc_x86_emit_movhps_memoffset_mmx (compiler, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]), + compiler->exec_reg, reg); + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(2,0,2,0), reg, reg); +#else + /* FIXME yes, I understand this is terrible */ + orc_mmx_emit_pinsrw_memoffset (compiler, 2, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]) + 0, + compiler->exec_reg, reg); + orc_mmx_emit_pinsrw_memoffset (compiler, 3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]) + 2, + compiler->exec_reg, reg); +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); +#endif +#endif + } else { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]]), + compiler->exec_reg, reg, FALSE); + if (size < 8) { + if (size == 1) { + orc_mmx_emit_punpcklbw (compiler, reg, reg); + } +#ifndef MMX + if (size <= 2) { + orc_mmx_emit_pshuflw (compiler, 0, reg, reg); + } + orc_mmx_emit_pshufd (compiler, 0, reg, reg); +#else + if (size <= 2) { + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(0,0,0,0), reg, reg); + } else { + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); + } +#endif + } else { +#ifndef MMX + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); +#endif + } + } + } else if (src->vartype == ORC_VAR_TYPE_CONST) { + orc_mmx_load_constant (compiler, dest->alloc, size, src->value.i); + } else { + ORC_ASSERT(0); + } +} + +static void +mmx_rule_loadX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + offset = compiler->offset * src->size; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_mmx (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 2: + orc_mmx_emit_pxor (compiler, dest->alloc, dest->alloc); + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 4: + orc_x86_emit_mov_memoffset_mmx (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 8: + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + src->update_type = 2; +} + +static void +mmx_rule_loadoffX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + if (compiler->vars[insn->src_args[1]].vartype != ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler, "Rule only works with consts"); + return; + } + + offset = (compiler->offset + compiler->vars[insn->src_args[1]].value.i) * + src->size; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_mmx (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 2: + orc_mmx_emit_pxor (compiler, dest->alloc, dest->alloc); + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 4: + orc_x86_emit_mov_memoffset_mmx (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 8: + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + src->update_type = 2; +} + +static void +mmx_rule_loadupib (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + int tmp = orc_compiler_get_temp_reg (compiler); + + offset = (compiler->offset * src->size) >> 1; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + case 2: + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + orc_mmx_emit_movq (compiler, dest->alloc, tmp); + orc_mmx_emit_psrlw (compiler, 8, tmp); + break; + case 4: + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset + 1, ptr_reg, tmp); + break; + case 8: + orc_x86_emit_mov_memoffset_mmx (compiler, 4, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_mmx (compiler, 4, offset + 1, ptr_reg, + tmp, FALSE); + break; + case 16: + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset + 1, ptr_reg, + tmp, FALSE); + break; + case 32: + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset + 1, ptr_reg, + tmp, FALSE); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + orc_mmx_emit_pavgb (compiler, dest->alloc, tmp); + orc_mmx_emit_punpcklbw (compiler, tmp, dest->alloc); + + src->update_type = 1; +} + +static void +mmx_rule_loadupdb (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + offset = (compiler->offset * src->size) >> 1; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + case 2: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_mmx (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 4: + orc_mmx_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 8: + orc_x86_emit_mov_memoffset_mmx (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_mmx (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 32: + orc_x86_emit_mov_memoffset_mmx (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + switch (src->size) { + case 1: + orc_mmx_emit_punpcklbw (compiler, dest->alloc, dest->alloc); + break; + case 2: + orc_mmx_emit_punpcklwd (compiler, dest->alloc, dest->alloc); + break; + case 4: + orc_mmx_emit_punpckldq (compiler, dest->alloc, dest->alloc); + break; + } + + src->update_type = 1; +} + +static void +mmx_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int offset; + int ptr_reg; + + offset = compiler->offset * dest->size; + if (dest->ptr_register == 0) { + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + dest->ptr_offset, compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = dest->ptr_register; + } + switch (dest->size << compiler->loop_shift) { + case 1: + /* FIXME we might be using ecx twice here */ + if (ptr_reg == compiler->gp_tmpreg) { + ORC_COMPILER_ERROR(compiler,"unimplemented"); + } + orc_x86_emit_mov_mmx_reg (compiler, src->alloc, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 1, compiler->gp_tmpreg, + offset, ptr_reg); + break; + case 2: + if (compiler->target_flags & ORC_TARGET_MMX_SSE4_1) { + orc_mmx_emit_pextrw_memoffset (compiler, 0, src->alloc, offset, + ptr_reg); + } else { + /* FIXME we might be using ecx twice here */ + if (ptr_reg == compiler->gp_tmpreg) { + ORC_COMPILER_ERROR(compiler,"unimplemented"); + } + orc_x86_emit_mov_mmx_reg (compiler, src->alloc, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 2, compiler->gp_tmpreg, + offset, ptr_reg); + } + break; + case 4: + orc_x86_emit_mov_mmx_memoffset (compiler, 4, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + case 8: + orc_x86_emit_mov_mmx_memoffset (compiler, 8, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + case 16: + orc_x86_emit_mov_mmx_memoffset (compiler, 16, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad size"); + break; + } + + dest->update_type = 2; +} + +#if try1 +static void +mmx_rule_ldresnearl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int tmpc; + + orc_x86_emit_mov_mmx_reg (compiler, X86_MM6, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + ORC_ASM_CODE(compiler," movdqu 0(%%%s,%%%s,4), %%%s\n", + orc_x86_get_regname_ptr(compiler, src->ptr_register), + orc_x86_get_regname_ptr(compiler, compiler->gp_tmpreg), + orc_x86_get_regname_mmx(dest->alloc)); + *compiler->codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, dest->ptr_register, 0, dest->alloc); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + orc_x86_emit_modrm_memindex (compiler, dest->alloc, 0, + src->ptr_register, compiler->gp_tmpreg, 2); + +#if 0 + orc_mmx_emit_movq (compiler, X86_MM6, tmp); + orc_mmx_emit_pslld (compiler, 10, tmp); + orc_mmx_emit_psrld (compiler, 26, tmp); + orc_mmx_emit_pslld (compiler, 2, tmp); + + orc_mmx_emit_movq (compiler, tmp, tmp2); + orc_mmx_emit_pslld (compiler, 8, tmp2); + orc_mmx_emit_por (compiler, tmp2, tmp); + orc_mmx_emit_movq (compiler, tmp, tmp2); + orc_mmx_emit_pslld (compiler, 16, tmp2); + orc_mmx_emit_por (compiler, tmp2, tmp); +#else + orc_mmx_emit_movq (compiler, X86_MM6, tmp); + tmpc = orc_compiler_get_constant_long (compiler, 0x02020202, + 0x06060606, 0x0a0a0a0a, 0x0e0e0e0e); + orc_mmx_emit_pshufb (compiler, tmpc, tmp); + orc_mmx_emit_paddb (compiler, tmp, tmp); + orc_mmx_emit_paddb (compiler, tmp, tmp); +#endif + + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(0,0,0,0), tmp, tmp2); + orc_mmx_emit_psubd (compiler, tmp2, tmp); + tmpc = orc_compiler_get_constant (compiler, 4, 0x03020100); + orc_mmx_emit_paddd (compiler, tmpc, tmp); + + orc_mmx_emit_pshufb (compiler, tmp, dest->alloc); + + orc_mmx_emit_movq (compiler, X86_MM7, tmp); + orc_mmx_emit_pslld (compiler, compiler->loop_shift, tmp); + + orc_mmx_emit_paddd (compiler, tmp, X86_MM6); + + src->update_type = 0; +} +#endif + +static void +mmx_rule_ldresnearl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int i; + + for(i=0;i<(1<loop_shift);i++){ + if (i == 0) { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + } else { + orc_x86_emit_mov_memindex_mmx (compiler, 4, 0, + src->ptr_register, compiler->gp_tmpreg, 2, tmp, FALSE); +#ifdef MMX + //orc_mmx_emit_punpckldq (compiler, tmp, dest->alloc); + orc_mmx_emit_psllq (compiler, 8*4*i, tmp); + orc_mmx_emit_por (compiler, tmp, dest->alloc); +#else + orc_mmx_emit_pslldq (compiler, 4*i, tmp); + orc_mmx_emit_por (compiler, tmp, dest->alloc); +#endif + } + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + } + + orc_x86_emit_add_reg_reg_shift (compiler, compiler->is_64bit ? 8 : 4, + compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + + src->update_type = 0; +} + +#ifndef MMX +static void +mmx_rule_ldreslinl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int regsize = compiler->is_64bit ? 8 : 4; + int i; + + if (compiler->loop_shift == 0) { + orc_x86_emit_mov_memoffset_mmx (compiler, 8, 0, + src->ptr_register, tmp, FALSE); + + orc_mmx_emit_pxor (compiler, tmp2, tmp2); + orc_mmx_emit_punpcklbw (compiler, tmp2, tmp); + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(3,2,3,2), tmp, tmp2); + orc_mmx_emit_psubw (compiler, tmp, tmp2); + + orc_x86_emit_mov_reg_mmx (compiler, src->ptr_offset, tmp); + orc_mmx_emit_pshuflw (compiler, ORC_MMX_SHUF(0,0,0,0), tmp, tmp); + orc_mmx_emit_psrlw (compiler, 8, tmp); + orc_mmx_emit_pmullw (compiler, tmp2, tmp); + orc_mmx_emit_psraw (compiler, 8, tmp); + orc_mmx_emit_pxor (compiler, tmp2, tmp2); + orc_mmx_emit_packsswb (compiler, tmp2, tmp); + + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + orc_mmx_emit_paddb (compiler, tmp, dest->alloc); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, regsize, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, regsize, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } else { + int tmp3 = orc_compiler_get_temp_reg (compiler); + int tmp4 = orc_compiler_get_temp_reg (compiler); + + for(i=0;i<(1<loop_shift);i+=2){ + orc_x86_emit_mov_memoffset_mmx (compiler, 8, 0, + src->ptr_register, tmp, FALSE); + orc_x86_emit_mov_reg_mmx (compiler, src->ptr_offset, tmp4); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_mov_memindex_mmx (compiler, 8, 0, + src->ptr_register, compiler->gp_tmpreg, 2, tmp2, FALSE); + + orc_mmx_emit_punpckldq (compiler, tmp2, tmp); + orc_mmx_emit_movq (compiler, tmp, tmp2); + if (i == 0) { + orc_mmx_emit_movq (compiler, tmp, dest->alloc); + } else { + orc_mmx_emit_punpcklqdq (compiler, tmp, dest->alloc); + } + + orc_mmx_emit_pxor (compiler, tmp3, tmp3); + orc_mmx_emit_punpcklbw (compiler, tmp3, tmp); + orc_mmx_emit_punpckhbw (compiler, tmp3, tmp2); + + orc_mmx_emit_psubw (compiler, tmp, tmp2); + + ORC_ASM_CODE(compiler," pinsrw $%d, %%%s, %%%s\n", 1, + orc_x86_get_regname (src->ptr_offset), + orc_x86_get_regname_mmx(tmp4)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex (compiler, 0, tmp4, 0, src->ptr_offset); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xc4; + orc_x86_emit_modrm_reg (compiler, src->ptr_offset, tmp4); + *compiler->codeptr++ = 1; + +#if 0 + orc_mmx_emit_punpcklwd (compiler, tmp4, tmp4); + orc_mmx_emit_punpckldq (compiler, tmp4, tmp4); +#else + orc_mmx_emit_pshuflw (compiler, ORC_MMX_SHUF(1,1,0,0), tmp4, tmp4); + orc_mmx_emit_pshufd (compiler, ORC_MMX_SHUF(1,1,0,0), tmp4, tmp4); +#endif + orc_mmx_emit_psrlw (compiler, 8, tmp4); + orc_mmx_emit_pmullw (compiler, tmp4, tmp2); + orc_mmx_emit_psraw (compiler, 8, tmp2); + orc_mmx_emit_pxor (compiler, tmp, tmp); + orc_mmx_emit_packsswb (compiler, tmp, tmp2); + + if (i != 0) { + orc_mmx_emit_pslldq (compiler, 8, tmp2); + } + orc_mmx_emit_paddb (compiler, tmp2, dest->alloc); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, 8, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } + } + + src->update_type = 0; +} +#else +static void +mmx_rule_ldreslinl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int zero; + int regsize = compiler->is_64bit ? 8 : 4; + int i; + + zero = orc_compiler_get_constant (compiler, 1, 0); + for(i=0;i<(1<loop_shift);i++){ + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, tmp, FALSE); + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 4, + src->ptr_register, tmp2, FALSE); + + orc_mmx_emit_punpcklbw (compiler, zero, tmp); + orc_mmx_emit_punpcklbw (compiler, zero, tmp2); + orc_mmx_emit_psubw (compiler, tmp, tmp2); + + orc_x86_emit_mov_reg_mmx (compiler, src->ptr_offset, tmp); + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(0,0,0,0), tmp, tmp); + orc_mmx_emit_psrlw (compiler, 8, tmp); + orc_mmx_emit_pmullw (compiler, tmp2, tmp); + orc_mmx_emit_psraw (compiler, 8, tmp); + orc_mmx_emit_pxor (compiler, tmp2, tmp2); + orc_mmx_emit_packsswb (compiler, tmp2, tmp); + + if (i == 0) { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + orc_mmx_emit_paddb (compiler, tmp, dest->alloc); + } else { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, tmp2, FALSE); + orc_mmx_emit_paddb (compiler, tmp, tmp2); + orc_mmx_emit_psllq (compiler, 32, tmp2); + orc_mmx_emit_por (compiler, tmp2, dest->alloc); + } + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, regsize, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, regsize, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } + + src->update_type = 0; +} +#endif + +static void +mmx_rule_copyx (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->vars[insn->src_args[0]].alloc == p->vars[insn->dest_args[0]].alloc) { + return; + } + + orc_mmx_emit_movq (p, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +#define UNARY(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + + +UNARY(absb,"pabsb",0x381c) +BINARY(addb,"paddb",0xfc) +BINARY(addssb,"paddsb",0xec) +BINARY(addusb,"paddusb",0xdc) +BINARY(andb,"pand",0xdb) +BINARY(andnb,"pandn",0xdf) +BINARY(avgub,"pavgb",0xe0) +BINARY(cmpeqb,"pcmpeqb",0x74) +BINARY(cmpgtsb,"pcmpgtb",0x64) +BINARY(maxsb,"pmaxsb",0x383c) +BINARY(maxub,"pmaxub",0xde) +BINARY(minsb,"pminsb",0x3838) +BINARY(minub,"pminub",0xda) +//BINARY(mullb,"pmullb",0xd5) +//BINARY(mulhsb,"pmulhb",0xe5) +//BINARY(mulhub,"pmulhub",0xe4) +BINARY(orb,"por",0xeb) +//UNARY(signb,"psignb",0x3808) +BINARY(subb,"psubb",0xf8) +BINARY(subssb,"psubsb",0xe8) +BINARY(subusb,"psubusb",0xd8) +BINARY(xorb,"pxor",0xef) + +UNARY(absw,"pabsw",0x381d) +BINARY(addw,"paddw",0xfd) +BINARY(addssw,"paddsw",0xed) +BINARY(addusw,"paddusw",0xdd) +BINARY(andw,"pand",0xdb) +BINARY(andnw,"pandn",0xdf) +BINARY(avguw,"pavgw",0xe3) +BINARY(cmpeqw,"pcmpeqw",0x75) +BINARY(cmpgtsw,"pcmpgtw",0x65) +BINARY(maxsw,"pmaxsw",0xee) +BINARY(maxuw,"pmaxuw",0x383e) +BINARY(minsw,"pminsw",0xea) +BINARY(minuw,"pminuw",0x383a) +BINARY(mullw,"pmullw",0xd5) +BINARY(mulhsw,"pmulhw",0xe5) +BINARY(mulhuw,"pmulhuw",0xe4) +BINARY(orw,"por",0xeb) +//UNARY(signw,"psignw",0x3809) +BINARY(subw,"psubw",0xf9) +BINARY(subssw,"psubsw",0xe9) +BINARY(subusw,"psubusw",0xd9) +BINARY(xorw,"pxor",0xef) + +UNARY(absl,"pabsd",0x381e) +BINARY(addl,"paddd",0xfe) +//BINARY(addssl,"paddsd",0xed) +//BINARY(addusl,"paddusd",0xdd) +BINARY(andl,"pand",0xdb) +BINARY(andnl,"pandn",0xdf) +//BINARY(avgul,"pavgd",0xe3) +BINARY(cmpeql,"pcmpeqd",0x76) +BINARY(cmpgtsl,"pcmpgtd",0x66) +BINARY(maxsl,"pmaxsd",0x383d) +BINARY(maxul,"pmaxud",0x383f) +BINARY(minsl,"pminsd",0x3839) +BINARY(minul,"pminud",0x383b) +BINARY(mulll,"pmulld",0x3840) +//BINARY(mulhsl,"pmulhd",0xe5) +//BINARY(mulhul,"pmulhud",0xe4) +BINARY(orl,"por",0xeb) +//UNARY(signl,"psignd",0x380a) +BINARY(subl,"psubd",0xfa) +//BINARY(subssl,"psubsd",0xe9) +//BINARY(subusl,"psubusd",0xd9) +BINARY(xorl,"pxor",0xef) + +BINARY(andq,"pand",0xdb) +BINARY(andnq,"pandn",0xdf) +BINARY(orq,"por",0xeb) +BINARY(xorq,"pxor",0xef) +BINARY(cmpeqq,"pcmpeqq",0x3829) +BINARY(cmpgtsq,"pcmpgtq",0x3837) + +#ifndef MMX +BINARY(addq,"paddq",0xd4) +BINARY(subq,"psubq",0xfb) +#endif + +static void +mmx_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_paddw (p, src, dest); +} + +static void +mmx_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + if (p->loop_shift == 0) { + orc_mmx_emit_pslldq (p, 12, src); + } +#endif + orc_mmx_emit_paddd (p, src, dest); +} + +static void +mmx_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = p->vars[insn->src_args[0]].alloc; + int src2 = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + +#ifndef MMX + if (p->loop_shift <= 2) { + orc_mmx_emit_movq (p, src1, tmp); + orc_mmx_emit_pslldq (p, 16 - (1<loop_shift), tmp); + orc_mmx_emit_movq (p, src2, tmp2); + orc_mmx_emit_pslldq (p, 16 - (1<loop_shift), tmp2); + orc_mmx_emit_psadbw (p, tmp2, tmp); + } else if (p->loop_shift == 3) { + orc_mmx_emit_movq (p, src1, tmp); + orc_mmx_emit_psadbw (p, src2, tmp); + orc_mmx_emit_pslldq (p, 8, tmp); + } else { + orc_mmx_emit_movq (p, src1, tmp); + orc_mmx_emit_psadbw (p, src2, tmp); + } +#else + if (p->loop_shift <= 2) { + orc_mmx_emit_movq (p, src1, tmp); + orc_mmx_emit_psllq (p, 8*(8 - (1<loop_shift)), tmp); + orc_mmx_emit_movq (p, src2, tmp2); + orc_mmx_emit_psllq (p, 8*(8 - (1<loop_shift)), tmp2); + orc_mmx_emit_psadbw (p, tmp2, tmp); + } else { + orc_mmx_emit_movq (p, src1, tmp); + orc_mmx_emit_psadbw (p, src2, tmp); + } +#endif + orc_mmx_emit_paddd (p, tmp, dest); +} + +static void +mmx_rule_signX_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + const char * names[] = { "psignb", "psignw", "psignd" }; + int codes[] = { 0x3808, 0x3809, 0x380a }; + int type = ORC_PTR_TO_INT(user); + int tmpc; + + tmpc = orc_compiler_get_temp_constant (p, 1<vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x0001); + orc_mmx_emit_pminsw (p, tmp, dest); + + tmp = orc_compiler_get_constant (p, 2, 0xffff); + orc_mmx_emit_pmaxsw (p, tmp, dest); +} + +static void +mmx_rule_absb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_pxor (p, tmp, tmp); + orc_mmx_emit_pcmpgtb (p, src, tmp); + orc_mmx_emit_pxor (p, tmp, dest); + orc_mmx_emit_psubb (p, tmp, dest); +} + +static void +mmx_rule_absw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (src == dest) { + orc_mmx_emit_movq (p, src, tmp); + } else { + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_movq (p, tmp, dest); + } + + orc_mmx_emit_psraw (p, 15, tmp); + orc_mmx_emit_pxor (p, tmp, dest); + orc_mmx_emit_psubw (p, tmp, dest); + +} + +static void +mmx_rule_absl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (src == dest) { + orc_mmx_emit_movq (p, src, tmp); + } else { + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_movq (p, tmp, dest); + } + + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_pxor (p, tmp, dest); + orc_mmx_emit_psubd (p, tmp, dest); + +} + +static void +mmx_rule_shift (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int type = ORC_PTR_TO_INT(user); + int imm_code1[] = { 0x71, 0x71, 0x71, 0x72, 0x72, 0x72, 0x73, 0x73 }; + int imm_code2[] = { 6, 2, 4, 6, 2, 4, 6, 2 }; + int reg_code[] = { 0xf1, 0xd1, 0xe1, 0xf2, 0xd2, 0xe2, 0xf3, 0xd3 }; + const char *code[] = { "psllw", "psrlw", "psraw", "pslld", "psrld", "psrad", "psllq", "psrlq" }; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_mmx_emit_shiftimm (p, code[type], imm_code1[type], imm_code2[type], + p->vars[insn->src_args[1]].value.i, + p->vars[insn->dest_args[0]].alloc); + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME this is a gross hack to reload the register with a + * 64-bit version of the parameter. */ + orc_x86_emit_mov_memoffset_mmx (p, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[1]]), + p->exec_reg, tmp, FALSE); + + orc_mmx_emit_660f (p, code[type], reg_code[type], tmp, + p->vars[insn->dest_args[0]].alloc); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants or params"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +mmx_rule_shlb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_mmx_emit_psllw (p, p->vars[insn->src_args[1]].value.i, dest); + tmp = orc_compiler_get_constant (p, 1, + 0xff&(0xff<vars[insn->src_args[1]].value.i)); + orc_mmx_emit_pand (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +mmx_rule_shrsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psraw (p, p->vars[insn->src_args[1]].value.i, tmp); + orc_mmx_emit_psrlw (p, 8, tmp); + + orc_mmx_emit_psraw (p, 8 + p->vars[insn->src_args[1]].value.i, dest); + orc_mmx_emit_psllw (p, 8, dest); + + orc_mmx_emit_por (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +mmx_rule_shrub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_mmx_emit_psrlw (p, p->vars[insn->src_args[1]].value.i, dest); + tmp = orc_compiler_get_constant (p, 1, + (0xff>>p->vars[insn->src_args[1]].value.i)); + orc_mmx_emit_pand (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +mmx_rule_shrsq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(3,3,1,1), src, tmp); +#else + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(3,2,3,2), src, tmp); +#endif + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_psllq (p, 64-p->vars[insn->src_args[1]].value.i, tmp); + + orc_mmx_emit_psrlq (p, p->vars[insn->src_args[1]].value.i, dest); + orc_mmx_emit_por (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +mmx_rule_convsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklbw (p, src, dest); + orc_mmx_emit_psraw (p, 8, dest); +} + +static void +mmx_rule_convubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME need a zero register */ + if (0) { + orc_mmx_emit_punpcklbw (p, src, dest); + orc_mmx_emit_psrlw (p, 8, dest); + } else { + orc_mmx_emit_pxor(p, tmp, tmp); + orc_mmx_emit_punpcklbw (p, tmp, dest); + } +} + +static void +mmx_rule_convssswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_packsswb (p, src, dest); +} + +static void +mmx_rule_convsuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_packuswb (p, src, dest); +} + +static void +mmx_rule_convuuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_movq (p, src, dest); + orc_mmx_emit_psrlw (p, 15, tmp); + orc_mmx_emit_psllw (p, 14, tmp); + orc_mmx_emit_por (p, tmp, dest); + orc_mmx_emit_psllw (p, 1, tmp); + orc_mmx_emit_pxor (p, tmp, dest); + orc_mmx_emit_packuswb (p, dest, dest); +} + +static void +mmx_rule_convwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_psllw (p, 8, dest); + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_packuswb (p, dest, dest); +} + +static void +mmx_rule_convhwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_packuswb (p, dest, dest); +} + +static void +mmx_rule_convswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklwd (p, src, dest); + orc_mmx_emit_psrad (p, 16, dest); +} + +static void +mmx_rule_convuwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME need a zero register */ + if (0) { + orc_mmx_emit_punpcklwd (p, src, dest); + orc_mmx_emit_psrld (p, 16, dest); + } else { + orc_mmx_emit_pxor(p, tmp, tmp); + orc_mmx_emit_punpcklwd (p, tmp, dest); + } +} + +static void +mmx_rule_convlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_pslld (p, 16, dest); + orc_mmx_emit_psrad (p, 16, dest); + orc_mmx_emit_packssdw (p, dest, dest); +} + +static void +mmx_rule_convhlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_psrad (p, 16, dest); + orc_mmx_emit_packssdw (p, dest, dest); +} + +static void +mmx_rule_convssslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_packssdw (p, src, dest); +} + +static void +mmx_rule_convsuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_packusdw (p, src, dest); +} + +static void +mmx_rule_convslq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_punpckldq (p, tmp, dest); +} + +static void +mmx_rule_convulq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 4, 0); + orc_mmx_emit_punpckldq (p, tmp, dest); +} + +static void +mmx_rule_convql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,2,0), src, dest); +#else + orc_mmx_emit_movq (p, src, dest); +#endif +} + +static void +mmx_rule_splatw3q (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_mmx_emit_pshuflw (p, ORC_MMX_SHUF(3,3,3,3), dest, dest); + orc_mmx_emit_pshufhw (p, ORC_MMX_SHUF(3,3,3,3), dest, dest); +#else + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(3,3,3,3), dest, dest); +#endif +} + +static void +mmx_rule_splatbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklbw (p, dest, dest); +} + +static void +mmx_rule_splatbl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklbw (p, dest, dest); + orc_mmx_emit_punpcklwd (p, dest, dest); +} + +static void +mmx_rule_div255w (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 2, 0x0080); + orc_mmx_emit_paddw (p, tmpc, dest); + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_psrlw (p, 8, tmp); + orc_mmx_emit_paddw (p, tmp, dest); + orc_mmx_emit_psrlw (p, 8, dest); +} + +#if 1 +static void +mmx_rule_divluw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* About 5.2 cycles per array member on ginger */ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int a = orc_compiler_get_temp_reg (p); + int j = orc_compiler_get_temp_reg (p); + int j2 = orc_compiler_get_temp_reg (p); + int l = orc_compiler_get_temp_reg (p); + int divisor = orc_compiler_get_temp_reg (p); + int tmp; + int i; + + orc_mmx_emit_movq (p, src, divisor); + orc_mmx_emit_psllw (p, 8, divisor); + orc_mmx_emit_psrlw (p, 1, divisor); + + orc_mmx_load_constant (p, a, 2, 0x00ff); + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_mmx_emit_movq (p, tmp, j); + orc_mmx_emit_psrlw (p, 8, j); + + orc_mmx_emit_pxor (p, tmp, dest); + + for(i=0;i<7;i++){ + orc_mmx_emit_movq (p, divisor, l); + orc_mmx_emit_pxor (p, tmp, l); + orc_mmx_emit_pcmpgtw (p, dest, l); + orc_mmx_emit_movq (p, l, j2); + orc_mmx_emit_pandn (p, divisor, l); + orc_mmx_emit_psubw (p, l, dest); + orc_mmx_emit_psrlw (p, 1, divisor); + + orc_mmx_emit_pand (p, j, j2); + orc_mmx_emit_pxor (p, j2, a); + orc_mmx_emit_psrlw (p, 1, j); + } + + orc_mmx_emit_movq (p, divisor, l); + orc_mmx_emit_pxor (p, tmp, l); + orc_mmx_emit_pcmpgtw (p, dest, l); + orc_mmx_emit_pand (p, j, l); + orc_mmx_emit_pxor (p, l, a); + + orc_mmx_emit_movq (p, a, dest); +} +#else +static void +mmx_rule_divluw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* About 8.4 cycles per array member on ginger */ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int b = orc_compiler_get_temp_reg (p); + int a = orc_compiler_get_temp_reg (p); + int k = orc_compiler_get_temp_reg (p); + int j = orc_compiler_get_temp_reg (p); + int tmp; + int i; + + orc_mmx_emit_movq (p, dest, b); + tmp = orc_compiler_get_constant (p, 2, 0x00ff); + orc_mmx_emit_pand (p, tmp, src); + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_mmx_emit_pxor (p, tmp, b); + + orc_mmx_emit_pxor (p, a, a); + orc_mmx_emit_movq (p, tmp, j); + orc_mmx_emit_psrlw (p, 8, j); + + for(i=0;i<8;i++){ + orc_mmx_emit_por (p, j, a); + orc_mmx_emit_movq (p, a, k); + orc_mmx_emit_pmullw (p, src, k); + orc_mmx_emit_pxor (p, tmp, k); + orc_mmx_emit_pcmpgtw (p, b, k); + orc_mmx_emit_pand (p, j, k); + orc_mmx_emit_pxor (p, k, a); + orc_mmx_emit_psrlw (p, 1, j); + } + + orc_mmx_emit_movq (p, a, dest); +} +#endif + +static void +mmx_rule_mulsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_punpcklbw (p, src, tmp); + orc_mmx_emit_psraw (p, 8, tmp); + orc_mmx_emit_punpcklbw (p, dest, dest); + orc_mmx_emit_psraw (p, 8, dest); + orc_mmx_emit_pmullw (p, tmp, dest); +} + +static void +mmx_rule_mulubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_punpcklbw (p, src, tmp); + orc_mmx_emit_psrlw (p, 8, tmp); + orc_mmx_emit_punpcklbw (p, dest, dest); + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_pmullw (p, tmp, dest); +} + +static void +mmx_rule_mullb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, dest, tmp); + + orc_mmx_emit_pmullw (p, src, dest); + orc_mmx_emit_psllw (p, 8, dest); + orc_mmx_emit_psrlw (p, 8, dest); + + orc_mmx_emit_movq (p, src, tmp2); + orc_mmx_emit_psraw (p, 8, tmp2); + orc_mmx_emit_psraw (p, 8, tmp); + orc_mmx_emit_pmullw (p, tmp2, tmp); + orc_mmx_emit_psllw (p, 8, tmp); + + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_movq (p, dest, tmp2); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psraw (p, 8, tmp); + + orc_mmx_emit_psllw (p, 8, dest); + orc_mmx_emit_psraw (p, 8, dest); + + orc_mmx_emit_pmullw (p, tmp, dest); + orc_mmx_emit_psrlw (p, 8, dest); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psraw (p, 8, tmp); + orc_mmx_emit_psraw (p, 8, tmp2); + orc_mmx_emit_pmullw (p, tmp, tmp2); + orc_mmx_emit_psrlw (p, 8, tmp2); + orc_mmx_emit_psllw (p, 8, tmp2); + orc_mmx_emit_por (p, tmp2, dest); +} + +static void +mmx_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_movq (p, dest, tmp2); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psrlw (p, 8, tmp); + + orc_mmx_emit_psllw (p, 8, dest); + orc_mmx_emit_psrlw (p, 8, dest); + + orc_mmx_emit_pmullw (p, tmp, dest); + orc_mmx_emit_psrlw (p, 8, dest); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psrlw (p, 8, tmp); + orc_mmx_emit_psrlw (p, 8, tmp2); + orc_mmx_emit_pmullw (p, tmp, tmp2); + orc_mmx_emit_psrlw (p, 8, tmp2); + orc_mmx_emit_psllw (p, 8, tmp2); + orc_mmx_emit_por (p, tmp2, dest); +} + +static void +mmx_rule_mulswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pmulhw (p, src, tmp); + orc_mmx_emit_pmullw (p, src, dest); + orc_mmx_emit_punpcklwd (p, tmp, dest); +} + +static void +mmx_rule_muluwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pmulhuw (p, src, tmp); + orc_mmx_emit_pmullw (p, src, dest); + orc_mmx_emit_punpcklwd (p, tmp, dest); +} + +static void +mmx_rule_mulll_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int i; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + orc_x86_emit_mov_mmx_memoffset (p, 16, p->vars[insn->src_args[0]].alloc, + offset, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_mmx_memoffset (p, 16, p->vars[insn->src_args[1]].alloc, + offset + 16, p->exec_reg, FALSE, FALSE); + + for(i=0;i<(1<insn_shift);i++) { + orc_x86_emit_mov_memoffset_reg (p, 4, offset + 4*i, p->exec_reg, + p->gp_tmpreg); + orc_x86_emit_imul_memoffset_reg (p, 4, offset + 16+4*i, p->exec_reg, + p->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (p, 4, p->gp_tmpreg, offset + 4*i, + p->exec_reg); + } + + orc_x86_emit_mov_memoffset_mmx (p, 16, offset, p->exec_reg, + p->vars[insn->dest_args[0]].alloc, FALSE); +} + +#ifndef MMX +static void +mmx_rule_mulhsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,3,0,1), dest, tmp); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,3,0,1), src, tmp2); + orc_mmx_emit_pmuldq (p, src, dest); + orc_mmx_emit_pmuldq (p, tmp, tmp2); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,3,1), dest, dest); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,3,1), tmp2, tmp2); + orc_mmx_emit_punpckldq (p, tmp2, dest); +} +#endif + +static void +mmx_rule_mulhsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int i; + int regsize = p->is_64bit ? 8 : 4; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + orc_x86_emit_mov_mmx_memoffset (p, 16, p->vars[insn->src_args[0]].alloc, + offset, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_mmx_memoffset (p, 16, p->vars[insn->src_args[1]].alloc, + offset + 16, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_reg_memoffset (p, regsize, X86_EAX, offset + 32, + p->exec_reg); + orc_x86_emit_mov_reg_memoffset (p, regsize, X86_EDX, offset + 40, + p->exec_reg); + + for(i=0;i<(1<insn_shift);i++) { + orc_x86_emit_mov_memoffset_reg (p, 4, offset + 4*i, p->exec_reg, X86_EAX); + ORC_ASM_CODE(p," imull %d(%%%s)\n", offset + 16 + 4*i, + orc_x86_get_regname_ptr(p, p->exec_reg)); + orc_x86_emit_rex(p, 4, 0, 0, p->exec_reg); + *p->codeptr++ = 0xf7; + orc_x86_emit_modrm_memoffset (p, 5, offset + 16 + 4*i, p->exec_reg); + orc_x86_emit_mov_reg_memoffset (p, 4, X86_EDX, offset + 4*i, p->exec_reg); + } + + orc_x86_emit_mov_memoffset_mmx (p, 16, offset, p->exec_reg, + p->vars[insn->dest_args[0]].alloc, FALSE); + orc_x86_emit_mov_memoffset_reg (p, 8, offset + 32, p->exec_reg, X86_EAX); + orc_x86_emit_mov_memoffset_reg (p, 8, offset + 40, p->exec_reg, X86_EDX); +} + +#ifndef MMX +static void +mmx_rule_mulhul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,3,0,1), dest, tmp); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,3,0,1), src, tmp2); + orc_mmx_emit_pmuludq (p, src, dest); + orc_mmx_emit_pmuludq (p, tmp, tmp2); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,3,1), dest, dest); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,3,1), tmp2, tmp2); + orc_mmx_emit_punpckldq (p, tmp2, dest); +} +#endif + +static void +mmx_rule_mulslq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_punpckldq (p, dest, dest); + orc_mmx_emit_punpckldq (p, tmp, tmp); + orc_mmx_emit_pmuldq (p, tmp, dest); +} + +#ifndef MMX +static void +mmx_rule_mululq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_punpckldq (p, dest, dest); + orc_mmx_emit_punpckldq (p, tmp, tmp); + orc_mmx_emit_pmuludq (p, tmp, dest); +} +#endif + +static void +mmx_rule_select0lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + /* same as convlw */ + + orc_mmx_emit_pslld (p, 16, dest); + orc_mmx_emit_psrad (p, 16, dest); + orc_mmx_emit_packssdw (p, dest, dest); +} + +static void +mmx_rule_select1lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + + orc_mmx_emit_psrad (p, 16, dest); + orc_mmx_emit_packssdw (p, dest, dest); +} + +static void +mmx_rule_select0ql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* same as convql */ +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,2,0), src, dest); +#else + orc_mmx_emit_movq (p, src, dest); +#endif +} + +static void +mmx_rule_select1ql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_psrlq (p, 32, dest); +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,2,0), src, dest); +#else + orc_mmx_emit_movq (p, src, dest); +#endif +} + +static void +mmx_rule_select0wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + /* same as convwb */ + + orc_mmx_emit_psllw (p, 8, dest); + orc_mmx_emit_psraw (p, 8, dest); + orc_mmx_emit_packsswb (p, dest, dest); +} + +static void +mmx_rule_select1wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + + orc_mmx_emit_psraw (p, 8, dest); + orc_mmx_emit_packsswb (p, dest, dest); +} + +static void +mmx_rule_splitql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,0,2,0), src, dest2); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(3,1,3,1), src, dest1); +#else + orc_mmx_emit_movq (p, src, dest2); + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(3,2,3,2), src, dest1); +#endif +} + +static void +mmx_rule_splitlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + + /* FIXME slow */ + + orc_mmx_emit_psrad (p, 16, dest1); + orc_mmx_emit_packssdw (p, dest1, dest1); + + if (dest2 != src) { + orc_mmx_emit_movq (p, src, dest2); + } + orc_mmx_emit_pslld (p, 16, dest2); + orc_mmx_emit_psrad (p, 16, dest2); + orc_mmx_emit_packssdw (p, dest2, dest2); + +} + +static void +mmx_rule_splitwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + int tmp = orc_compiler_get_constant (p, 2, 0xff); + + /* FIXME slow */ + + orc_mmx_emit_psraw (p, 8, dest1); + orc_mmx_emit_packsswb (p, dest1, dest1); + + if (dest2 != src) { + orc_mmx_emit_movq (p, src, dest2); + } + +#if 0 + orc_mmx_emit_psllw (p, 8, dest2); + orc_mmx_emit_psraw (p, 8, dest2); + orc_mmx_emit_packsswb (p, dest2, dest2); +#else + orc_mmx_emit_pand (p, tmp, dest2); + orc_mmx_emit_packuswb (p, dest2, dest2); +#endif +} + +static void +mmx_rule_mergebw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklbw (p, src, dest); +} + +static void +mmx_rule_mergewl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpcklwd (p, src, dest); +} + +static void +mmx_rule_mergelq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_mmx_emit_punpckldq (p, src, dest); +} + +static void +mmx_rule_swapw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_swapl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pslld (p, 16, tmp); + orc_mmx_emit_psrld (p, 16, dest); + orc_mmx_emit_por (p, tmp, dest); + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_swapwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pslld (p, 16, tmp); + orc_mmx_emit_psrld (p, 16, dest); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_swapq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_psllq (p, 32, tmp); + orc_mmx_emit_psrlq (p, 32, dest); + orc_mmx_emit_por (p, tmp, dest); + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pslld (p, 16, tmp); + orc_mmx_emit_psrld (p, 16, dest); + orc_mmx_emit_por (p, tmp, dest); + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_psllw (p, 8, tmp); + orc_mmx_emit_psrlw (p, 8, dest); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_swaplq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(2,3,0,1), dest, dest); +#else + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(1,0,3,2), dest, dest); +#endif +} + +#ifndef MMX +static void +mmx_rule_swapw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x02030001, 0x06070405, 0x0a0b0809, 0x0e0f0c0d); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_swapw (p, user, insn); + } +} + +static void +mmx_rule_swapl_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e0f); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_swapl (p, user, insn); + } +} + +static void +mmx_rule_swapwl_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x01000302, 0x05040706, 0x09080b0a, 0x0d0c0f0e); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_swapl (p, user, insn); + } +} + +static void +mmx_rule_swapq_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x04050607, 0x00010203, 0x0c0d0e0f, 0x08090a0b); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_swapq (p, user, insn); + } +} + +static void +mmx_rule_select0lw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x05040100, 0x0d0c0908, 0x05040100, 0x0d0c0908); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_select0lw (p, user, insn); + } +} + +static void +mmx_rule_select1lw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x07060302, 0x0f0e0b0a, 0x07060302, 0x0f0e0b0a); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_select1lw (p, user, insn); + } +} + +static void +mmx_rule_select0wb_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x06040200, 0x0e0c0a08, 0x06040200, 0x0e0c0a08); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_select0wb (p, user, insn); + } +} + +static void +mmx_rule_select1wb_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x07050301, 0x0f0d0b09, 0x07050301, 0x0f0d0b09); + if (tmp != ORC_REG_INVALID) { + orc_mmx_emit_pshufb (p, tmp, dest); + } else { + mmx_rule_select1wb (p, user, insn); + } +} +#endif + +/* slow rules */ + +static void +mmx_rule_maxuw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); + orc_mmx_emit_pmaxsw (p, src, dest); + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); +} + +static void +mmx_rule_minuw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); + orc_mmx_emit_pminsw (p, src, dest); + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); +} + +static void +mmx_rule_avgsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 1, 0x80); + + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); + orc_mmx_emit_pavgb (p, src, dest); + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); +} + +static void +mmx_rule_avgsw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); + orc_mmx_emit_pavgw (p, src, dest); + orc_mmx_emit_pxor(p, tmp, src); + orc_mmx_emit_pxor(p, tmp, dest); +} + +static void +mmx_rule_maxsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pcmpgtb (p, src, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_minsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pcmpgtb (p, dest, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_maxsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pcmpgtd (p, src, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_minsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pcmpgtd (p, dest, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_maxul_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 4, 0x80000000); + orc_mmx_emit_pxor(p, tmpc, src); + orc_mmx_emit_pxor(p, tmpc, dest); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pcmpgtd (p, src, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); + + orc_mmx_emit_pxor(p, tmpc, src); + orc_mmx_emit_pxor(p, tmpc, dest); +} + +static void +mmx_rule_minul_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 4, 0x80000000); + orc_mmx_emit_pxor(p, tmpc, src); + orc_mmx_emit_pxor(p, tmpc, dest); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pcmpgtd (p, dest, tmp); + orc_mmx_emit_pand (p, tmp, dest); + orc_mmx_emit_pandn (p, src, tmp); + orc_mmx_emit_por (p, tmp, dest); + + orc_mmx_emit_pxor(p, tmpc, src); + orc_mmx_emit_pxor(p, tmpc, dest); +} + +static void +mmx_rule_avgsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* (a+b+1) >> 1 = (a|b) - ((a^b)>>1) */ + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pxor(p, src, tmp); + orc_mmx_emit_psrad(p, 1, tmp); + + orc_mmx_emit_por(p, src, dest); + orc_mmx_emit_psubd(p, tmp, dest); +} + +static void +mmx_rule_avgul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* (a+b+1) >> 1 = (a|b) - ((a^b)>>1) */ + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_pxor(p, src, tmp); + orc_mmx_emit_psrld(p, 1, tmp); + + orc_mmx_emit_por(p, src, dest); + orc_mmx_emit_psubd(p, tmp, dest); +} + +static void +mmx_rule_addssl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); +#if 0 + int tmp2 = orc_compiler_get_temp_reg (p); + int tmp3 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pand (p, dest, tmp); + + orc_mmx_emit_movq (p, src, tmp2); + orc_mmx_emit_pxor (p, dest, tmp2); + orc_mmx_emit_psrad (p, 1, tmp2); + orc_mmx_emit_paddd (p, tmp2, tmp); + + orc_mmx_emit_psrad (p, 30, tmp); + orc_mmx_emit_pslld (p, 30, tmp); + orc_mmx_emit_movq (p, tmp, tmp2); + orc_mmx_emit_pslld (p, 1, tmp2); + orc_mmx_emit_movq (p, tmp, tmp3); + orc_mmx_emit_pxor (p, tmp2, tmp3); + orc_mmx_emit_psrad (p, 31, tmp3); + + orc_mmx_emit_psrad (p, 31, tmp2); + tmp = orc_compiler_get_constant (p, 4, 0x80000000); + orc_mmx_emit_pxor (p, tmp, tmp2); // clamped value + orc_mmx_emit_pand (p, tmp3, tmp2); + + orc_mmx_emit_paddd (p, src, dest); + orc_mmx_emit_pandn (p, dest, tmp3); // tmp is mask: ~0 is for clamping + orc_mmx_emit_movq (p, tmp3, dest); + + orc_mmx_emit_por (p, tmp2, dest); +#endif + + int s = orc_compiler_get_temp_reg (p); + int t = orc_compiler_get_temp_reg (p); + + /* + From Tim Terriberry: (slightly faster than above) + + m=0xFFFFFFFF; + s=_a; + t=_a; + s^=_b; + _a+=_b; + t^=_a; + t^=m; + m>>=1; + s|=t; + t=_b; + s>>=31; + t>>=31; + _a&=s; + t^=m; + s=~s&t; + _a|=s; + */ + + orc_mmx_emit_movq (p, dest, s); + orc_mmx_emit_movq (p, dest, t); + orc_mmx_emit_pxor (p, src, s); + orc_mmx_emit_paddd (p, src, dest); + orc_mmx_emit_pxor (p, dest, t); + tmp = orc_compiler_get_constant (p, 4, 0xffffffff); + orc_mmx_emit_pxor (p, tmp, t); + orc_mmx_emit_por (p, t, s); + orc_mmx_emit_movq (p, src, t); + orc_mmx_emit_psrad (p, 31, s); + orc_mmx_emit_psrad (p, 31, t); + orc_mmx_emit_pand (p, s, dest); + tmp = orc_compiler_get_constant (p, 4, 0x7fffffff); + orc_mmx_emit_pxor (p, tmp, t); + orc_mmx_emit_pandn (p, t, s); + orc_mmx_emit_por (p, s, dest); +} + +static void +mmx_rule_subssl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + int tmp3 = orc_compiler_get_temp_reg (p); + + tmp = orc_compiler_get_temp_constant (p, 4, 0xffffffff); + orc_mmx_emit_pxor (p, src, tmp); + orc_mmx_emit_movq (p, tmp, tmp2); + orc_mmx_emit_por (p, dest, tmp); + + orc_mmx_emit_pxor (p, dest, tmp2); + orc_mmx_emit_psrad (p, 1, tmp2); + orc_mmx_emit_psubd (p, tmp2, tmp); + + orc_mmx_emit_psrad (p, 30, tmp); + orc_mmx_emit_pslld (p, 30, tmp); + orc_mmx_emit_movq (p, tmp, tmp2); + orc_mmx_emit_pslld (p, 1, tmp2); + orc_mmx_emit_movq (p, tmp, tmp3); + orc_mmx_emit_pxor (p, tmp2, tmp3); + orc_mmx_emit_psrad (p, 31, tmp3); // tmp3 is mask: ~0 is for clamping + + orc_mmx_emit_psrad (p, 31, tmp2); + tmp = orc_compiler_get_constant (p, 4, 0x80000000); + orc_mmx_emit_pxor (p, tmp, tmp2); // clamped value + orc_mmx_emit_pand (p, tmp3, tmp2); + + orc_mmx_emit_psubd (p, src, dest); + orc_mmx_emit_pandn (p, dest, tmp3); + orc_mmx_emit_movq (p, tmp3, dest); + + orc_mmx_emit_por (p, tmp2, dest); + +} + +static void +mmx_rule_addusl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + +#if 0 + /* an alternate version. slower. */ + /* Compute the bit that gets carried from bit 0 to bit 1 */ + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pand (p, dest, tmp); + orc_mmx_emit_pslld (p, 31, tmp); + orc_mmx_emit_psrld (p, 31, tmp); + + /* Add in (src>>1) */ + orc_mmx_emit_movq (p, src, tmp2); + orc_mmx_emit_psrld (p, 1, tmp2); + orc_mmx_emit_paddd (p, tmp2, tmp); + + /* Add in (dest>>1) */ + orc_mmx_emit_movq (p, dest, tmp2); + orc_mmx_emit_psrld (p, 1, tmp2); + orc_mmx_emit_paddd (p, tmp2, tmp); + + /* turn overflow bit into mask */ + orc_mmx_emit_psrad (p, 31, tmp); + + /* compute the sum, then or over the mask */ + orc_mmx_emit_paddd (p, src, dest); + orc_mmx_emit_por (p, tmp, dest); +#endif + + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_pand (p, dest, tmp); + + orc_mmx_emit_movq (p, src, tmp2); + orc_mmx_emit_pxor (p, dest, tmp2); + orc_mmx_emit_psrld (p, 1, tmp2); + orc_mmx_emit_paddd (p, tmp2, tmp); + + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_paddd (p, src, dest); + orc_mmx_emit_por (p, tmp, dest); +} + +static void +mmx_rule_subusl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_mmx_emit_movq (p, src, tmp2); + orc_mmx_emit_psrld (p, 1, tmp2); + + orc_mmx_emit_movq (p, dest, tmp); + orc_mmx_emit_psrld (p, 1, tmp); + orc_mmx_emit_psubd (p, tmp, tmp2); + + /* turn overflow bit into mask */ + orc_mmx_emit_psrad (p, 31, tmp2); + + /* compute the difference, then and over the mask */ + orc_mmx_emit_psubd (p, src, dest); + orc_mmx_emit_pand (p, tmp2, dest); + +} + +#ifndef MMX +/* float ops */ + +#define UNARY_F(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_0f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY_F(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_0f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +BINARY_F(addf, "addps", 0x58) +BINARY_F(subf, "subps", 0x5c) +BINARY_F(mulf, "mulps", 0x59) +BINARY_F(divf, "divps", 0x5e) +UNARY_F(sqrtf, "sqrtps", 0x51) + +#define UNARY_D(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY_D(opcode,insn_name,code) \ +static void \ +mmx_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +BINARY_D(addd, "addpd", 0x58) +BINARY_D(subd, "subpd", 0x5c) +BINARY_D(muld, "mulpd", 0x59) +BINARY_D(divd, "divpd", 0x5e) +UNARY_D(sqrtd, "sqrtpd", 0x51) + +static void +mmx_rule_minf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_mmx_emit_0f (p, "minps", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_mmx_emit_movq (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_mmx_emit_0f (p, "minps", 0x5d, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_mmx_emit_0f (p, "minps", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_mmx_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +mmx_rule_mind (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_mmx_emit_660f (p, "minpd", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_mmx_emit_movq (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_mmx_emit_660f (p, "minpd", 0x5d, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_mmx_emit_660f (p, "minpd", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_mmx_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +mmx_rule_maxf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_mmx_emit_0f (p, "maxps", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_mmx_emit_movq (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_mmx_emit_0f (p, "maxps", 0x5f, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_mmx_emit_0f (p, "maxps", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_mmx_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +mmx_rule_maxd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_mmx_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_mmx_emit_movq (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_mmx_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_mmx_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_mmx_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +mmx_rule_cmpeqf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_0f (p, "cmpeqps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x00; +} + +static void +mmx_rule_cmpeqd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_660f (p, "cmpeqpd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x00; +} + + +static void +mmx_rule_cmpltf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_0f (p, "cmpltps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x01; +} + +static void +mmx_rule_cmpltd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_660f (p, "cmpltpd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x01; +} + + +static void +mmx_rule_cmplef (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_0f (p, "cmpleps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x02; +} + +static void +mmx_rule_cmpled (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_660f (p, "cmplepd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x02; +} + + +static void +mmx_rule_convfl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmpc; + int tmp = orc_compiler_get_temp_reg (p); + + tmpc = orc_compiler_get_temp_constant (p, 4, 0x80000000); + orc_mmx_emit_movq (p, src, tmp); + orc_mmx_emit_f30f (p, "cvttps2dq", 0x5b, src, dest); + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_pcmpeqd (p, dest, tmpc); + orc_mmx_emit_pandn (p, tmpc, tmp); + orc_mmx_emit_paddd (p, tmp, dest); + +} + +static void +mmx_rule_convdl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmpc; + int tmp = orc_compiler_get_temp_reg (p); + + tmpc = orc_compiler_get_temp_constant (p, 4, 0x80000000); + orc_mmx_emit_pshufd (p, ORC_MMX_SHUF(3,1,3,1), src, tmp); + orc_mmx_emit_660f (p, "cvttpd2dq", 0xe6, src, dest); + orc_mmx_emit_psrad (p, 31, tmp); + orc_mmx_emit_pcmpeqd (p, dest, tmpc); + orc_mmx_emit_pandn (p, tmpc, tmp); + orc_mmx_emit_paddd (p, tmp, dest); +} + +static void +mmx_rule_convlf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_0f (p, "cvtdq2ps", 0x5b, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +mmx_rule_convld (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_f30f (p, "cvtdq2pd", 0xe6, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +mmx_rule_convfd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_0f (p, "cvtps2pd", 0x5a, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +mmx_rule_convdf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_mmx_emit_660f (p, "cvtpd2ps", 0x5a, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} +#endif + +#define UNARY_SSE41(opcode,insn_name) \ +static void \ +mmx_rule_ ## opcode ## _mmx41 (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_mmx_emit_ ## insn_name (p, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +UNARY_SSE41(convsbw,pmovsxbw); +UNARY_SSE41(convswl,pmovsxwd); +UNARY_SSE41(convslq,pmovsxdq); +UNARY_SSE41(convubw,pmovzxbw); +UNARY_SSE41(convuwl,pmovzxwd); +UNARY_SSE41(convulq,pmovzxdq); + + +void +orc_compiler_mmx_register_rules (OrcTarget *target) +{ + OrcRuleSet *rule_set; + +#define REG(x) \ + orc_rule_register (rule_set, #x , mmx_rule_ ## x, NULL) + + /* SSE 2 */ +#ifndef MMX + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_MMXEXT); +#else + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_MMX); +#endif + + orc_rule_register (rule_set, "loadb", mmx_rule_loadX, NULL); + orc_rule_register (rule_set, "loadw", mmx_rule_loadX, NULL); + orc_rule_register (rule_set, "loadl", mmx_rule_loadX, NULL); + orc_rule_register (rule_set, "loadq", mmx_rule_loadX, NULL); + orc_rule_register (rule_set, "loadoffb", mmx_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffw", mmx_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffl", mmx_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadupdb", mmx_rule_loadupdb, NULL); + orc_rule_register (rule_set, "loadupib", mmx_rule_loadupib, NULL); + orc_rule_register (rule_set, "loadpb", mmx_rule_loadpX, (void *)1); + orc_rule_register (rule_set, "loadpw", mmx_rule_loadpX, (void *)2); + orc_rule_register (rule_set, "loadpl", mmx_rule_loadpX, (void *)4); + orc_rule_register (rule_set, "loadpq", mmx_rule_loadpX, (void *)8); + orc_rule_register (rule_set, "ldresnearl", mmx_rule_ldresnearl, NULL); + orc_rule_register (rule_set, "ldreslinl", mmx_rule_ldreslinl, NULL); + + orc_rule_register (rule_set, "storeb", mmx_rule_storeX, NULL); + orc_rule_register (rule_set, "storew", mmx_rule_storeX, NULL); + orc_rule_register (rule_set, "storel", mmx_rule_storeX, NULL); + orc_rule_register (rule_set, "storeq", mmx_rule_storeX, NULL); + + REG(addb); + REG(addssb); + REG(addusb); + REG(andb); + REG(andnb); + REG(avgub); + REG(cmpeqb); + REG(cmpgtsb); + REG(maxub); + REG(minub); + REG(orb); + REG(subb); + REG(subssb); + REG(subusb); + REG(xorb); + + REG(addw); + REG(addssw); + REG(addusw); + REG(andw); + REG(andnw); + REG(avguw); + REG(cmpeqw); + REG(cmpgtsw); + REG(maxsw); + REG(minsw); + REG(mullw); + REG(mulhsw); + REG(mulhuw); + REG(orw); + REG(subw); + REG(subssw); + REG(subusw); + REG(xorw); + + REG(addl); + REG(andl); + REG(andnl); + REG(cmpeql); + REG(cmpgtsl); + REG(orl); + REG(subl); + REG(xorl); + + REG(andq); + REG(andnq); + REG(orq); + REG(xorq); + + REG(select0ql); + REG(select1ql); + REG(select0lw); + REG(select1lw); + REG(select0wb); + REG(select1wb); + REG(mergebw); + REG(mergewl); + REG(mergelq); + + orc_rule_register (rule_set, "copyb", mmx_rule_copyx, NULL); + orc_rule_register (rule_set, "copyw", mmx_rule_copyx, NULL); + orc_rule_register (rule_set, "copyl", mmx_rule_copyx, NULL); + orc_rule_register (rule_set, "copyq", mmx_rule_copyx, NULL); + + orc_rule_register (rule_set, "shlw", mmx_rule_shift, (void *)0); + orc_rule_register (rule_set, "shruw", mmx_rule_shift, (void *)1); + orc_rule_register (rule_set, "shrsw", mmx_rule_shift, (void *)2); + orc_rule_register (rule_set, "shll", mmx_rule_shift, (void *)3); + orc_rule_register (rule_set, "shrul", mmx_rule_shift, (void *)4); + orc_rule_register (rule_set, "shrsl", mmx_rule_shift, (void *)5); + orc_rule_register (rule_set, "shlq", mmx_rule_shift, (void *)6); + orc_rule_register (rule_set, "shruq", mmx_rule_shift, (void *)7); + orc_rule_register (rule_set, "shrsq", mmx_rule_shrsq, NULL); + + orc_rule_register (rule_set, "convsbw", mmx_rule_convsbw, NULL); + orc_rule_register (rule_set, "convubw", mmx_rule_convubw, NULL); + orc_rule_register (rule_set, "convssswb", mmx_rule_convssswb, NULL); + orc_rule_register (rule_set, "convsuswb", mmx_rule_convsuswb, NULL); + orc_rule_register (rule_set, "convuuswb", mmx_rule_convuuswb, NULL); + orc_rule_register (rule_set, "convwb", mmx_rule_convwb, NULL); + + orc_rule_register (rule_set, "convswl", mmx_rule_convswl, NULL); + orc_rule_register (rule_set, "convuwl", mmx_rule_convuwl, NULL); + orc_rule_register (rule_set, "convssslw", mmx_rule_convssslw, NULL); + + orc_rule_register (rule_set, "convql", mmx_rule_convql, NULL); + orc_rule_register (rule_set, "convslq", mmx_rule_convslq, NULL); + orc_rule_register (rule_set, "convulq", mmx_rule_convulq, NULL); + //orc_rule_register (rule_set, "convsssql", mmx_rule_convsssql, NULL); + + orc_rule_register (rule_set, "mulsbw", mmx_rule_mulsbw, NULL); + orc_rule_register (rule_set, "mulubw", mmx_rule_mulubw, NULL); + orc_rule_register (rule_set, "mulswl", mmx_rule_mulswl, NULL); + orc_rule_register (rule_set, "muluwl", mmx_rule_muluwl, NULL); + + orc_rule_register (rule_set, "accw", mmx_rule_accw, NULL); + orc_rule_register (rule_set, "accl", mmx_rule_accl, NULL); + orc_rule_register (rule_set, "accsadubl", mmx_rule_accsadubl, NULL); + +#ifndef MMX + /* These require the SSE2 flag, although could be used with MMX. + That flag is not yet handled. */ + orc_rule_register (rule_set, "mululq", mmx_rule_mululq, NULL); + REG(addq); + REG(subq); + + orc_rule_register (rule_set, "addf", mmx_rule_addf, NULL); + orc_rule_register (rule_set, "subf", mmx_rule_subf, NULL); + orc_rule_register (rule_set, "mulf", mmx_rule_mulf, NULL); + orc_rule_register (rule_set, "divf", mmx_rule_divf, NULL); + orc_rule_register (rule_set, "minf", mmx_rule_minf, NULL); + orc_rule_register (rule_set, "maxf", mmx_rule_maxf, NULL); + orc_rule_register (rule_set, "sqrtf", mmx_rule_sqrtf, NULL); + orc_rule_register (rule_set, "cmpeqf", mmx_rule_cmpeqf, NULL); + orc_rule_register (rule_set, "cmpltf", mmx_rule_cmpltf, NULL); + orc_rule_register (rule_set, "cmplef", mmx_rule_cmplef, NULL); + orc_rule_register (rule_set, "convfl", mmx_rule_convfl, NULL); + orc_rule_register (rule_set, "convlf", mmx_rule_convlf, NULL); + + orc_rule_register (rule_set, "addd", mmx_rule_addd, NULL); + orc_rule_register (rule_set, "subd", mmx_rule_subd, NULL); + orc_rule_register (rule_set, "muld", mmx_rule_muld, NULL); + orc_rule_register (rule_set, "divd", mmx_rule_divd, NULL); + orc_rule_register (rule_set, "mind", mmx_rule_mind, NULL); + orc_rule_register (rule_set, "maxd", mmx_rule_maxd, NULL); + orc_rule_register (rule_set, "sqrtd", mmx_rule_sqrtd, NULL); + orc_rule_register (rule_set, "cmpeqd", mmx_rule_cmpeqd, NULL); + orc_rule_register (rule_set, "cmpltd", mmx_rule_cmpltd, NULL); + orc_rule_register (rule_set, "cmpled", mmx_rule_cmpled, NULL); + orc_rule_register (rule_set, "convdl", mmx_rule_convdl, NULL); + orc_rule_register (rule_set, "convld", mmx_rule_convld, NULL); + + orc_rule_register (rule_set, "convfd", mmx_rule_convfd, NULL); + orc_rule_register (rule_set, "convdf", mmx_rule_convdf, NULL); +#endif + + /* slow rules */ + orc_rule_register (rule_set, "maxuw", mmx_rule_maxuw_slow, NULL); + orc_rule_register (rule_set, "minuw", mmx_rule_minuw_slow, NULL); + orc_rule_register (rule_set, "avgsb", mmx_rule_avgsb_slow, NULL); + orc_rule_register (rule_set, "avgsw", mmx_rule_avgsw_slow, NULL); + orc_rule_register (rule_set, "maxsb", mmx_rule_maxsb_slow, NULL); + orc_rule_register (rule_set, "minsb", mmx_rule_minsb_slow, NULL); + orc_rule_register (rule_set, "maxsl", mmx_rule_maxsl_slow, NULL); + orc_rule_register (rule_set, "minsl", mmx_rule_minsl_slow, NULL); + orc_rule_register (rule_set, "maxul", mmx_rule_maxul_slow, NULL); + orc_rule_register (rule_set, "minul", mmx_rule_minul_slow, NULL); + orc_rule_register (rule_set, "convlw", mmx_rule_convlw, NULL); + orc_rule_register (rule_set, "signw", mmx_rule_signw_slow, NULL); + orc_rule_register (rule_set, "absb", mmx_rule_absb_slow, NULL); + orc_rule_register (rule_set, "absw", mmx_rule_absw_slow, NULL); + orc_rule_register (rule_set, "absl", mmx_rule_absl_slow, NULL); + orc_rule_register (rule_set, "swapw", mmx_rule_swapw, NULL); + orc_rule_register (rule_set, "swapl", mmx_rule_swapl, NULL); + orc_rule_register (rule_set, "swapwl", mmx_rule_swapwl, NULL); + orc_rule_register (rule_set, "swapq", mmx_rule_swapq, NULL); + orc_rule_register (rule_set, "swaplq", mmx_rule_swaplq, NULL); + orc_rule_register (rule_set, "splitql", mmx_rule_splitql, NULL); + orc_rule_register (rule_set, "splitlw", mmx_rule_splitlw, NULL); + orc_rule_register (rule_set, "splitwb", mmx_rule_splitwb, NULL); + orc_rule_register (rule_set, "avgsl", mmx_rule_avgsl, NULL); + orc_rule_register (rule_set, "avgul", mmx_rule_avgul, NULL); + orc_rule_register (rule_set, "shlb", mmx_rule_shlb, NULL); + orc_rule_register (rule_set, "shrsb", mmx_rule_shrsb, NULL); + orc_rule_register (rule_set, "shrub", mmx_rule_shrub, NULL); + orc_rule_register (rule_set, "mulll", mmx_rule_mulll_slow, NULL); + orc_rule_register (rule_set, "mulhsl", mmx_rule_mulhsl_slow, NULL); +#ifndef MMX + orc_rule_register (rule_set, "mulhul", mmx_rule_mulhul, NULL); +#endif + orc_rule_register (rule_set, "mullb", mmx_rule_mullb, NULL); + orc_rule_register (rule_set, "mulhsb", mmx_rule_mulhsb, NULL); + orc_rule_register (rule_set, "mulhub", mmx_rule_mulhub, NULL); + orc_rule_register (rule_set, "addssl", mmx_rule_addssl_slow, NULL); + orc_rule_register (rule_set, "subssl", mmx_rule_subssl_slow, NULL); + orc_rule_register (rule_set, "addusl", mmx_rule_addusl_slow, NULL); + orc_rule_register (rule_set, "subusl", mmx_rule_subusl_slow, NULL); + orc_rule_register (rule_set, "convhwb", mmx_rule_convhwb, NULL); + orc_rule_register (rule_set, "convhlw", mmx_rule_convhlw, NULL); + orc_rule_register (rule_set, "splatw3q", mmx_rule_splatw3q, NULL); + orc_rule_register (rule_set, "splatbw", mmx_rule_splatbw, NULL); + orc_rule_register (rule_set, "splatbl", mmx_rule_splatbl, NULL); + orc_rule_register (rule_set, "div255w", mmx_rule_div255w, NULL); + orc_rule_register (rule_set, "divluw", mmx_rule_divluw, NULL); + + /* SSE 3 -- no rules */ + + /* SSSE 3 */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_SSSE3); + + orc_rule_register (rule_set, "signb", mmx_rule_signX_ssse3, (void *)0); + orc_rule_register (rule_set, "signw", mmx_rule_signX_ssse3, (void *)1); + orc_rule_register (rule_set, "signl", mmx_rule_signX_ssse3, (void *)2); + REG(absb); + REG(absw); + REG(absl); +#ifndef MMX + orc_rule_register (rule_set, "swapw", mmx_rule_swapw_ssse3, NULL); + orc_rule_register (rule_set, "swapl", mmx_rule_swapl_ssse3, NULL); + orc_rule_register (rule_set, "swapwl", mmx_rule_swapwl_ssse3, NULL); + orc_rule_register (rule_set, "swapq", mmx_rule_swapq_ssse3, NULL); + orc_rule_register (rule_set, "select0lw", mmx_rule_select0lw_ssse3, NULL); + orc_rule_register (rule_set, "select1lw", mmx_rule_select1lw_ssse3, NULL); + orc_rule_register (rule_set, "select0wb", mmx_rule_select0wb_ssse3, NULL); + orc_rule_register (rule_set, "select1wb", mmx_rule_select1wb_ssse3, NULL); +#endif + + /* SSE 4.1 */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_SSE4_1); + + REG(maxsb); + REG(minsb); + REG(maxuw); + REG(minuw); + REG(maxsl); + REG(maxul); + REG(minsl); + REG(minul); + REG(mulll); + orc_rule_register (rule_set, "convsbw", mmx_rule_convsbw_mmx41, NULL); + orc_rule_register (rule_set, "convswl", mmx_rule_convswl_mmx41, NULL); + orc_rule_register (rule_set, "convslq", mmx_rule_convslq_mmx41, NULL); + orc_rule_register (rule_set, "convubw", mmx_rule_convubw_mmx41, NULL); + orc_rule_register (rule_set, "convuwl", mmx_rule_convuwl_mmx41, NULL); + orc_rule_register (rule_set, "convulq", mmx_rule_convulq_mmx41, NULL); + orc_rule_register (rule_set, "convsuslw", mmx_rule_convsuslw, NULL); + orc_rule_register (rule_set, "mulslq", mmx_rule_mulslq, NULL); +#ifndef MMX + orc_rule_register (rule_set, "mulhsl", mmx_rule_mulhsl, NULL); +#endif + REG(cmpeqq); + + /* SSE 4.2 -- no rules */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_SSE4_2); + + REG(cmpgtsq); + + /* SSE 4a -- no rules */ +} + diff --git a/orc/orcrules-neon.c b/orc/orcrules-neon.c new file mode 100644 index 0000000..57e78ea --- /dev/null +++ b/orc/orcrules-neon.c @@ -0,0 +1,2811 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +#include + +void orc_neon_emit_loadiq (OrcCompiler *compiler, int dest, int param); +void orc_neon_emit_loadpq (OrcCompiler *compiler, int dest, int param); + +static const orc_uint32 orc_neon_constants[][4] = { + { 0x03030303, 0x07070707, 0x0b0b0b0b, 0x0f0f0f0f }, +}; + +const char *orc_neon_reg_name (int reg) +{ + static const char *vec_regs[] = { + "d0", "d1", "d2", "d3", + "d4", "d5", "d6", "d7", + "d8", "d9", "d10", "d11", + "d12", "d13", "d14", "d15", + "d16", "d17", "d18", "d19", + "d20", "d21", "d22", "d23", + "d24", "d25", "d26", "d27", + "d28", "d29", "d30", "d31", + }; + + if (reg < ORC_VEC_REG_BASE || reg >= ORC_VEC_REG_BASE+32) { + return "ERROR"; + } + + return vec_regs[reg&0x1f]; +} + +const char *orc_neon_reg_name_quad (int reg) +{ + static const char *vec_regs[] = { + "q0", "ERROR", "q1", "ERROR", + "q2", "ERROR", "q3", "ERROR", + "q4", "ERROR", "q5", "ERROR", + "q6", "ERROR", "q7", "ERROR", + "q8", "ERROR", "q9", "ERROR", + "q10", "ERROR", "q11", "ERROR", + "q12", "ERROR", "q13", "ERROR", + "q14", "ERROR", "q15", "ERROR", + }; + + if (reg < ORC_VEC_REG_BASE || reg >= ORC_VEC_REG_BASE+32) { + return "ERROR"; + } + + return vec_regs[reg&0x1f]; +} + +static void +orc_neon_emit_binary (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1, int src2) +{ + ORC_ASSERT((code & 0x004ff0af) == 0); + + ORC_ASM_CODE(p," %s %s, %s, %s\n", name, + orc_neon_reg_name (dest), orc_neon_reg_name (src1), + orc_neon_reg_name (src2)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<16; + code |= ((src1>>4)&0x1)<<7; + code |= (src2&0xf)<<0; + code |= ((src2>>4)&0x1)<<5; + orc_arm_emit (p, code); +} + +#define NEON_BINARY(code,a,b,c) \ + ((code) | \ + (((a)&0xf)<<12) | \ + ((((a)>>4)&0x1)<<22) | \ + (((b)&0xf)<<16) | \ + ((((b)>>4)&0x1)<<7) | \ + (((c)&0xf)<<0) | \ + ((((c)>>4)&0x1)<<5)) + +static void +orc_neon_emit_binary_long (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1, int src2) +{ + ORC_ASSERT((code & 0x004ff0af) == 0); + + ORC_ASM_CODE(p," %s %s, %s, %s\n", name, + orc_neon_reg_name_quad (dest), orc_neon_reg_name (src1), + orc_neon_reg_name (src2)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<16; + code |= ((src1>>4)&0x1)<<7; + code |= (src2&0xf)<<0; + code |= ((src2>>4)&0x1)<<5; + orc_arm_emit (p, code); +} + +#if 0 +static void +orc_neon_emit_binary_narrow (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1, int src2) +{ + ORC_ASSERT((code & 0x004ff0af) == 0); + + ORC_ASM_CODE(p," %s %s, %s, %s\n", name, + orc_neon_reg_name (dest), orc_neon_reg_name_quad (src1), + orc_neon_reg_name_quad (src2)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<16; + code |= ((src1>>4)&0x1)<<7; + code |= (src2&0xf)<<0; + code |= ((src2>>4)&0x1)<<5; + orc_arm_emit (p, code); +} +#endif + +static void +orc_neon_emit_binary_quad (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1, int src2) +{ + ORC_ASSERT((code & 0x004ff0af) == 0); + + ORC_ASM_CODE(p," %s %s, %s, %s\n", name, + orc_neon_reg_name_quad (dest), orc_neon_reg_name_quad (src1), + orc_neon_reg_name_quad (src2)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<16; + code |= ((src1>>4)&0x1)<<7; + code |= (src2&0xf)<<0; + code |= ((src2>>4)&0x1)<<5; + code |= 0x40; + orc_arm_emit (p, code); +} + +static void +orc_neon_emit_unary (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1) +{ + ORC_ASSERT((code & 0x0040f02f) == 0); + + ORC_ASM_CODE(p," %s %s, %s\n", name, + orc_neon_reg_name (dest), orc_neon_reg_name (src1)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<0; + code |= ((src1>>4)&0x1)<<5; + orc_arm_emit (p, code); +} + +static void +orc_neon_emit_unary_long (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1) +{ + ORC_ASSERT((code & 0x0040f02f) == 0); + + ORC_ASM_CODE(p," %s %s, %s\n", name, + orc_neon_reg_name_quad (dest), orc_neon_reg_name (src1)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<0; + code |= ((src1>>4)&0x1)<<5; + orc_arm_emit (p, code); +} + +static void +orc_neon_emit_unary_narrow (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1) +{ + ORC_ASSERT((code & 0x0040f02f) == 0); + + ORC_ASM_CODE(p," %s %s, %s\n", name, + orc_neon_reg_name (dest), orc_neon_reg_name_quad (src1)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<0; + code |= ((src1>>4)&0x1)<<5; + orc_arm_emit (p, code); +} + +static void +orc_neon_emit_unary_quad (OrcCompiler *p, const char *name, unsigned int code, + int dest, int src1) +{ + ORC_ASSERT((code & 0x0040f02f) == 0); + + ORC_ASM_CODE(p," %s %s, %s\n", name, + orc_neon_reg_name_quad (dest), orc_neon_reg_name_quad (src1)); + code |= (dest&0xf)<<12; + code |= ((dest>>4)&0x1)<<22; + code |= (src1&0xf)<<0; + code |= ((src1>>4)&0x1)<<5; + code |= 0x40; + orc_arm_emit (p, code); +} + +void +orc_neon_emit_mov (OrcCompiler *compiler, int dest, int src) +{ + orc_neon_emit_binary (compiler, "vorr", 0xf2200110, + dest, src, src); +} + +void +orc_neon_emit_mov_quad (OrcCompiler *compiler, int dest, int src) +{ + orc_neon_emit_binary_quad (compiler, "vorr", 0xf2200110, + dest, src, src); +} + +void +orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write, + int offset) +{ + orc_uint32 code; + + /* Don't use multiprocessing extensions */ + write = FALSE; + + ORC_ASM_CODE(compiler," pld%s [%s, #%d]\n", + write ? "w" : "", + orc_arm_reg_name (var->ptr_register), offset); + code = 0xf510f000; + if (!write) code |= (1<<22); + code |= (var->ptr_register&0xf) << 16; + if (offset < 0) { + code |= ((-offset)&0xfff) << 0; + } else { + code |= (offset&0xfff) << 0; + code |= (1<<23); + } + orc_arm_emit (compiler, code); +} + +#if 0 +void +orc_neon_load_halfvec_aligned (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.32 %s[0], [%s]%s\n", + orc_neon_reg_name (var->alloc), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf4a0080d; + code |= (var->ptr_register&0xf) << 16; + code |= (var->alloc&0xf) << 12; + code |= ((var->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_load_vec_aligned (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.64 %s, [%s]%s\n", + orc_neon_reg_name (var->alloc), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf42007cd; + code |= (var->ptr_register&0xf) << 16; + code |= (var->alloc&0xf) << 12; + code |= ((var->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_load_vec_unaligned (OrcCompiler *compiler, OrcVariable *var, + int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.8 %s, [%s]%s\n", + orc_neon_reg_name (var->alloc), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf420070d; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->alloc)&0xf) << 12; + code |= (((var->alloc)>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +#if 0 + /* used with need_mask_regs */ + ORC_ASM_CODE(compiler," vld1.64 %s, [%s]%s\n", + orc_neon_reg_name (var->aligned_data + 1), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf42007cd; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->aligned_data+1)&0xf) << 12; + code |= (((var->aligned_data+1)>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + + ORC_ASM_CODE(compiler," vtbl.8 %s, {%s,%s}, %s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->aligned_data), + orc_neon_reg_name (var->aligned_data+1), + orc_neon_reg_name (var->mask_alloc)); + code = NEON_BINARY(0xf3b00900, var->alloc, var->aligned_data, + var->mask_alloc); + orc_arm_emit (compiler, code); +//orc_neon_emit_mov (compiler, var->alloc, var->mask_alloc); + + orc_neon_emit_mov (compiler, var->aligned_data, var->aligned_data + 1); +#endif +} + +void +orc_neon_load_halfvec_unaligned (OrcCompiler *compiler, OrcVariable *var, + int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.8 %s, [%s]\n", + orc_neon_reg_name (var->alloc), + orc_arm_reg_name (var->ptr_register)); + code = 0xf420070d; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->alloc)&0xf) << 12; + code |= (((var->alloc)>>4)&0x1) << 22; + //code |= (!update) << 1; + code |= (1) << 1; + orc_arm_emit (compiler, code); + + if (update) { + orc_arm_emit_add_imm (compiler, var->ptr_register, + var->ptr_register, 4); + } +#if 0 + /* used with need_mask_regs */ + ORC_ASM_CODE(compiler," vld1.32 %s[1], [%s]%s\n", + orc_neon_reg_name (var->aligned_data), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf4a0088d; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->aligned_data)&0xf) << 12; + code |= (((var->aligned_data)>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + + ORC_ASM_CODE(compiler," vtbl.8 %s, {%s,%s}, %s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->aligned_data), + orc_neon_reg_name (var->aligned_data + 1), + orc_neon_reg_name (var->mask_alloc)); + code = NEON_BINARY(0xf3b00900, var->alloc, var->aligned_data, var->mask_alloc); + orc_arm_emit (compiler, code); + + orc_neon_emit_unary (compiler, "vrev64.i32", 0xf3b80000, + var->aligned_data, var->aligned_data); +#endif +} + +void +orc_neon_load_fourvec_aligned (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.64 { %s, %s, %s, %s }, [%s,:256]%s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->alloc + 1), + orc_neon_reg_name (var->alloc + 2), + orc_neon_reg_name (var->alloc + 3), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf42002dd; + code |= (var->ptr_register&0xf) << 16; + code |= (var->alloc&0xf) << 12; + code |= ((var->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_load_fourvec_unaligned (OrcCompiler *compiler, OrcVariable *var, + int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.8 { %s, %s, %s, %s }, [%s]%s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->alloc + 1), + orc_neon_reg_name (var->alloc + 2), + orc_neon_reg_name (var->alloc + 3), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf420020d; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->alloc)&0xf) << 12; + code |= (((var->alloc)>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_load_twovec_aligned (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.64 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->alloc + 1), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf4200aed; + code |= (var->ptr_register&0xf) << 16; + code |= (var->alloc&0xf) << 12; + code |= ((var->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_load_twovec_unaligned (OrcCompiler *compiler, OrcVariable *var, + int update) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.8 { %s, %s }, [%s]%s\n", + orc_neon_reg_name (var->alloc), + orc_neon_reg_name (var->alloc + 1), + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = 0xf4200a0d; + code |= (var->ptr_register&0xf) << 16; + code |= ((var->alloc)&0xf) << 12; + code |= (((var->alloc)>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +void +orc_neon_loadb (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + int i; + + if (var->is_aligned && compiler->insn_shift == 5) { + orc_neon_load_fourvec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 4) { + orc_neon_load_twovec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 3) { + orc_neon_load_vec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 2) { + orc_neon_load_halfvec_aligned (compiler, var, update); + } else if (compiler->insn_shift == 5) { + orc_neon_load_fourvec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 4) { + orc_neon_load_twovec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 3) { + orc_neon_load_vec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 2) { + orc_neon_load_halfvec_unaligned (compiler, var, update); + } else { + if (compiler->insn_shift > 1) { + ORC_ERROR("slow load"); + } + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vld1.8 %s[%d], [%s]%s\n", + orc_neon_reg_name (var->alloc + (i>>3)), i&7, + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = NEON_BINARY(0xf4a0000d, var->alloc + (i>>3), + var->ptr_register, 0); + code |= (i&7) << 5; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_loadw (OrcCompiler *compiler, OrcVariable *var, int update) +{ + if (var->is_aligned && compiler->insn_shift == 3) { + orc_neon_load_twovec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 2) { + orc_neon_load_vec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 1) { + orc_neon_load_halfvec_aligned (compiler, var, update); + } else if (compiler->insn_shift == 3) { + orc_neon_load_twovec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 2) { + orc_neon_load_vec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 1) { + orc_neon_load_halfvec_unaligned (compiler, var, update); + } else { + orc_uint32 code; + int i; + + if (compiler->insn_shift == 2) { + orc_neon_load_vec_aligned (compiler, var, update); + return; + } else if (compiler->insn_shift == 1) { + orc_neon_load_halfvec_aligned (compiler, var, update); + return; + } + if (compiler->insn_shift > 1) { + ORC_ERROR("slow load"); + } + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vld1.16 %s[%d], [%s]%s\n", + orc_neon_reg_name (var->alloc + (i>>2)), i&3, + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = NEON_BINARY(0xf4a0040d, var->alloc + (i>>2), + var->ptr_register, 0); + code |= (i&3) << 6; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_loadl (OrcCompiler *compiler, OrcVariable *var, int update) +{ + orc_uint32 code; + int i; + + if (var->is_aligned && compiler->insn_shift == 2) { + orc_neon_load_twovec_aligned (compiler, var, update); + } else if (var->is_aligned && compiler->insn_shift == 1) { + orc_neon_load_vec_aligned (compiler, var, update); + } else if (compiler->insn_shift == 2) { + orc_neon_load_twovec_unaligned (compiler, var, update); + } else if (compiler->insn_shift == 1) { + orc_neon_load_vec_unaligned (compiler, var, update); + } else { + if (compiler->insn_shift > 0) { + //ORC_ERROR("slow load"); + } + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vld1.32 %s[%d], [%s]%s\n", + orc_neon_reg_name (var->alloc + (i>>1)), i & 1, + orc_arm_reg_name (var->ptr_register), + update ? "!" : ""); + code = NEON_BINARY(0xf4a0080d, var->alloc + (i>>1), + var->ptr_register, 0); + code |= (i&1)<<7; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_loadq (OrcCompiler *compiler, int dest, int src1, int update, int is_aligned) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vld1.64 %s, [%s]%s\n", + orc_neon_reg_name (dest), + orc_arm_reg_name (src1), + update ? "!" : ""); + code = 0xf42007cd; + code |= (src1&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + + +void +orc_neon_storeb (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned) +{ + orc_uint32 code; + int i; + + if (is_aligned && compiler->insn_shift == 5) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s, %s, %s }, [%s,:256]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1+1), + orc_neon_reg_name (src1+2), + orc_neon_reg_name (src1+3), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf400023d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (compiler->insn_shift == 5) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s, %s, %s }, [%s]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1+1), + orc_neon_reg_name (src1+2), + orc_neon_reg_name (src1+3), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf400020d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (is_aligned && compiler->insn_shift == 4) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1+1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf4000a2d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (compiler->insn_shift == 4) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s }, [%s]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1+1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf4000a0d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (is_aligned && compiler->insn_shift == 3) { + ORC_ASM_CODE(compiler," vst1.8 %s, [%s,:64]%s\n", + orc_neon_reg_name (src1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf400071d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else { + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vst1.8 %s[%d], [%s]%s\n", + orc_neon_reg_name (src1 + (i>>3)), i&7, + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf480000d; + code |= (dest&0xf) << 16; + code |= ((src1 + (i>>3))&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (i&7)<<5; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_storew (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned) +{ + orc_uint32 code; + int i; + + if (is_aligned && compiler->insn_shift == 3) { + ORC_ASM_CODE(compiler," vst1.16 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1 + 1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf4000a6d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (is_aligned && compiler->insn_shift == 2) { + ORC_ASM_CODE(compiler," vst1.16 %s, [%s,:64]%s\n", + orc_neon_reg_name (src1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf400075d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else { + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vst1.16 %s[%d], [%s]%s\n", + orc_neon_reg_name (src1 + (i>>2)), i&3, + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf480040d; + code |= (dest&0xf) << 16; + code |= ((src1 + (i>>2))&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (i&3)<<6; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_storel (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned) +{ + orc_uint32 code; + int i; + + if (is_aligned && compiler->insn_shift == 2) { + ORC_ASM_CODE(compiler," vst1.32 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (src1), + orc_neon_reg_name (src1 + 1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf4000aad; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else if (is_aligned && compiler->insn_shift == 1) { + ORC_ASM_CODE(compiler," vst1.32 %s, [%s,:64]%s\n", + orc_neon_reg_name (src1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf400079d; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } else { + for(i=0;i<(1<insn_shift);i++){ + ORC_ASM_CODE(compiler," vst1.32 %s[%d], [%s]%s\n", + orc_neon_reg_name (src1 + (i>>1)), i&1, + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf480080d; + code |= (dest&0xf) << 16; + code |= ((src1 + (i>>1))&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (i&1)<<7; + code |= (!update) << 1; + orc_arm_emit (compiler, code); + } + } +} + +void +orc_neon_storeq (OrcCompiler *compiler, int dest, int update, int src1, int is_aligned) +{ + orc_uint32 code; + + ORC_ASM_CODE(compiler," vst1.64 %s, [%s]%s\n", + orc_neon_reg_name (src1), + orc_arm_reg_name (dest), + update ? "!" : ""); + code = 0xf40007cd; + code |= (dest&0xf) << 16; + code |= (src1&0xf) << 12; + code |= ((src1>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} +#endif + +static void +neon_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int size = ORC_PTR_TO_INT (user); + + if (src->vartype == ORC_VAR_TYPE_CONST) { + if (size == 1) { + orc_neon_emit_loadib (compiler, dest->alloc, src->value.i); + } else if (size == 2) { + orc_neon_emit_loadiw (compiler, dest->alloc, src->value.i); + } else if (size == 4) { + orc_neon_emit_loadil (compiler, dest->alloc, src->value.i); + } else if (size == 8) { + if (src->size == 8) { + ORC_COMPILER_ERROR(compiler,"64-bit constants not implemented"); + } + orc_neon_emit_loadiq (compiler, dest->alloc, src->value.i); + } else { + ORC_PROGRAM_ERROR(compiler,"unimplemented"); + } + } else { + if (size == 1) { + orc_neon_emit_loadpb (compiler, dest->alloc, insn->src_args[0]); + } else if (size == 2) { + orc_neon_emit_loadpw (compiler, dest->alloc, insn->src_args[0]); + } else if (size == 4) { + orc_neon_emit_loadpl (compiler, dest->alloc, insn->src_args[0]); + } else if (size == 8) { + if (src->size == 8) { + ORC_COMPILER_ERROR(compiler,"64-bit parameters not implemented"); + } + orc_neon_emit_loadpq (compiler, dest->alloc, insn->src_args[0]); + } else { + ORC_PROGRAM_ERROR(compiler,"unimplemented"); + } + } +} + +static void +neon_rule_loadX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int update = FALSE; + unsigned int code = 0; + int size = src->size << compiler->insn_shift; + int type = ORC_PTR_TO_INT(user); + int ptr_register; + int is_aligned = src->is_aligned; + + /* FIXME this should be fixed at a higher level */ + if (src->vartype != ORC_VAR_TYPE_SRC && src->vartype != ORC_VAR_TYPE_DEST) { + ORC_COMPILER_ERROR(compiler, "loadX used with non src/dest"); + return; + } + + if (src->vartype == ORC_VAR_TYPE_DEST) update = FALSE; + + if (type == 1) { + if (compiler->vars[insn->src_args[1]].vartype != ORC_VAR_TYPE_CONST) { + ORC_PROGRAM_ERROR(compiler,"unimplemented"); + return; + } + + ptr_register = compiler->gp_tmpreg; + orc_arm_emit_add_imm (compiler, ptr_register, + src->ptr_register, + compiler->vars[insn->src_args[1]].value.i * src->size); + + update = FALSE; + is_aligned = FALSE; + } else { + ptr_register = src->ptr_register; + } + + if (size >= 8) { + if (is_aligned) { + if (size == 32) { + ORC_ASM_CODE(compiler," vld1.64 { %s, %s, %s, %s }, [%s,:256]%s\n", + orc_neon_reg_name (dest->alloc), + orc_neon_reg_name (dest->alloc + 1), + orc_neon_reg_name (dest->alloc + 2), + orc_neon_reg_name (dest->alloc + 3), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf42002dd; + } else if (size == 16) { + ORC_ASM_CODE(compiler," vld1.64 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (dest->alloc), + orc_neon_reg_name (dest->alloc + 1), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf4200aed; + } else if (size == 8) { + ORC_ASM_CODE(compiler," vld1.64 %s, [%s]%s\n", + orc_neon_reg_name (dest->alloc), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf42007cd; + } else { + ORC_COMPILER_ERROR(compiler,"bad aligned load size %d", + src->size << compiler->insn_shift); + } + } else { + if (size == 32) { + ORC_ASM_CODE(compiler," vld1.8 { %s, %s, %s, %s }, [%s]%s\n", + orc_neon_reg_name (dest->alloc), + orc_neon_reg_name (dest->alloc + 1), + orc_neon_reg_name (dest->alloc + 2), + orc_neon_reg_name (dest->alloc + 3), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf420020d; + } else if (size == 16) { + ORC_ASM_CODE(compiler," vld1.8 { %s, %s }, [%s]%s\n", + orc_neon_reg_name (dest->alloc), + orc_neon_reg_name (dest->alloc + 1), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf4200a0d; + } else if (size == 8) { + ORC_ASM_CODE(compiler," vld1.8 %s, [%s]%s\n", + orc_neon_reg_name (dest->alloc), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf420070d; + } else { + ORC_COMPILER_ERROR(compiler,"bad unaligned load size %d", + src->size << compiler->insn_shift); + } + } + } else { + int shift; + if (size == 4) { + shift = 2; + } else if (size == 2) { + shift = 1; + } else { + shift = 0; + } + ORC_ASM_CODE(compiler," vld1.%d %s[0], [%s]%s\n", + 8<alloc), + orc_arm_reg_name (ptr_register), + update ? "!" : ""); + code = 0xf4a0000d; + code |= shift<<10; + code |= (0&7)<<5; + } + code |= (ptr_register&0xf) << 16; + code |= (dest->alloc&0xf) << 12; + code |= ((dest->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + +static void +neon_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int update = FALSE; + unsigned int code = 0; + int size = dest->size << compiler->insn_shift; + + if (size >= 8) { + if (dest->is_aligned) { + if (size == 32) { + ORC_ASM_CODE(compiler," vst1.64 { %s, %s, %s, %s }, [%s,:256]%s\n", + orc_neon_reg_name (src->alloc), + orc_neon_reg_name (src->alloc + 1), + orc_neon_reg_name (src->alloc + 2), + orc_neon_reg_name (src->alloc + 3), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf40002dd; + } else if (size == 16) { + ORC_ASM_CODE(compiler," vst1.64 { %s, %s }, [%s,:128]%s\n", + orc_neon_reg_name (src->alloc), + orc_neon_reg_name (src->alloc + 1), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf4000aed; + } else if (size == 8) { + ORC_ASM_CODE(compiler," vst1.64 %s, [%s]%s\n", + orc_neon_reg_name (src->alloc), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf40007cd; + } else { + ORC_COMPILER_ERROR(compiler,"bad aligned store size %d", size); + } + } else { + if (size == 32) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s, %s, %s }, [%s]%s\n", + orc_neon_reg_name (src->alloc), + orc_neon_reg_name (src->alloc + 1), + orc_neon_reg_name (src->alloc + 2), + orc_neon_reg_name (src->alloc + 3), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf400020d; + } else if (size == 16) { + ORC_ASM_CODE(compiler," vst1.8 { %s, %s }, [%s]%s\n", + orc_neon_reg_name (src->alloc), + orc_neon_reg_name (src->alloc + 1), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf4000a0d; + } else if (size == 8) { + ORC_ASM_CODE(compiler," vst1.8 %s, [%s]%s\n", + orc_neon_reg_name (src->alloc), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf400070d; + } else { + ORC_COMPILER_ERROR(compiler,"bad aligned store size %d", size); + } + } + } else { + int shift; + if (size == 4) { + shift = 2; + } else if (size == 2) { + shift = 1; + } else { + shift = 0; + } + ORC_ASM_CODE(compiler," vst1.%d %s[0], [%s]%s\n", + 8<alloc), + orc_arm_reg_name (dest->ptr_register), + update ? "!" : ""); + code = 0xf480000d; + code |= shift<<10; + code |= (0&7)<<5; + } + code |= (dest->ptr_register&0xf) << 16; + code |= (src->alloc&0xf) << 12; + code |= ((src->alloc>>4)&0x1) << 22; + code |= (!update) << 1; + orc_arm_emit (compiler, code); +} + + +static int +orc_neon_get_const_shift (unsigned int value) +{ + int shift = 0; + + while((value & 0xff) != value) { + shift++; + value >>= 1; + } + return shift; +} + +void +orc_neon_emit_loadib (OrcCompiler *compiler, int reg, int value) +{ + orc_uint32 code; + + if (value == 0) { + orc_neon_emit_binary_quad (compiler, "veor", 0xf3000110, reg, reg, reg); + return; + } + + value &= 0xff; + ORC_ASM_CODE(compiler," vmov.i8 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800e10; + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (value&0xf) << 0; + code |= (value&0x70) << 12; + code |= (value&0x80) << 17; + code |= 0x40; + orc_arm_emit (compiler, code); +} + +void +orc_neon_emit_loadiw (OrcCompiler *compiler, int reg, int value) +{ + orc_uint32 code; + int shift; + int neg = FALSE; + + if (value == 0) { + orc_neon_emit_binary_quad (compiler, "veor", 0xf3000110, reg, reg, reg); + return; + } + + if (value < 0) { + neg = TRUE; + value = ~value; + } + shift = orc_neon_get_const_shift (value); + if ((value & (0xff<>= shift; + if (neg) { + ORC_ASM_CODE(compiler," vmvn.i16 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800830; + } else { + ORC_ASM_CODE(compiler," vmov.i16 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800810; + } + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (value&0xf) << 0; + code |= (value&0x70) << 12; + code |= (value&0x80) << 17; + code |= 0x40; + orc_arm_emit (compiler, code); + + if (shift > 0) { + ORC_ASM_CODE(compiler," vshl.i16 %s, %s, #%d\n", + orc_neon_reg_name_quad (reg), orc_neon_reg_name_quad (reg), shift); + code = 0xf2900510; + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (reg&0xf) << 0; + code |= ((reg>>4)&0x1) << 5; + code |= (shift&0xf) << 16; + code |= 0x40; + orc_arm_emit (compiler, code); + } + + return; + } + + ORC_COMPILER_ERROR(compiler, "unimplemented load of constant %d", value); +} + +void +orc_neon_emit_loadil (OrcCompiler *compiler, int reg, int value) +{ + orc_uint32 code; + int shift; + int neg = FALSE; + + if (value == 0) { + orc_neon_emit_binary_quad (compiler, "veor", 0xf3000110, reg, reg, reg); + return; + } + + if (value < 0) { + neg = TRUE; + value = ~value; + } + shift = orc_neon_get_const_shift (value); + if ((value & (0xff<>= shift; + if (neg) { + ORC_ASM_CODE(compiler," vmvn.i32 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800030; + } else { + ORC_ASM_CODE(compiler," vmov.i32 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800010; + } + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (value&0xf) << 0; + code |= (value&0x70) << 12; + code |= (value&0x80) << 17; + code |= 0x40; + orc_arm_emit (compiler, code); + + if (shift > 0) { + ORC_ASM_CODE(compiler," vshl.i32 %s, %s, #%d\n", + orc_neon_reg_name_quad (reg), orc_neon_reg_name_quad (reg), shift); + code = 0xf2a00510; + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (reg&0xf) << 0; + code |= ((reg>>4)&0x1) << 5; + code |= (shift&0x1f) << 16; + code |= 0x40; + orc_arm_emit (compiler, code); + } + + return; + } + + ORC_COMPILER_ERROR(compiler, "unimplemented load of constant %d", value); +} + +void +orc_neon_emit_loadiq (OrcCompiler *compiler, int reg, int value) +{ + //orc_uint32 code; + //int shift; + int neg = FALSE; + + if (value == 0) { + orc_neon_emit_binary_quad (compiler, "veor", 0xf3000110, reg, reg, reg); + return; + } + + if (value < 0) { + neg = TRUE; + value = ~value; + } +#if 0 + shift = orc_neon_get_const_shift (value); + if ((value & (0xff<>= shift; + if (neg) { + ORC_ASM_CODE(compiler," vmvn.i64 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800030; + } else { + ORC_ASM_CODE(compiler," vmov.i64 %s, #%d\n", + orc_neon_reg_name_quad (reg), value); + code = 0xf2800010; + } + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (value&0xf) << 0; + code |= (value&0x70) << 12; + code |= (value&0x80) << 17; + code |= 0x40; + orc_arm_emit (compiler, code); + + if (shift > 0) { + ORC_ASM_CODE(compiler," vshl.i64 %s, %s, #%d\n", + orc_neon_reg_name_quad (reg), orc_neon_reg_name_quad (reg), shift); + code = 0xf2a00510; + code |= (reg&0xf) << 12; + code |= ((reg>>4)&0x1) << 22; + code |= (reg&0xf) << 0; + code |= ((reg>>4)&0x1) << 5; + code |= (shift&0xf) << 16; + code |= 0x40; + orc_arm_emit (compiler, code); + } + + return; + } +#endif + + ORC_COMPILER_ERROR(compiler, "unimplemented load of constant %d", value); +} + +void +orc_neon_emit_loadpb (OrcCompiler *compiler, int dest, int param) +{ + orc_uint32 code; + + orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, params[param])); + + ORC_ASM_CODE(compiler," vld1.8 {%s[],%s[]}, [%s]\n", + orc_neon_reg_name (dest), orc_neon_reg_name (dest+1), + orc_arm_reg_name (compiler->gp_tmpreg)); + code = 0xf4a00c2f; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + orc_arm_emit (compiler, code); +} + +void +orc_neon_emit_loadpw (OrcCompiler *compiler, int dest, int param) +{ + orc_uint32 code; + + orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, params[param])); + + ORC_ASM_CODE(compiler," vld1.16 {%s[],%s[]}, [%s]\n", + orc_neon_reg_name (dest), orc_neon_reg_name (dest+1), + orc_arm_reg_name (compiler->gp_tmpreg)); + code = 0xf4a00c6f; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + orc_arm_emit (compiler, code); +} + +void +orc_neon_emit_loadpl (OrcCompiler *compiler, int dest, int param) +{ + orc_uint32 code; + + orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, params[param])); + + ORC_ASM_CODE(compiler," vld1.32 {%s[],%s[]}, [%s]\n", + orc_neon_reg_name (dest), orc_neon_reg_name (dest+1), + orc_arm_reg_name (compiler->gp_tmpreg)); + code = 0xf4a00caf; + code |= (compiler->gp_tmpreg&0xf) << 16; + code |= (dest&0xf) << 12; + code |= ((dest>>4)&0x1) << 22; + orc_arm_emit (compiler, code); +} + +void +orc_neon_emit_loadpq (OrcCompiler *compiler, int dest, int param) +{ + orc_uint32 code; + int update = FALSE; + + orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, params[param])); + + ORC_ASM_CODE(compiler," vld1.32 %s[0], [%s]%s\n", + orc_neon_reg_name (dest), + orc_arm_reg_name (compiler->gp_tmpreg), + update ? "!" : ""); + code = 0xf4a0000d; + code |= 2<<10; + code |= (0&7)<<5; + orc_arm_emit (compiler, code); + + orc_arm_emit_add_imm (compiler, compiler->gp_tmpreg, + compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, + params[param + (ORC_VAR_T1-ORC_VAR_P1)])); + + ORC_ASM_CODE(compiler," vld1.32 %s[1], [%s]%s\n", + orc_neon_reg_name (dest), + orc_arm_reg_name (compiler->gp_tmpreg), + update ? "!" : ""); + code = 0xf4a0000d; + code |= 2<<10; + code |= (1&7)<<5; + orc_arm_emit (compiler, code); +} + +#define UNARY(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_unary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else if (p->insn_shift == vec_shift + 1) { \ + orc_neon_emit_unary_quad (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define UNARY_LONG(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_unary_long (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define UNARY_NARROW(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_unary_narrow (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define BINARY(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_binary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[1]].alloc); \ + } else if (p->insn_shift == vec_shift + 1) { \ + orc_neon_emit_binary_quad (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[1]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define BINARY_LONG(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_binary_long (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[1]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define BINARY_NARROW(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_binary_narrow (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[1]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define MOVE(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + if (p->vars[insn->dest_args[0]].alloc == p->vars[insn->src_args[0]].alloc) { \ + return; \ + } \ + if (p->insn_shift <= vec_shift) { \ + orc_neon_emit_binary (p, "vorr", 0xf2200110, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else if (p->insn_shift == vec_shift + 1) { \ + orc_neon_emit_binary_quad (p, "vorr", 0xf2200110, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + + +typedef struct { + orc_uint32 code; + char *name; + int negate; + int bits; + int vec_shift; +} ShiftInfo; +ShiftInfo immshift_info[] = { + { 0xf2880510, "vshl.i8", FALSE, 8, 3 }, /* shlb */ + { 0xf2880010, "vshr.s8", TRUE, 8, 3 }, /* shrsb */ + { 0xf3880010, "vshr.u8", TRUE, 8, 3 }, /* shrub */ + { 0xf2900510, "vshl.i16", FALSE, 16, 2 }, + { 0xf2900010, "vshr.s16", TRUE, 16, 2 }, + { 0xf3900010, "vshr.u16", TRUE, 16, 2 }, + { 0xf2a00510, "vshl.i32", FALSE, 32, 1 }, + { 0xf2a00010, "vshr.s32", TRUE, 32, 1 }, + { 0xf3a00010, "vshr.u32", TRUE, 32, 1 } +}; +ShiftInfo regshift_info[] = { + { 0xf3000400, "vshl.u8", FALSE, 0, 3 }, /* shlb */ + { 0xf2000400, "vshl.s8", TRUE, 0, 3 }, /* shrsb */ + { 0xf3000400, "vshl.u8", TRUE, 0, 3 }, /* shrub */ + { 0xf3100400, "vshl.u16", FALSE, 0, 2 }, + { 0xf2100400, "vshl.s16", TRUE, 0, 2 }, + { 0xf3100400, "vshl.u16", TRUE, 0, 2 }, + { 0xf3200400, "vshl.u32", FALSE, 0, 1 }, + { 0xf2200400, "vshl.s32", TRUE, 0, 1 }, + { 0xf3200400, "vshl.u32", TRUE, 0, 1 } +}; + +static void +orc_neon_rule_shift (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int type = (unsigned long)user; + orc_uint32 code; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + int shift = p->vars[insn->src_args[1]].value.i; + if (shift < 0) { + ORC_COMPILER_ERROR(p, "shift negative"); + return; + } + if (shift >= immshift_info[type].bits) { + ORC_COMPILER_ERROR(p, "shift too large"); + return; + } + code = immshift_info[type].code; + if (p->insn_shift <= immshift_info[type].vec_shift) { + ORC_ASM_CODE(p," %s %s, %s, #%d\n", + immshift_info[type].name, + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + (int)p->vars[insn->src_args[1]].value.i); + } else { + ORC_ASM_CODE(p," %s %s, %s, #%d\n", + immshift_info[type].name, + orc_neon_reg_name_quad (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), + (int)p->vars[insn->src_args[1]].value.i); + code |= 0x40; + } + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + if (immshift_info[type].negate) { + shift = immshift_info[type].bits - shift; + } + code |= shift<<16; + orc_arm_emit (p, code); + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + orc_neon_emit_loadpb (p, p->tmpreg, insn->src_args[1]); + + if (regshift_info[type].negate) { + orc_neon_emit_unary_quad (p, "vneg.s8", 0xf3b10380, + p->tmpreg, p->tmpreg); + } + + code = regshift_info[type].code; + if (p->insn_shift <= regshift_info[type].vec_shift) { + ORC_ASM_CODE(p," %s %s, %s, %s\n", + regshift_info[type].name, + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->tmpreg)); + } else { + ORC_ASM_CODE(p," %s %s, %s, %s\n", + regshift_info[type].name, + orc_neon_reg_name_quad (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg)); + code |= 0x40; + } + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + code |= (p->tmpreg&0xf)<<16; + code |= ((p->tmpreg>>4)&0x1)<<7; + orc_arm_emit (p, code); + } else { + ORC_PROGRAM_ERROR(p,"shift rule only works with constants and params"); + } +} + +#if 0 +static void +orc_neon_rule_shrsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_uint32 code; + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + code = 0xf2900010; + ORC_ASM_CODE(p," vshr.s16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + p->vars[insn->src_args[1]].value); + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + code |= ((16 - p->vars[insn->src_args[1]].value)&0xf)<<16; + orc_arm_emit (p, code); + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + code = 0xf2100400; + ORC_ASM_CODE(p," vshl.s16 %s, %s, %s\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[1]].alloc)); + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + code |= (p->vars[insn->src_args[1]].alloc&0xf)<<16; + code |= ((p->vars[insn->src_args[1]].alloc>>4)&0x1)<<7; + orc_arm_emit (p, code); + } else { + ORC_PROGRAM_ERROR(p,"shift rule only works with constants and params"); + } +} + +static void +orc_neon_rule_shrsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_uint32 code; + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + code = 0xf2900010; + ORC_ASM_CODE(p," vshr.s32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + p->vars[insn->src_args[1]].value); + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + code |= ((16 - p->vars[insn->src_args[1]].value)&0xf)<<16; + orc_arm_emit (p, code); + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + code = 0xf2100400; + ORC_ASM_CODE(p," vshl.s32 %s, %s, %s\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[1]].alloc)); + code |= (p->vars[insn->dest_args[0]].alloc&0xf)<<12; + code |= ((p->vars[insn->dest_args[0]].alloc>>4)&0x1)<<22; + code |= (p->vars[insn->src_args[0]].alloc&0xf)<<0; + code |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<5; + code |= (p->vars[insn->src_args[1]].alloc&0xf)<<16; + code |= ((p->vars[insn->src_args[1]].alloc>>4)&0x1)<<7; + orc_arm_emit (p, code); + } else { + ORC_PROGRAM_ERROR(p,"shift rule only works with constants and params"); + } +} +#endif + + +static void +orc_neon_rule_andn (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int max_shift = (long)user; + + /* this is special because the operand order is reversed */ + if (p->insn_shift <= max_shift) { \ + orc_neon_emit_binary (p, "vbic", 0xf2100110, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->src_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vbic", 0xf2100110, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->src_args[0]].alloc); + } +} + + + +UNARY(absb,"vabs.s8",0xf3b10300, 3) +BINARY(addb,"vadd.i8",0xf2000800, 3) +BINARY(addssb,"vqadd.s8",0xf2000010, 3) +BINARY(addusb,"vqadd.u8",0xf3000010, 3) +BINARY(andb,"vand",0xf2000110, 3) +//BINARY(andnb,"vbic",0xf2100110, 3) +BINARY(avgsb,"vrhadd.s8",0xf2000100, 3) +BINARY(avgub,"vrhadd.u8",0xf3000100, 3) +BINARY(cmpeqb,"vceq.i8",0xf3000810, 3) +BINARY(cmpgtsb,"vcgt.s8",0xf2000300, 3) +MOVE(copyb,"vmov",0xf2200110, 3) +BINARY(maxsb,"vmax.s8",0xf2000600, 3) +BINARY(maxub,"vmax.u8",0xf3000600, 3) +BINARY(minsb,"vmin.s8",0xf2000610, 3) +BINARY(minub,"vmin.u8",0xf3000610, 3) +BINARY(mullb,"vmul.i8",0xf2000910, 3) +BINARY(orb,"vorr",0xf2200110, 3) +//LSHIFT(shlb,"vshl.i8",0xf2880510, 3) +//RSHIFT(shrsb,"vshr.s8",0xf2880010,8, 3) +//RSHIFT(shrub,"vshr.u8",0xf3880010,8, 3) +BINARY(subb,"vsub.i8",0xf3000800, 3) +BINARY(subssb,"vqsub.s8",0xf2000210, 3) +BINARY(subusb,"vqsub.u8",0xf3000210, 3) +BINARY(xorb,"veor",0xf3000110, 3) + +UNARY(absw,"vabs.s16",0xf3b50300, 2) +BINARY(addw,"vadd.i16",0xf2100800, 2) +BINARY(addssw,"vqadd.s16",0xf2100010, 2) +BINARY(addusw,"vqadd.u16",0xf3100010, 2) +BINARY(andw,"vand",0xf2000110, 2) +//BINARY(andnw,"vbic",0xf2100110, 2) +BINARY(avgsw,"vrhadd.s16",0xf2100100, 2) +BINARY(avguw,"vrhadd.u16",0xf3100100, 2) +BINARY(cmpeqw,"vceq.i16",0xf3100810, 2) +BINARY(cmpgtsw,"vcgt.s16",0xf2100300, 2) +MOVE(copyw,"vmov",0xf2200110, 2) +BINARY(maxsw,"vmax.s16",0xf2100600, 2) +BINARY(maxuw,"vmax.u16",0xf3100600, 2) +BINARY(minsw,"vmin.s16",0xf2100610, 2) +BINARY(minuw,"vmin.u16",0xf3100610, 2) +BINARY(mullw,"vmul.i16",0xf2100910, 2) +BINARY(orw,"vorr",0xf2200110, 2) +//LSHIFT(shlw,"vshl.i16",0xf2900510, 2) +//RSHIFT(shrsw,"vshr.s16",0xf2900010,16, 2) +//RSHIFT(shruw,"vshr.u16",0xf3900010,16, 2) +BINARY(subw,"vsub.i16",0xf3100800, 2) +BINARY(subssw,"vqsub.s16",0xf2100210, 2) +BINARY(subusw,"vqsub.u16",0xf3100210, 2) +BINARY(xorw,"veor",0xf3000110, 2) + +UNARY(absl,"vabs.s32",0xf3b90300, 1) +BINARY(addl,"vadd.i32",0xf2200800, 1) +BINARY(addssl,"vqadd.s32",0xf2200010, 1) +BINARY(addusl,"vqadd.u32",0xf3200010, 1) +BINARY(andl,"vand",0xf2000110, 1) +//BINARY(andnl,"vbic",0xf2100110, 1) +BINARY(avgsl,"vrhadd.s32",0xf2200100, 1) +BINARY(avgul,"vrhadd.u32",0xf3200100, 1) +BINARY(cmpeql,"vceq.i32",0xf3200810, 1) +BINARY(cmpgtsl,"vcgt.s32",0xf2200300, 1) +MOVE(copyl,"vmov",0xf2200110, 1) +BINARY(maxsl,"vmax.s32",0xf2200600, 1) +BINARY(maxul,"vmax.u32",0xf3200600, 1) +BINARY(minsl,"vmin.s32",0xf2200610, 1) +BINARY(minul,"vmin.u32",0xf3200610, 1) +BINARY(mulll,"vmul.i32",0xf2200910, 1) +BINARY(orl,"vorr",0xf2200110, 1) +//LSHIFT(shll,"vshl.i32",0xf2a00510, 1) +//RSHIFT(shrsl,"vshr.s32",0xf2a00010,32, 1) +//RSHIFT(shrul,"vshr.u32",0xf3a00010,32, 1) +BINARY(subl,"vsub.i32",0xf3200800, 1) +BINARY(subssl,"vqsub.s32",0xf2200210, 1) +BINARY(subusl,"vqsub.u32",0xf3200210, 1) +BINARY(xorl,"veor",0xf3000110, 1) + +//UNARY(absq,"vabs.s64",0xf3b10300, 0) +BINARY(addq,"vadd.i64",0xf2300800, 0) +//BINARY(addssq,"vqadd.s64",0xf2000010, 0) +//BINARY(addusq,"vqadd.u64",0xf3000010, 0) +BINARY(andq,"vand",0xf2000110, 0) +//BINARY(avgsq,"vrhadd.s64",0xf2000100, 0) +//BINARY(avguq,"vrhadd.u64",0xf3000100, 0) +//BINARY(cmpeqq,"vceq.i64",0xf3000810, 0) +//BINARY(cmpgtsq,"vcgt.s64",0xf2000300, 0) +MOVE(copyq,"vmov",0xf2200110, 0) +//BINARY(maxsq,"vmax.s64",0xf2000600, 0) +//BINARY(maxuq,"vmax.u64",0xf3000600, 0) +//BINARY(minsq,"vmin.s64",0xf2000610, 0) +//BINARY(minuq,"vmin.u64",0xf3000610, 0) +//BINARY(mullq,"vmul.i64",0xf2000910, 0) +BINARY(orq,"vorr",0xf2200110, 0) +BINARY(subq,"vsub.i64",0xf3300800, 0) +//BINARY(subssq,"vqsub.s64",0xf2000210, 0) +//BINARY(subusq,"vqsub.u64",0xf3000210, 0) +BINARY(xorq,"veor",0xf3000110, 0) + +UNARY_LONG(convsbw,"vmovl.s8",0xf2880a10, 3) +UNARY_LONG(convubw,"vmovl.u8",0xf3880a10, 3) +UNARY_LONG(convswl,"vmovl.s16",0xf2900a10, 2) +UNARY_LONG(convuwl,"vmovl.u16",0xf3900a10, 2) +UNARY_LONG(convslq,"vmovl.s32",0xf2a00a10, 1) +UNARY_LONG(convulq,"vmovl.u32",0xf3a00a10, 1) +UNARY_NARROW(convwb,"vmovn.i16",0xf3b20200, 3) +UNARY_NARROW(convssswb,"vqmovn.s16",0xf3b20280, 3) +UNARY_NARROW(convsuswb,"vqmovun.s16",0xf3b20240, 3) +UNARY_NARROW(convuuswb,"vqmovn.u16",0xf3b202c0, 3) +UNARY_NARROW(convlw,"vmovn.i32",0xf3b60200, 2) +UNARY_NARROW(convql,"vmovn.i64",0xf3ba0200, 1) +UNARY_NARROW(convssslw,"vqmovn.s32",0xf3b60280, 2) +UNARY_NARROW(convsuslw,"vqmovun.s32",0xf3b60240, 2) +UNARY_NARROW(convuuslw,"vqmovn.u32",0xf3b602c0, 2) +UNARY_NARROW(convsssql,"vqmovn.s64",0xf3ba0280, 1) +UNARY_NARROW(convsusql,"vqmovun.s64",0xf3ba0240, 1) +UNARY_NARROW(convuusql,"vqmovn.u64",0xf3ba02c0, 1) + +BINARY_LONG(mulsbw,"vmull.s8",0xf2800c00, 3) +BINARY_LONG(mulubw,"vmull.u8",0xf3800c00, 3) +BINARY_LONG(mulswl,"vmull.s16",0xf2900c00, 2) +BINARY_LONG(muluwl,"vmull.u16",0xf3900c00, 2) + +UNARY(swapw,"vrev16.i8",0xf3b00100, 2) +UNARY(swapl,"vrev32.i8",0xf3b00080, 1) +UNARY(swapq,"vrev64.i8",0xf3b00000, 0) +UNARY(swapwl,"vrev32.i16",0xf3b40080, 1) +UNARY(swaplq,"vrev64.i32",0xf3b80000, 0) + +UNARY_NARROW(select0ql,"vmovn.i64",0xf3ba0200, 1) +UNARY_NARROW(select0lw,"vmovn.i32",0xf3b60200, 2) +UNARY_NARROW(select0wb,"vmovn.i16",0xf3b20200, 3) + +BINARY(addf,"vadd.f32",0xf2000d00, 1) +BINARY(subf,"vsub.f32",0xf2200d00, 1) +BINARY(mulf,"vmul.f32",0xf3000d10, 1) +BINARY(maxf,"vmax.f32",0xf2000f00, 1) +BINARY(minf,"vmin.f32",0xf2200f00, 1) +BINARY(cmpeqf,"vceq.f32",0xf2000e00, 1) +//BINARY_R(cmpltf,"vclt.f32",0xf3200e00, 1) +//BINARY_R(cmplef,"vcle.f32",0xf3000e00, 1) +UNARY(convfl,"vcvt.s32.f32",0xf3bb0700, 1) +UNARY(convlf,"vcvt.f32.s32",0xf3bb0600, 1) + +#define UNARY_VFP(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_neon_emit_unary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc); \ + if (p->insn_shift == vec_shift + 1) { \ + orc_neon_emit_unary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc + 1, \ + p->vars[insn->src_args[0]].alloc + 1); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +#define BINARY_VFP(opcode,insn_name,code,vec_shift) \ +static void \ +orc_neon_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_neon_emit_binary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->src_args[1]].alloc); \ + if (p->insn_shift == vec_shift + 1) { \ + orc_neon_emit_binary (p, insn_name, code, \ + p->vars[insn->dest_args[0]].alloc+1, \ + p->vars[insn->src_args[0]].alloc+1, \ + p->vars[insn->src_args[1]].alloc+1); \ + } else { \ + ORC_COMPILER_ERROR(p, "shift too large"); \ + } \ +} + +BINARY_VFP(addd,"vadd.f64",0xee300b00, 0) +BINARY_VFP(subd,"vsub.f64",0xee300b40, 0) +BINARY_VFP(muld,"vmul.f64",0xee200b00, 0) +//BINARY_VFP(cmpeqd,"vcmpe.f64",0xee000000, 0) +UNARY_VFP(convdf,"vcvt.f64.f32",0xee200b00, 0) +UNARY_VFP(convfd,"vcvt.f32.f64",0xee200b00, 0) + + +#if 0 +static void +orc_neon_rule_divf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_neon_emit_binary_single (p, "vdiv.f32", 0xee800a00, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + if (p->insn_shift > 1) { + orc_neon_emit_binary_single (p, "vdiv.f32", 0xee800a00, + p->vars[insn->dest_args[0]].alloc + 1, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + } +} + +static void +orc_neon_rule_sqrtf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_neon_emit_binary_single (p, "vsqrt.f32", 0xeeb00a40, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + if (p->insn_shift > 1) { + orc_neon_emit_binary_single (p, "vsqrt.f32", 0xeeb00a40, + p->vars[insn->dest_args[0]].alloc + 1, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + } +} +#endif + +static void +orc_neon_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + if (p->insn_shift < 2) { + ORC_ASM_CODE(p," vshl.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->tmpreg), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), 48); + code = NEON_BINARY(0xf2a00590, p->tmpreg, 0, + p->vars[insn->src_args[0]].alloc); + code |= (48) << 16; + orc_arm_emit (p, code); + + orc_neon_emit_binary (p, "vadd.i16", 0xf2100800, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_binary (p, "vadd.i16", 0xf2100800, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } +} + +static void +orc_neon_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + if (p->insn_shift < 1) { + ORC_ASM_CODE(p," vshl.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->tmpreg), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), 32); + code = NEON_BINARY(0xf2a00590, p->tmpreg, 0, + p->vars[insn->src_args[0]].alloc); + code |= (32) << 16; + orc_arm_emit (p, code); + + orc_neon_emit_binary (p, "vadd.i32", 0xf2200800, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_binary (p, "vadd.i32", 0xf2200800, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } +} + +static void +orc_neon_rule_select1wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc, + 0, p->vars[insn->src_args[0]].alloc); + orc_arm_emit (p, code); +} + +static void +orc_neon_rule_select1lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc, + 0, p->vars[insn->src_args[0]].alloc); + orc_arm_emit (p, code); +} + +static void +orc_neon_rule_select1ql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + ORC_ASM_CODE(p," vtrn.32 %s, %s\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc)); + code = NEON_BINARY (0xf2a00810, + p->vars[insn->dest_args[0]].alloc, + 0, p->vars[insn->src_args[0]].alloc); + orc_arm_emit (p, code); +} + +static void +orc_neon_rule_convhwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc, + 0, p->vars[insn->src_args[0]].alloc); + orc_arm_emit (p, code); +} + +static void +orc_neon_rule_convhlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->vars[insn->src_args[0]].alloc), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc, + 0, p->vars[insn->src_args[0]].alloc); + orc_arm_emit (p, code); +} + +static void +orc_neon_rule_mergebw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->insn_shift <= 2) { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + if (p->vars[insn->src_args[1]].last_use != p->insn_index) { + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_unary (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + } + } else { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov_quad (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + orc_neon_emit_mov_quad (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary_quad (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } +} + +static void +orc_neon_rule_mergewl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->insn_shift <= 1) { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + if (p->vars[insn->src_args[1]].last_use != p->insn_index) { + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_unary (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + } + } else { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov_quad (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + if (p->vars[insn->src_args[1]].last_use != p->insn_index) { + orc_neon_emit_mov_quad (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary_quad (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_unary_quad (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + } + } +} + +static void +orc_neon_rule_mergelq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->insn_shift <= 0) { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + if (p->vars[insn->src_args[1]].last_use != p->insn_index) { + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary (p, "vtrn.32", 0xf3ba0080, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_unary (p, "vtrn.32", 0xf3ba0080, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + } + } else { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov_quad (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + if (p->vars[insn->src_args[1]].last_use != p->insn_index) { + orc_neon_emit_mov_quad (p, p->tmpreg, p->vars[insn->src_args[1]].alloc); + orc_neon_emit_unary_quad (p, "vzip.32", 0xf3ba0180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + orc_neon_emit_unary_quad (p, "vzip.32", 0xf3ba0180, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + } + } +} + +static void +orc_neon_rule_splatbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->insn_shift <= 2) { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov_quad (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + orc_neon_emit_mov_quad (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary_quad (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } +} + +static void +orc_neon_rule_splatbl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->insn_shift <= 1) { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + if (p->vars[insn->dest_args[0]].alloc != p->vars[insn->src_args[0]].alloc) { + orc_neon_emit_mov_quad (p, p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc); + } + + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary_quad (p, "vzip.8", 0xf3b20180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + orc_neon_emit_mov (p, p->tmpreg, p->vars[insn->dest_args[0]].alloc); + orc_neon_emit_unary_quad (p, "vzip.16", 0xf3b60180, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } +} + +static void +orc_neon_rule_splatw3q (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_uint32 code; + int offset = 0; + int label = 20; + + orc_arm_add_fixup (p, label, 1); + ORC_ASM_CODE(p," vldr %s, .L%d+%d\n", + orc_neon_reg_name (p->tmpreg), label, offset); + code = 0xed9f0b00; + code |= (p->tmpreg&0xf) << 12; + code |= ((p->tmpreg>>4)&0x1) << 22; + code |= ((offset - 8) >> 2)&0xff; + orc_arm_emit (p, code); + + ORC_ASM_CODE(p," vtbl.8 %s, { %s, %s }, %s\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc + 1), + orc_neon_reg_name (p->tmpreg)); + code = NEON_BINARY(0xf3b00900, + p->vars[insn->dest_args[0]].alloc, + p->vars[insn->src_args[0]].alloc, + p->tmpreg); + orc_arm_emit (p, code); + + if (p->insn_shift > 0) { + ORC_ASM_CODE(p," vtbl.8 %s, { %s }, %s\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc+1), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc+1), + orc_neon_reg_name (p->tmpreg)); + code = NEON_BINARY(0xf3b00800, + p->vars[insn->dest_args[0]].alloc+1, + p->vars[insn->src_args[0]].alloc+1, + p->tmpreg); + orc_arm_emit (p, code); + } + +} + +static void +orc_neon_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_uint32 x; + unsigned int code; + + if (p->insn_shift < 2) { + x = 0xf3800700; + ORC_ASM_CODE(p," vabdl.u8 %s, %s, %s\n", + orc_neon_reg_name_quad (p->tmpreg), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[1]].alloc)); + x |= (p->tmpreg&0xf)<<12; + x |= ((p->tmpreg>>4)&0x1)<<22; + x |= (p->vars[insn->src_args[0]].alloc&0xf)<<16; + x |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<7; + x |= (p->vars[insn->src_args[1]].alloc&0xf)<<0; + x |= ((p->vars[insn->src_args[1]].alloc>>4)&0x1)<<5; + orc_arm_emit (p, x); + + ORC_ASM_CODE(p," vshl.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->tmpreg), + orc_neon_reg_name (p->tmpreg), 64 - (16<insn_shift)); + code = NEON_BINARY(0xf2a00590, p->tmpreg, 0, p->tmpreg); + code |= (64 - (16<insn_shift)) << 16; + orc_arm_emit (p, code); + + orc_neon_emit_unary (p, "vpadal.u16", 0xf3b40680, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } else { + x = 0xf3800700; + ORC_ASM_CODE(p," vabdl.u8 %s, %s, %s\n", + orc_neon_reg_name_quad (p->tmpreg), + orc_neon_reg_name (p->vars[insn->src_args[0]].alloc), + orc_neon_reg_name (p->vars[insn->src_args[1]].alloc)); + x |= (p->tmpreg&0xf)<<12; + x |= ((p->tmpreg>>4)&0x1)<<22; + x |= (p->vars[insn->src_args[0]].alloc&0xf)<<16; + x |= ((p->vars[insn->src_args[0]].alloc>>4)&0x1)<<7; + x |= (p->vars[insn->src_args[1]].alloc&0xf)<<0; + x |= ((p->vars[insn->src_args[1]].alloc>>4)&0x1)<<5; + orc_arm_emit (p, x); + + orc_neon_emit_unary (p, "vpadal.u16", 0xf3b40680, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg); + } +} + +static void +orc_neon_rule_signw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* slow */ + + orc_neon_emit_loadiw (p, p->tmpreg, 1); + if (p->insn_shift < 3) { + orc_neon_emit_binary (p, "vmin.s16", 0xf2100610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmin.s16", 0xf2100610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } + orc_neon_emit_loadiw (p, p->tmpreg, -1); + if (p->insn_shift < 3) { + orc_neon_emit_binary (p, "vmax.s16", 0xf2100600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmax.s16", 0xf2100600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +orc_neon_rule_signb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* slow */ + + orc_neon_emit_loadib (p, p->tmpreg, 1); + if (p->insn_shift < 4) { + orc_neon_emit_binary (p, "vmin.s8", 0xf2000610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmin.s8", 0xf2000610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } + orc_neon_emit_loadib (p, p->tmpreg, -1); + if (p->insn_shift < 4) { + orc_neon_emit_binary (p, "vmax.s8", 0xf2000600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmax.s8", 0xf2000600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +orc_neon_rule_signl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* slow */ + + orc_neon_emit_loadil (p, p->tmpreg, 1); + if (p->insn_shift < 2) { + orc_neon_emit_binary (p, "vmin.s32", 0xf2200610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmin.s32", 0xf2200610, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->src_args[0]].alloc); + } + orc_neon_emit_loadil (p, p->tmpreg, -1); + if (p->insn_shift < 2) { + orc_neon_emit_binary (p, "vmax.s32", 0xf2200600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } else { + orc_neon_emit_binary_quad (p, "vmax.s32", 0xf2200600, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +orc_neon_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.u8",0xf3800c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 4) { + orc_neon_emit_binary_long (p, "vmull.u8",0xf3800c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.s8",0xf2800c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 4) { + orc_neon_emit_binary_long (p, "vmull.s8",0xf2800c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i16 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 8); + code = NEON_BINARY (0xf2880810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_mulhuw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.u16",0xf3900c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 3) { + orc_neon_emit_binary_long (p, "vmull.u16",0xf3900c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_mulhsw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.s16",0xf2900c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 3) { + orc_neon_emit_binary_long (p, "vmull.s16",0xf2900c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i32 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 16); + code = NEON_BINARY (0xf2900810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_mulhul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.u32",0xf3a00c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 32); + code = NEON_BINARY (0xf2a00810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 2) { + orc_neon_emit_binary_long (p, "vmull.u32",0xf3a00c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 32); + code = NEON_BINARY (0xf2a00810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_mulhsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + unsigned int code; + + orc_neon_emit_binary_long (p, "vmull.s32",0xf2a00c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->src_args[1]].alloc); + ORC_ASM_CODE(p," vshrn.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc), + orc_neon_reg_name_quad (p->tmpreg), 32); + code = NEON_BINARY (0xf2a00810, + p->vars[insn->dest_args[0]].alloc, + p->tmpreg, 0); + orc_arm_emit (p, code); + + if (p->insn_shift == 2) { + orc_neon_emit_binary_long (p, "vmull.s32",0xf2a00c00, + p->tmpreg, + p->vars[insn->src_args[0]].alloc + 1, + p->vars[insn->src_args[1]].alloc + 1); + ORC_ASM_CODE(p," vshrn.i64 %s, %s, #%d\n", + orc_neon_reg_name (p->vars[insn->dest_args[0]].alloc + 1), + orc_neon_reg_name_quad (p->tmpreg), 32); + code = NEON_BINARY (0xf2a00810, + p->vars[insn->dest_args[0]].alloc + 1, + p->tmpreg, 0); + orc_arm_emit (p, code); + } +} + +static void +orc_neon_rule_splitql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest0 = p->vars[insn->dest_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[1]].alloc; + int src = p->vars[insn->src_args[0]].alloc; + + if (p->insn_shift < 1) { + if (src != dest0) { + orc_neon_emit_mov (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov (p, dest1, src); + } + orc_neon_emit_unary (p, "vtrn.32", 0xf3ba0080, dest1, dest0); + } else { + if (src != dest0) { + orc_neon_emit_mov_quad (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov_quad (p, dest1, src); + } + orc_neon_emit_unary_quad (p, "vuzp.32", 0xf3ba0140, dest1, dest0); + } +} + +static void +orc_neon_rule_splitlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest0 = p->vars[insn->dest_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[1]].alloc; + int src = p->vars[insn->src_args[0]].alloc; + + if (p->insn_shift < 2) { + if (src != dest0) { + orc_neon_emit_mov (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov (p, dest1, src); + } + orc_neon_emit_unary (p, "vuzp.16", 0xf3b60100, dest1, dest0); + } else { + if (src != dest0) { + orc_neon_emit_mov_quad (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov_quad (p, dest1, src); + } + orc_neon_emit_unary_quad (p, "vuzp.16", 0xf3b60140, dest1, dest0); + } +} + +static void +orc_neon_rule_splitwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest0 = p->vars[insn->dest_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[1]].alloc; + int src = p->vars[insn->src_args[0]].alloc; + + if (p->insn_shift < 2) { + if (src != dest0) { + orc_neon_emit_mov (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov (p, dest1, src); + } + orc_neon_emit_unary (p, "vuzp.8", 0xf3b20100, dest1, dest0); + } else { + if (src != dest0) { + orc_neon_emit_mov_quad (p, dest0, src); + } + if (src != dest1) { + orc_neon_emit_mov_quad (p, dest1, src); + } + orc_neon_emit_unary_quad (p, "vuzp.8", 0xf3b20140, dest1, dest0); + } +} + +static void +orc_neon_rule_div255w (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int src = p->vars[insn->src_args[0]].alloc; + int tmp = p->tmpreg; + + if (p->insn_shift < 3) { + ORC_ASM_CODE(p," vrshrn.u16 %s, %s, #%d\n", orc_neon_reg_name(tmp), + orc_neon_reg_name_quad(src), 8); + orc_arm_emit (p, NEON_BINARY (0xf2880850, tmp, 0, src)); + orc_neon_emit_unary_long (p, "vmovl.u8",0xf3880a10, tmp, tmp); + orc_neon_emit_binary (p, "vadd.i16", 0xf2100800, tmp, tmp, src); + ORC_ASM_CODE(p," vrshrn.u16 %s, %s, #%d\n", orc_neon_reg_name(dest), + orc_neon_reg_name_quad(tmp), 8); + orc_arm_emit (p, NEON_BINARY (0xf2880850, dest, 0, tmp)); + orc_neon_emit_unary_long (p, "vmovl.u8",0xf3880a10, dest, dest); + } else { + ORC_ASM_CODE(p," vrshrn.u16 %s, %s, #%d\n", orc_neon_reg_name(tmp), + orc_neon_reg_name_quad(src), 8); + orc_arm_emit (p, NEON_BINARY (0xf2880850, tmp, 0, src)); + orc_neon_emit_unary_long (p, "vmovl.u8",0xf3880a10, tmp, tmp); + orc_neon_emit_binary_quad (p, "vadd.i16", 0xf2100800, tmp, tmp, src); + ORC_ASM_CODE(p," vrshrn.u16 %s, %s, #%d\n", orc_neon_reg_name(dest), + orc_neon_reg_name_quad(tmp), 8); + orc_arm_emit (p, NEON_BINARY (0xf2880850, dest, 0, tmp)); + orc_neon_emit_unary_long (p, "vmovl.u8",0xf3880a10, dest, dest); + } +} + +void +orc_compiler_neon_register_rules (OrcTarget *target) +{ + OrcRuleSet *rule_set; + + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, 0); + +#define REG(x) \ + orc_rule_register (rule_set, #x , orc_neon_rule_ ## x, NULL) + + REG(absb); + REG(addb); + REG(addssb); + REG(addusb); + REG(andb); + //REG(andnb); + REG(avgsb); + REG(avgub); + REG(cmpeqb); + REG(cmpgtsb); + REG(copyb); + REG(maxsb); + REG(maxub); + REG(minsb); + REG(minub); + REG(mullb); + REG(mulhsb); + REG(mulhub); + REG(orb); + //REG(shlb); + //REG(shrsb); + //REG(shrub); + REG(signb); + REG(subb); + REG(subssb); + REG(subusb); + REG(xorb); + + REG(absw); + REG(addw); + REG(addssw); + REG(addusw); + REG(andw); + //REG(andnw); + REG(avgsw); + REG(avguw); + REG(cmpeqw); + REG(cmpgtsw); + REG(copyw); + REG(maxsw); + REG(maxuw); + REG(minsw); + REG(minuw); + REG(mullw); + REG(mulhsw); + REG(mulhuw); + REG(orw); + //REG(shlw); + //REG(shrsw); + //REG(shruw); + REG(signw); + REG(subw); + REG(subssw); + REG(subusw); + REG(xorw); + + REG(absl); + REG(addl); + REG(addssl); + REG(addusl); + REG(andl); + //REG(andnl); + REG(avgsl); + REG(avgul); + REG(cmpeql); + REG(cmpgtsl); + REG(copyl); + REG(maxsl); + REG(maxul); + REG(minsl); + REG(minul); + REG(mulll); + REG(mulhsl); + REG(mulhul); + REG(orl); + //REG(shll); + //REG(shrsl); + //REG(shrul); + REG(signl); + REG(subl); + REG(subssl); + REG(subusl); + REG(xorl); + + REG(addq); + REG(andq); + REG(orq); + REG(copyq); + REG(subq); + REG(xorq); + + REG(convsbw); + REG(convubw); + REG(convswl); + REG(convuwl); + REG(convslq); + REG(convulq); + REG(convlw); + REG(convql); + REG(convssslw); + REG(convsuslw); + REG(convuuslw); + REG(convsssql); + REG(convsusql); + REG(convuusql); + REG(convwb); + REG(convhwb); + REG(convhlw); + REG(convssswb); + REG(convsuswb); + REG(convuuswb); + + REG(mulsbw); + REG(mulubw); + REG(mulswl); + REG(muluwl); + + REG(accw); + REG(accl); + REG(accsadubl); + REG(swapw); + REG(swapl); + REG(swapq); + REG(swapwl); + REG(swaplq); + REG(select0wb); + REG(select1wb); + REG(select0lw); + REG(select1lw); + REG(select0ql); + if (0) REG(select1ql); + REG(mergebw); + REG(mergewl); + REG(mergelq); + REG(splitql); + REG(splitlw); + REG(splitwb); + + REG(addf); + REG(subf); + REG(mulf); + //REG(divf); + //REG(sqrtf); + REG(maxf); + REG(minf); + REG(cmpeqf); + //REG(cmpltf); + //REG(cmplef); + REG(convfl); + REG(convlf); + + REG(addd); + REG(subd); + REG(muld); + //REG(cmpeqd); + REG(convdf); + REG(convfd); + + REG(splatbw); + REG(splatbl); + REG(splatw3q); + REG(div255w); + + orc_rule_register (rule_set, "loadpb", neon_rule_loadpX, (void *)1); + orc_rule_register (rule_set, "loadpw", neon_rule_loadpX, (void *)2); + orc_rule_register (rule_set, "loadpl", neon_rule_loadpX, (void *)4); + orc_rule_register (rule_set, "loadpq", neon_rule_loadpX, (void *)8); + orc_rule_register (rule_set, "loadb", neon_rule_loadX, (void *)0); + orc_rule_register (rule_set, "loadw", neon_rule_loadX, (void *)0); + orc_rule_register (rule_set, "loadl", neon_rule_loadX, (void *)0); + orc_rule_register (rule_set, "loadq", neon_rule_loadX, (void *)0); + orc_rule_register (rule_set, "loadoffb", neon_rule_loadX, (void *)1); + orc_rule_register (rule_set, "loadoffw", neon_rule_loadX, (void *)1); + orc_rule_register (rule_set, "loadoffl", neon_rule_loadX, (void *)1); + orc_rule_register (rule_set, "storeb", neon_rule_storeX, (void *)0); + orc_rule_register (rule_set, "storew", neon_rule_storeX, (void *)0); + orc_rule_register (rule_set, "storel", neon_rule_storeX, (void *)0); + orc_rule_register (rule_set, "storeq", neon_rule_storeX, (void *)0); + + orc_rule_register (rule_set, "shlb", orc_neon_rule_shift, (void *)0); + orc_rule_register (rule_set, "shrsb", orc_neon_rule_shift, (void *)1); + orc_rule_register (rule_set, "shrub", orc_neon_rule_shift, (void *)2); + orc_rule_register (rule_set, "shlw", orc_neon_rule_shift, (void *)3); + orc_rule_register (rule_set, "shrsw", orc_neon_rule_shift, (void *)4); + orc_rule_register (rule_set, "shruw", orc_neon_rule_shift, (void *)5); + orc_rule_register (rule_set, "shll", orc_neon_rule_shift, (void *)6); + orc_rule_register (rule_set, "shrsl", orc_neon_rule_shift, (void *)7); + orc_rule_register (rule_set, "shrul", orc_neon_rule_shift, (void *)8); + + orc_rule_register (rule_set, "andnb", orc_neon_rule_andn, (void *)3); + orc_rule_register (rule_set, "andnw", orc_neon_rule_andn, (void *)2); + orc_rule_register (rule_set, "andnl", orc_neon_rule_andn, (void *)1); + orc_rule_register (rule_set, "andnq", orc_neon_rule_andn, (void *)0); +} + diff --git a/orc/orcrules-sse.c b/orc/orcrules-sse.c new file mode 100644 index 0000000..2b35983 --- /dev/null +++ b/orc/orcrules-sse.c @@ -0,0 +1,2949 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +#undef MMX +#define SIZE 65536 + +/* sse rules */ + +static void +sse_rule_loadpX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int reg; + int size = ORC_PTR_TO_INT(user); + + if (src->vartype == ORC_VAR_TYPE_PARAM) { + reg = dest->alloc; + + if (size == 8 && src->size == 8) { + orc_x86_emit_mov_memoffset_sse (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]]), + compiler->exec_reg, reg, FALSE); +#ifndef MMX + orc_x86_emit_movhps_memoffset_sse (compiler, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]), + compiler->exec_reg, reg); + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(2,0,2,0), reg, reg); +#else + /* FIXME yes, I understand this is terrible */ + orc_sse_emit_pinsrw_memoffset (compiler, 2, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]) + 0, + compiler->exec_reg, reg); + orc_sse_emit_pinsrw_memoffset (compiler, 3, + (int)ORC_STRUCT_OFFSET(OrcExecutor, + params[insn->src_args[0] + (ORC_VAR_T1 - ORC_VAR_P1)]) + 2, + compiler->exec_reg, reg); +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(1,0,1,0), reg, reg); +#endif +#endif + } else { + orc_x86_emit_mov_memoffset_sse (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[0]]), + compiler->exec_reg, reg, FALSE); + if (size < 8) { + if (size == 1) { + orc_sse_emit_punpcklbw (compiler, reg, reg); + } +#ifndef MMX + if (size <= 2) { + orc_sse_emit_pshuflw (compiler, 0, reg, reg); + } + orc_sse_emit_pshufd (compiler, 0, reg, reg); +#else + if (size <= 2) { + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(0,0,0,0), reg, reg); + } else { + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(1,0,1,0), reg, reg); + } +#endif + } else { +#ifndef MMX + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(1,0,1,0), reg, reg); +#endif + } + } + } else if (src->vartype == ORC_VAR_TYPE_CONST) { + orc_sse_load_constant (compiler, dest->alloc, size, src->value.i); + } else { + ORC_ASSERT(0); + } +} + +static void +sse_rule_loadX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + offset = compiler->offset * src->size; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_sse (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 2: + orc_sse_emit_pxor (compiler, dest->alloc, dest->alloc); + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 4: + orc_x86_emit_mov_memoffset_sse (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 8: + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + src->update_type = 2; +} + +static void +sse_rule_loadoffX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + if (compiler->vars[insn->src_args[1]].vartype != ORC_VAR_TYPE_CONST) { + ORC_COMPILER_ERROR(compiler, "Rule only works with consts"); + return; + } + + offset = (compiler->offset + compiler->vars[insn->src_args[1]].value.i) * + src->size; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_sse (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 2: + orc_sse_emit_pxor (compiler, dest->alloc, dest->alloc); + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 4: + orc_x86_emit_mov_memoffset_sse (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 8: + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + src->update_type = 2; +} + +static void +sse_rule_loadupib (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + int tmp = orc_compiler_get_temp_reg (compiler); + + offset = (compiler->offset * src->size) >> 1; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + case 2: + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + orc_sse_emit_movdqa (compiler, dest->alloc, tmp); + orc_sse_emit_psrlw (compiler, 8, tmp); + break; + case 4: + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset + 1, ptr_reg, tmp); + break; + case 8: + orc_x86_emit_mov_memoffset_sse (compiler, 4, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_sse (compiler, 4, offset + 1, ptr_reg, + tmp, FALSE); + break; + case 16: + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset + 1, ptr_reg, + tmp, FALSE); + break; + case 32: + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset, ptr_reg, + dest->alloc, FALSE); + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset + 1, ptr_reg, + tmp, FALSE); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + + orc_sse_emit_pavgb (compiler, dest->alloc, tmp); + orc_sse_emit_punpcklbw (compiler, tmp, dest->alloc); + + src->update_type = 1; +} + +static void +sse_rule_loadupdb (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int ptr_reg; + int offset = 0; + + offset = (compiler->offset * src->size) >> 1; + if (src->ptr_register == 0) { + int i = insn->src_args[0]; + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]), + compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = src->ptr_register; + } + switch (src->size << compiler->loop_shift) { + case 1: + case 2: + orc_x86_emit_mov_memoffset_reg (compiler, 1, offset, ptr_reg, + compiler->gp_tmpreg); + orc_x86_emit_mov_reg_sse (compiler, compiler->gp_tmpreg, dest->alloc); + break; + case 4: + orc_sse_emit_pinsrw_memoffset (compiler, 0, offset, ptr_reg, dest->alloc); + break; + case 8: + orc_x86_emit_mov_memoffset_sse (compiler, 4, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 16: + orc_x86_emit_mov_memoffset_sse (compiler, 8, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + case 32: + orc_x86_emit_mov_memoffset_sse (compiler, 16, offset, ptr_reg, + dest->alloc, src->is_aligned); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad load size %d", + src->size << compiler->loop_shift); + break; + } + switch (src->size) { + case 1: + orc_sse_emit_punpcklbw (compiler, dest->alloc, dest->alloc); + break; + case 2: + orc_sse_emit_punpcklwd (compiler, dest->alloc, dest->alloc); + break; + case 4: + orc_sse_emit_punpckldq (compiler, dest->alloc, dest->alloc); + break; + } + + src->update_type = 1; +} + +static void +sse_rule_storeX (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int offset; + int ptr_reg; + + offset = compiler->offset * dest->size; + if (dest->ptr_register == 0) { + orc_x86_emit_mov_memoffset_reg (compiler, compiler->is_64bit ? 8 : 4, + dest->ptr_offset, compiler->exec_reg, compiler->gp_tmpreg); + ptr_reg = compiler->gp_tmpreg; + } else { + ptr_reg = dest->ptr_register; + } + switch (dest->size << compiler->loop_shift) { + case 1: + /* FIXME we might be using ecx twice here */ + if (ptr_reg == compiler->gp_tmpreg) { + ORC_COMPILER_ERROR(compiler,"unimplemented"); + } + orc_x86_emit_mov_sse_reg (compiler, src->alloc, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 1, compiler->gp_tmpreg, + offset, ptr_reg); + break; + case 2: + if (compiler->target_flags & ORC_TARGET_SSE_SSE4_1) { + orc_sse_emit_pextrw_memoffset (compiler, 0, src->alloc, offset, + ptr_reg); + } else { + /* FIXME we might be using ecx twice here */ + if (ptr_reg == compiler->gp_tmpreg) { + ORC_COMPILER_ERROR(compiler,"unimplemented"); + } + orc_x86_emit_mov_sse_reg (compiler, src->alloc, compiler->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (compiler, 2, compiler->gp_tmpreg, + offset, ptr_reg); + } + break; + case 4: + orc_x86_emit_mov_sse_memoffset (compiler, 4, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + case 8: + orc_x86_emit_mov_sse_memoffset (compiler, 8, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + case 16: + orc_x86_emit_mov_sse_memoffset (compiler, 16, src->alloc, offset, ptr_reg, + dest->is_aligned, dest->is_uncached); + break; + default: + ORC_COMPILER_ERROR(compiler,"bad size"); + break; + } + + dest->update_type = 2; +} + +#if try1 +static void +sse_rule_ldresnearl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int tmpc; + + orc_x86_emit_mov_sse_reg (compiler, X86_XMM6, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + ORC_ASM_CODE(compiler," movdqu 0(%%%s,%%%s,4), %%%s\n", + orc_x86_get_regname_ptr(compiler, src->ptr_register), + orc_x86_get_regname_ptr(compiler, compiler->gp_tmpreg), + orc_x86_get_regname_sse(dest->alloc)); + *compiler->codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, dest->ptr_register, 0, dest->alloc); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + orc_x86_emit_modrm_memindex (compiler, dest->alloc, 0, + src->ptr_register, compiler->gp_tmpreg, 2); + +#if 0 + orc_sse_emit_movdqa (compiler, X86_XMM6, tmp); + orc_sse_emit_pslld (compiler, 10, tmp); + orc_sse_emit_psrld (compiler, 26, tmp); + orc_sse_emit_pslld (compiler, 2, tmp); + + orc_sse_emit_movdqa (compiler, tmp, tmp2); + orc_sse_emit_pslld (compiler, 8, tmp2); + orc_sse_emit_por (compiler, tmp2, tmp); + orc_sse_emit_movdqa (compiler, tmp, tmp2); + orc_sse_emit_pslld (compiler, 16, tmp2); + orc_sse_emit_por (compiler, tmp2, tmp); +#else + orc_sse_emit_movdqa (compiler, X86_XMM6, tmp); + tmpc = orc_compiler_get_constant_long (compiler, 0x02020202, + 0x06060606, 0x0a0a0a0a, 0x0e0e0e0e); + orc_sse_emit_pshufb (compiler, tmpc, tmp); + orc_sse_emit_paddb (compiler, tmp, tmp); + orc_sse_emit_paddb (compiler, tmp, tmp); +#endif + + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(0,0,0,0), tmp, tmp2); + orc_sse_emit_psubd (compiler, tmp2, tmp); + tmpc = orc_compiler_get_constant (compiler, 4, 0x03020100); + orc_sse_emit_paddd (compiler, tmpc, tmp); + + orc_sse_emit_pshufb (compiler, tmp, dest->alloc); + + orc_sse_emit_movdqa (compiler, X86_XMM7, tmp); + orc_sse_emit_pslld (compiler, compiler->loop_shift, tmp); + + orc_sse_emit_paddd (compiler, tmp, X86_XMM6); + + src->update_type = 0; +} +#endif + +static void +sse_rule_ldresnearl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int i; + + for(i=0;i<(1<loop_shift);i++){ + if (i == 0) { + orc_x86_emit_mov_memoffset_sse (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + } else { + orc_x86_emit_mov_memindex_sse (compiler, 4, 0, + src->ptr_register, compiler->gp_tmpreg, 2, tmp, FALSE); +#ifdef MMX + //orc_mmx_emit_punpckldq (compiler, tmp, dest->alloc); + orc_sse_emit_psllq (compiler, 8*4*i, tmp); + orc_sse_emit_por (compiler, tmp, dest->alloc); +#else + orc_sse_emit_pslldq (compiler, 4*i, tmp); + orc_sse_emit_por (compiler, tmp, dest->alloc); +#endif + } + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + } + + orc_x86_emit_add_reg_reg_shift (compiler, compiler->is_64bit ? 8 : 4, + compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + + src->update_type = 0; +} + +#ifndef MMX +static void +sse_rule_ldreslinl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int regsize = compiler->is_64bit ? 8 : 4; + int i; + + if (compiler->loop_shift == 0) { + orc_x86_emit_mov_memoffset_sse (compiler, 8, 0, + src->ptr_register, tmp, FALSE); + + orc_sse_emit_pxor (compiler, tmp2, tmp2); + orc_sse_emit_punpcklbw (compiler, tmp2, tmp); + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(3,2,3,2), tmp, tmp2); + orc_sse_emit_psubw (compiler, tmp, tmp2); + + orc_x86_emit_mov_reg_sse (compiler, src->ptr_offset, tmp); + orc_sse_emit_pshuflw (compiler, ORC_SSE_SHUF(0,0,0,0), tmp, tmp); + orc_sse_emit_psrlw (compiler, 8, tmp); + orc_sse_emit_pmullw (compiler, tmp2, tmp); + orc_sse_emit_psraw (compiler, 8, tmp); + orc_sse_emit_pxor (compiler, tmp2, tmp2); + orc_sse_emit_packsswb (compiler, tmp2, tmp); + + orc_x86_emit_mov_memoffset_sse (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + orc_sse_emit_paddb (compiler, tmp, dest->alloc); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, regsize, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, regsize, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } else { + int tmp3 = orc_compiler_get_temp_reg (compiler); + int tmp4 = orc_compiler_get_temp_reg (compiler); + + for(i=0;i<(1<loop_shift);i+=2){ + orc_x86_emit_mov_memoffset_sse (compiler, 8, 0, + src->ptr_register, tmp, FALSE); + orc_x86_emit_mov_reg_sse (compiler, src->ptr_offset, tmp4); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_mov_memindex_sse (compiler, 8, 0, + src->ptr_register, compiler->gp_tmpreg, 2, tmp2, FALSE); + + orc_sse_emit_punpckldq (compiler, tmp2, tmp); + orc_sse_emit_movdqa (compiler, tmp, tmp2); + if (i == 0) { + orc_sse_emit_movdqa (compiler, tmp, dest->alloc); + } else { + orc_sse_emit_punpcklqdq (compiler, tmp, dest->alloc); + } + + orc_sse_emit_pxor (compiler, tmp3, tmp3); + orc_sse_emit_punpcklbw (compiler, tmp3, tmp); + orc_sse_emit_punpckhbw (compiler, tmp3, tmp2); + + orc_sse_emit_psubw (compiler, tmp, tmp2); + + ORC_ASM_CODE(compiler," pinsrw $%d, %%%s, %%%s\n", 1, + orc_x86_get_regname (src->ptr_offset), + orc_x86_get_regname_sse(tmp4)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex (compiler, 0, tmp4, 0, src->ptr_offset); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xc4; + orc_x86_emit_modrm_reg (compiler, src->ptr_offset, tmp4); + *compiler->codeptr++ = 1; + +#if 0 + orc_sse_emit_punpcklwd (compiler, tmp4, tmp4); + orc_sse_emit_punpckldq (compiler, tmp4, tmp4); +#else + orc_sse_emit_pshuflw (compiler, ORC_SSE_SHUF(1,1,0,0), tmp4, tmp4); + orc_sse_emit_pshufd (compiler, ORC_SSE_SHUF(1,1,0,0), tmp4, tmp4); +#endif + orc_sse_emit_psrlw (compiler, 8, tmp4); + orc_sse_emit_pmullw (compiler, tmp4, tmp2); + orc_sse_emit_psraw (compiler, 8, tmp2); + orc_sse_emit_pxor (compiler, tmp, tmp); + orc_sse_emit_packsswb (compiler, tmp, tmp2); + + if (i != 0) { + orc_sse_emit_pslldq (compiler, 8, tmp2); + } + orc_sse_emit_paddb (compiler, tmp2, dest->alloc); + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, 4, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, 8, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } + } + + src->update_type = 0; +} +#else +static void +mmx_rule_ldreslinl (OrcCompiler *compiler, void *user, OrcInstruction *insn) +{ + OrcVariable *src = compiler->vars + insn->src_args[0]; + int increment_var = insn->src_args[2]; + OrcVariable *dest = compiler->vars + insn->dest_args[0]; + int tmp = orc_compiler_get_temp_reg (compiler); + int tmp2 = orc_compiler_get_temp_reg (compiler); + int zero; + int regsize = compiler->is_64bit ? 8 : 4; + int i; + + zero = orc_compiler_get_constant (compiler, 1, 0); + for(i=0;i<(1<loop_shift);i++){ + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, tmp, FALSE); + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 4, + src->ptr_register, tmp2, FALSE); + + orc_mmx_emit_punpcklbw (compiler, zero, tmp); + orc_mmx_emit_punpcklbw (compiler, zero, tmp2); + orc_mmx_emit_psubw (compiler, tmp, tmp2); + + orc_x86_emit_mov_reg_mmx (compiler, src->ptr_offset, tmp); + orc_mmx_emit_pshufw (compiler, ORC_MMX_SHUF(0,0,0,0), tmp, tmp); + orc_mmx_emit_psrlw (compiler, 8, tmp); + orc_mmx_emit_pmullw (compiler, tmp2, tmp); + orc_mmx_emit_psraw (compiler, 8, tmp); + orc_mmx_emit_pxor (compiler, tmp2, tmp2); + orc_mmx_emit_packsswb (compiler, tmp2, tmp); + + if (i == 0) { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, dest->alloc, FALSE); + orc_mmx_emit_paddb (compiler, tmp, dest->alloc); + } else { + orc_x86_emit_mov_memoffset_mmx (compiler, 4, 0, + src->ptr_register, tmp2, FALSE); + orc_mmx_emit_paddb (compiler, tmp, tmp2); + orc_mmx_emit_psllq (compiler, 32, tmp2); + orc_mmx_emit_por (compiler, tmp2, dest->alloc); + } + + if (compiler->vars[increment_var].vartype == ORC_VAR_TYPE_PARAM) { + orc_x86_emit_add_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[increment_var]), + compiler->exec_reg, src->ptr_offset); + } else { + orc_x86_emit_add_imm_reg (compiler, regsize, + compiler->vars[increment_var].value.i, + src->ptr_offset, FALSE); + } + + orc_x86_emit_mov_reg_reg (compiler, 4, src->ptr_offset, compiler->gp_tmpreg); + orc_x86_emit_sar_imm_reg (compiler, 4, 16, compiler->gp_tmpreg); + + orc_x86_emit_add_reg_reg_shift (compiler, regsize, compiler->gp_tmpreg, + src->ptr_register, 2); + orc_x86_emit_and_imm_reg (compiler, 4, 0xffff, src->ptr_offset); + } + + src->update_type = 0; +} +#endif + +static void +sse_rule_copyx (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->vars[insn->src_args[0]].alloc == p->vars[insn->dest_args[0]].alloc) { + return; + } + + orc_sse_emit_movdqa (p, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +#define UNARY(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + + +UNARY(absb,"pabsb",0x381c) +BINARY(addb,"paddb",0xfc) +BINARY(addssb,"paddsb",0xec) +BINARY(addusb,"paddusb",0xdc) +BINARY(andb,"pand",0xdb) +BINARY(andnb,"pandn",0xdf) +BINARY(avgub,"pavgb",0xe0) +BINARY(cmpeqb,"pcmpeqb",0x74) +BINARY(cmpgtsb,"pcmpgtb",0x64) +BINARY(maxsb,"pmaxsb",0x383c) +BINARY(maxub,"pmaxub",0xde) +BINARY(minsb,"pminsb",0x3838) +BINARY(minub,"pminub",0xda) +//BINARY(mullb,"pmullb",0xd5) +//BINARY(mulhsb,"pmulhb",0xe5) +//BINARY(mulhub,"pmulhub",0xe4) +BINARY(orb,"por",0xeb) +//UNARY(signb,"psignb",0x3808) +BINARY(subb,"psubb",0xf8) +BINARY(subssb,"psubsb",0xe8) +BINARY(subusb,"psubusb",0xd8) +BINARY(xorb,"pxor",0xef) + +UNARY(absw,"pabsw",0x381d) +BINARY(addw,"paddw",0xfd) +BINARY(addssw,"paddsw",0xed) +BINARY(addusw,"paddusw",0xdd) +BINARY(andw,"pand",0xdb) +BINARY(andnw,"pandn",0xdf) +BINARY(avguw,"pavgw",0xe3) +BINARY(cmpeqw,"pcmpeqw",0x75) +BINARY(cmpgtsw,"pcmpgtw",0x65) +BINARY(maxsw,"pmaxsw",0xee) +BINARY(maxuw,"pmaxuw",0x383e) +BINARY(minsw,"pminsw",0xea) +BINARY(minuw,"pminuw",0x383a) +BINARY(mullw,"pmullw",0xd5) +BINARY(mulhsw,"pmulhw",0xe5) +BINARY(mulhuw,"pmulhuw",0xe4) +BINARY(orw,"por",0xeb) +//UNARY(signw,"psignw",0x3809) +BINARY(subw,"psubw",0xf9) +BINARY(subssw,"psubsw",0xe9) +BINARY(subusw,"psubusw",0xd9) +BINARY(xorw,"pxor",0xef) + +UNARY(absl,"pabsd",0x381e) +BINARY(addl,"paddd",0xfe) +//BINARY(addssl,"paddsd",0xed) +//BINARY(addusl,"paddusd",0xdd) +BINARY(andl,"pand",0xdb) +BINARY(andnl,"pandn",0xdf) +//BINARY(avgul,"pavgd",0xe3) +BINARY(cmpeql,"pcmpeqd",0x76) +BINARY(cmpgtsl,"pcmpgtd",0x66) +BINARY(maxsl,"pmaxsd",0x383d) +BINARY(maxul,"pmaxud",0x383f) +BINARY(minsl,"pminsd",0x3839) +BINARY(minul,"pminud",0x383b) +BINARY(mulll,"pmulld",0x3840) +//BINARY(mulhsl,"pmulhd",0xe5) +//BINARY(mulhul,"pmulhud",0xe4) +BINARY(orl,"por",0xeb) +//UNARY(signl,"psignd",0x380a) +BINARY(subl,"psubd",0xfa) +//BINARY(subssl,"psubsd",0xe9) +//BINARY(subusl,"psubusd",0xd9) +BINARY(xorl,"pxor",0xef) + +BINARY(andq,"pand",0xdb) +BINARY(andnq,"pandn",0xdf) +BINARY(orq,"por",0xeb) +BINARY(xorq,"pxor",0xef) +BINARY(cmpeqq,"pcmpeqq",0x3829) +BINARY(cmpgtsq,"pcmpgtq",0x3837) + +#ifndef MMX +BINARY(addq,"paddq",0xd4) +BINARY(subq,"psubq",0xfb) +#endif + +static void +sse_rule_accw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_paddw (p, src, dest); +} + +static void +sse_rule_accl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + if (p->loop_shift == 0) { + orc_sse_emit_pslldq (p, 12, src); + } +#endif + orc_sse_emit_paddd (p, src, dest); +} + +static void +sse_rule_accsadubl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src1 = p->vars[insn->src_args[0]].alloc; + int src2 = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + +#ifndef MMX + if (p->loop_shift <= 2) { + orc_sse_emit_movdqa (p, src1, tmp); + orc_sse_emit_pslldq (p, 16 - (1<loop_shift), tmp); + orc_sse_emit_movdqa (p, src2, tmp2); + orc_sse_emit_pslldq (p, 16 - (1<loop_shift), tmp2); + orc_sse_emit_psadbw (p, tmp2, tmp); + } else if (p->loop_shift == 3) { + orc_sse_emit_movdqa (p, src1, tmp); + orc_sse_emit_psadbw (p, src2, tmp); + orc_sse_emit_pslldq (p, 8, tmp); + } else { + orc_sse_emit_movdqa (p, src1, tmp); + orc_sse_emit_psadbw (p, src2, tmp); + } +#else + if (p->loop_shift <= 2) { + orc_sse_emit_movdqa (p, src1, tmp); + orc_sse_emit_psllq (p, 8*(8 - (1<loop_shift)), tmp); + orc_sse_emit_movdqa (p, src2, tmp2); + orc_sse_emit_psllq (p, 8*(8 - (1<loop_shift)), tmp2); + orc_sse_emit_psadbw (p, tmp2, tmp); + } else { + orc_sse_emit_movdqa (p, src1, tmp); + orc_sse_emit_psadbw (p, src2, tmp); + } +#endif + orc_sse_emit_paddd (p, tmp, dest); +} + +static void +sse_rule_signX_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + const char * names[] = { "psignb", "psignw", "psignd" }; + int codes[] = { 0x3808, 0x3809, 0x380a }; + int type = ORC_PTR_TO_INT(user); + int tmpc; + + tmpc = orc_compiler_get_temp_constant (p, 1<vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x0001); + orc_sse_emit_pminsw (p, tmp, dest); + + tmp = orc_compiler_get_constant (p, 2, 0xffff); + orc_sse_emit_pmaxsw (p, tmp, dest); +} + +static void +sse_rule_absb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_pxor (p, tmp, tmp); + orc_sse_emit_pcmpgtb (p, src, tmp); + orc_sse_emit_pxor (p, tmp, dest); + orc_sse_emit_psubb (p, tmp, dest); +} + +static void +sse_rule_absw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (src == dest) { + orc_sse_emit_movdqa (p, src, tmp); + } else { + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_movdqa (p, tmp, dest); + } + + orc_sse_emit_psraw (p, 15, tmp); + orc_sse_emit_pxor (p, tmp, dest); + orc_sse_emit_psubw (p, tmp, dest); + +} + +static void +sse_rule_absl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (src == dest) { + orc_sse_emit_movdqa (p, src, tmp); + } else { + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_movdqa (p, tmp, dest); + } + + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_pxor (p, tmp, dest); + orc_sse_emit_psubd (p, tmp, dest); + +} + +static void +sse_rule_shift (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int type = ORC_PTR_TO_INT(user); + int imm_code1[] = { 0x71, 0x71, 0x71, 0x72, 0x72, 0x72, 0x73, 0x73 }; + int imm_code2[] = { 6, 2, 4, 6, 2, 4, 6, 2 }; + int reg_code[] = { 0xf1, 0xd1, 0xe1, 0xf2, 0xd2, 0xe2, 0xf3, 0xd3 }; + const char *code[] = { "psllw", "psrlw", "psraw", "pslld", "psrld", "psrad", "psllq", "psrlq" }; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_sse_emit_shiftimm (p, code[type], imm_code1[type], imm_code2[type], + p->vars[insn->src_args[1]].value.i, + p->vars[insn->dest_args[0]].alloc); + } else if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_PARAM) { + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME this is a gross hack to reload the register with a + * 64-bit version of the parameter. */ + orc_x86_emit_mov_memoffset_sse (p, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor, params[insn->src_args[1]]), + p->exec_reg, tmp, FALSE); + + orc_sse_emit_660f (p, code[type], reg_code[type], tmp, + p->vars[insn->dest_args[0]].alloc); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants or params"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +sse_rule_shlb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_sse_emit_psllw (p, p->vars[insn->src_args[1]].value.i, dest); + tmp = orc_compiler_get_constant (p, 1, + 0xff&(0xff<vars[insn->src_args[1]].value.i)); + orc_sse_emit_pand (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +sse_rule_shrsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psraw (p, p->vars[insn->src_args[1]].value.i, tmp); + orc_sse_emit_psrlw (p, 8, tmp); + + orc_sse_emit_psraw (p, 8 + p->vars[insn->src_args[1]].value.i, dest); + orc_sse_emit_psllw (p, 8, dest); + + orc_sse_emit_por (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +sse_rule_shrub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { + orc_sse_emit_psrlw (p, p->vars[insn->src_args[1]].value.i, dest); + tmp = orc_compiler_get_constant (p, 1, + (0xff>>p->vars[insn->src_args[1]].value.i)); + orc_sse_emit_pand (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +sse_rule_shrsq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + if (p->vars[insn->src_args[1]].vartype == ORC_VAR_TYPE_CONST) { +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(3,3,1,1), src, tmp); +#else + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(3,2,3,2), src, tmp); +#endif + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_psllq (p, 64-p->vars[insn->src_args[1]].value.i, tmp); + + orc_sse_emit_psrlq (p, p->vars[insn->src_args[1]].value.i, dest); + orc_sse_emit_por (p, tmp, dest); + } else { + ORC_COMPILER_ERROR(p,"rule only works with constants"); + p->result = ORC_COMPILE_RESULT_UNKNOWN_COMPILE; + } +} + +static void +sse_rule_convsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklbw (p, src, dest); + orc_sse_emit_psraw (p, 8, dest); +} + +static void +sse_rule_convubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME need a zero register */ + if (0) { + orc_sse_emit_punpcklbw (p, src, dest); + orc_sse_emit_psrlw (p, 8, dest); + } else { + orc_sse_emit_pxor(p, tmp, tmp); + orc_sse_emit_punpcklbw (p, tmp, dest); + } +} + +static void +sse_rule_convssswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_packsswb (p, src, dest); +} + +static void +sse_rule_convsuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_packuswb (p, src, dest); +} + +static void +sse_rule_convuuswb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_movdqa (p, src, dest); + orc_sse_emit_psrlw (p, 15, tmp); + orc_sse_emit_psllw (p, 14, tmp); + orc_sse_emit_por (p, tmp, dest); + orc_sse_emit_psllw (p, 1, tmp); + orc_sse_emit_pxor (p, tmp, dest); + orc_sse_emit_packuswb (p, dest, dest); +} + +static void +sse_rule_convwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_psllw (p, 8, dest); + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_packuswb (p, dest, dest); +} + +static void +sse_rule_convhwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_packuswb (p, dest, dest); +} + +static void +sse_rule_convswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklwd (p, src, dest); + orc_sse_emit_psrad (p, 16, dest); +} + +static void +sse_rule_convuwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* FIXME need a zero register */ + if (0) { + orc_sse_emit_punpcklwd (p, src, dest); + orc_sse_emit_psrld (p, 16, dest); + } else { + orc_sse_emit_pxor(p, tmp, tmp); + orc_sse_emit_punpcklwd (p, tmp, dest); + } +} + +static void +sse_rule_convlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_pslld (p, 16, dest); + orc_sse_emit_psrad (p, 16, dest); + orc_sse_emit_packssdw (p, dest, dest); +} + +static void +sse_rule_convhlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_psrad (p, 16, dest); + orc_sse_emit_packssdw (p, dest, dest); +} + +static void +sse_rule_convssslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_packssdw (p, src, dest); +} + +static void +sse_rule_convsuslw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_packusdw (p, src, dest); +} + +static void +sse_rule_convslq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_punpckldq (p, tmp, dest); +} + +static void +sse_rule_convulq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 4, 0); + orc_sse_emit_punpckldq (p, tmp, dest); +} + +static void +sse_rule_convql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,2,0), src, dest); +#else + orc_sse_emit_movdqa (p, src, dest); +#endif +} + +static void +sse_rule_splatw3q (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_sse_emit_pshuflw (p, ORC_SSE_SHUF(3,3,3,3), dest, dest); + orc_sse_emit_pshufhw (p, ORC_SSE_SHUF(3,3,3,3), dest, dest); +#else + orc_mmx_emit_pshufw (p, ORC_SSE_SHUF(3,3,3,3), dest, dest); +#endif +} + +static void +sse_rule_splatbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklbw (p, dest, dest); +} + +static void +sse_rule_splatbl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklbw (p, dest, dest); + orc_sse_emit_punpcklwd (p, dest, dest); +} + +static void +sse_rule_div255w (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 2, 0x0080); + orc_sse_emit_paddw (p, tmpc, dest); + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_psrlw (p, 8, tmp); + orc_sse_emit_paddw (p, tmp, dest); + orc_sse_emit_psrlw (p, 8, dest); +} + +#if 1 +static void +sse_rule_divluw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* About 5.2 cycles per array member on ginger */ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int a = orc_compiler_get_temp_reg (p); + int j = orc_compiler_get_temp_reg (p); + int j2 = orc_compiler_get_temp_reg (p); + int l = orc_compiler_get_temp_reg (p); + int divisor = orc_compiler_get_temp_reg (p); + int tmp; + int i; + + orc_sse_emit_movdqa (p, src, divisor); + orc_sse_emit_psllw (p, 8, divisor); + orc_sse_emit_psrlw (p, 1, divisor); + + orc_sse_load_constant (p, a, 2, 0x00ff); + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_sse_emit_movdqa (p, tmp, j); + orc_sse_emit_psrlw (p, 8, j); + + orc_sse_emit_pxor (p, tmp, dest); + + for(i=0;i<7;i++){ + orc_sse_emit_movdqa (p, divisor, l); + orc_sse_emit_pxor (p, tmp, l); + orc_sse_emit_pcmpgtw (p, dest, l); + orc_sse_emit_movdqa (p, l, j2); + orc_sse_emit_pandn (p, divisor, l); + orc_sse_emit_psubw (p, l, dest); + orc_sse_emit_psrlw (p, 1, divisor); + + orc_sse_emit_pand (p, j, j2); + orc_sse_emit_pxor (p, j2, a); + orc_sse_emit_psrlw (p, 1, j); + } + + orc_sse_emit_movdqa (p, divisor, l); + orc_sse_emit_pxor (p, tmp, l); + orc_sse_emit_pcmpgtw (p, dest, l); + orc_sse_emit_pand (p, j, l); + orc_sse_emit_pxor (p, l, a); + + orc_sse_emit_movdqa (p, a, dest); +} +#else +static void +sse_rule_divluw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + /* About 8.4 cycles per array member on ginger */ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int b = orc_compiler_get_temp_reg (p); + int a = orc_compiler_get_temp_reg (p); + int k = orc_compiler_get_temp_reg (p); + int j = orc_compiler_get_temp_reg (p); + int tmp; + int i; + + orc_sse_emit_movdqa (p, dest, b); + tmp = orc_compiler_get_constant (p, 2, 0x00ff); + orc_sse_emit_pand (p, tmp, src); + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_sse_emit_pxor (p, tmp, b); + + orc_sse_emit_pxor (p, a, a); + orc_sse_emit_movdqa (p, tmp, j); + orc_sse_emit_psrlw (p, 8, j); + + for(i=0;i<8;i++){ + orc_sse_emit_por (p, j, a); + orc_sse_emit_movdqa (p, a, k); + orc_sse_emit_pmullw (p, src, k); + orc_sse_emit_pxor (p, tmp, k); + orc_sse_emit_pcmpgtw (p, b, k); + orc_sse_emit_pand (p, j, k); + orc_sse_emit_pxor (p, k, a); + orc_sse_emit_psrlw (p, 1, j); + } + + orc_sse_emit_movdqa (p, a, dest); +} +#endif + +static void +sse_rule_mulsbw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_punpcklbw (p, src, tmp); + orc_sse_emit_psraw (p, 8, tmp); + orc_sse_emit_punpcklbw (p, dest, dest); + orc_sse_emit_psraw (p, 8, dest); + orc_sse_emit_pmullw (p, tmp, dest); +} + +static void +sse_rule_mulubw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_punpcklbw (p, src, tmp); + orc_sse_emit_psrlw (p, 8, tmp); + orc_sse_emit_punpcklbw (p, dest, dest); + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_pmullw (p, tmp, dest); +} + +static void +sse_rule_mullb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, dest, tmp); + + orc_sse_emit_pmullw (p, src, dest); + orc_sse_emit_psllw (p, 8, dest); + orc_sse_emit_psrlw (p, 8, dest); + + orc_sse_emit_movdqa (p, src, tmp2); + orc_sse_emit_psraw (p, 8, tmp2); + orc_sse_emit_psraw (p, 8, tmp); + orc_sse_emit_pmullw (p, tmp2, tmp); + orc_sse_emit_psllw (p, 8, tmp); + + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_mulhsb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_movdqa (p, dest, tmp2); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psraw (p, 8, tmp); + + orc_sse_emit_psllw (p, 8, dest); + orc_sse_emit_psraw (p, 8, dest); + + orc_sse_emit_pmullw (p, tmp, dest); + orc_sse_emit_psrlw (p, 8, dest); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psraw (p, 8, tmp); + orc_sse_emit_psraw (p, 8, tmp2); + orc_sse_emit_pmullw (p, tmp, tmp2); + orc_sse_emit_psrlw (p, 8, tmp2); + orc_sse_emit_psllw (p, 8, tmp2); + orc_sse_emit_por (p, tmp2, dest); +} + +static void +sse_rule_mulhub (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_movdqa (p, dest, tmp2); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psrlw (p, 8, tmp); + + orc_sse_emit_psllw (p, 8, dest); + orc_sse_emit_psrlw (p, 8, dest); + + orc_sse_emit_pmullw (p, tmp, dest); + orc_sse_emit_psrlw (p, 8, dest); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psrlw (p, 8, tmp); + orc_sse_emit_psrlw (p, 8, tmp2); + orc_sse_emit_pmullw (p, tmp, tmp2); + orc_sse_emit_psrlw (p, 8, tmp2); + orc_sse_emit_psllw (p, 8, tmp2); + orc_sse_emit_por (p, tmp2, dest); +} + +static void +sse_rule_mulswl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pmulhw (p, src, tmp); + orc_sse_emit_pmullw (p, src, dest); + orc_sse_emit_punpcklwd (p, tmp, dest); +} + +static void +sse_rule_muluwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pmulhuw (p, src, tmp); + orc_sse_emit_pmullw (p, src, dest); + orc_sse_emit_punpcklwd (p, tmp, dest); +} + +static void +sse_rule_mulll_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int i; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + orc_x86_emit_mov_sse_memoffset (p, 16, p->vars[insn->src_args[0]].alloc, + offset, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_sse_memoffset (p, 16, p->vars[insn->src_args[1]].alloc, + offset + 16, p->exec_reg, FALSE, FALSE); + + for(i=0;i<(1<insn_shift);i++) { + orc_x86_emit_mov_memoffset_reg (p, 4, offset + 4*i, p->exec_reg, + p->gp_tmpreg); + orc_x86_emit_imul_memoffset_reg (p, 4, offset + 16+4*i, p->exec_reg, + p->gp_tmpreg); + orc_x86_emit_mov_reg_memoffset (p, 4, p->gp_tmpreg, offset + 4*i, + p->exec_reg); + } + + orc_x86_emit_mov_memoffset_sse (p, 16, offset, p->exec_reg, + p->vars[insn->dest_args[0]].alloc, FALSE); +} + +#ifndef MMX +static void +sse_rule_mulhsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,3,0,1), dest, tmp); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,3,0,1), src, tmp2); + orc_sse_emit_pmuldq (p, src, dest); + orc_sse_emit_pmuldq (p, tmp, tmp2); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,3,1), dest, dest); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,3,1), tmp2, tmp2); + orc_sse_emit_punpckldq (p, tmp2, dest); +} +#endif + +static void +sse_rule_mulhsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int i; + int regsize = p->is_64bit ? 8 : 4; + int offset = ORC_STRUCT_OFFSET(OrcExecutor,arrays[ORC_VAR_T1]); + + orc_x86_emit_mov_sse_memoffset (p, 16, p->vars[insn->src_args[0]].alloc, + offset, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_sse_memoffset (p, 16, p->vars[insn->src_args[1]].alloc, + offset + 16, p->exec_reg, FALSE, FALSE); + orc_x86_emit_mov_reg_memoffset (p, regsize, X86_EAX, offset + 32, + p->exec_reg); + orc_x86_emit_mov_reg_memoffset (p, regsize, X86_EDX, offset + 40, + p->exec_reg); + + for(i=0;i<(1<insn_shift);i++) { + orc_x86_emit_mov_memoffset_reg (p, 4, offset + 4*i, p->exec_reg, X86_EAX); + ORC_ASM_CODE(p," imull %d(%%%s)\n", offset + 16 + 4*i, + orc_x86_get_regname_ptr(p, p->exec_reg)); + orc_x86_emit_rex(p, 4, 0, 0, p->exec_reg); + *p->codeptr++ = 0xf7; + orc_x86_emit_modrm_memoffset (p, 5, offset + 16 + 4*i, p->exec_reg); + orc_x86_emit_mov_reg_memoffset (p, 4, X86_EDX, offset + 4*i, p->exec_reg); + } + + orc_x86_emit_mov_memoffset_sse (p, 16, offset, p->exec_reg, + p->vars[insn->dest_args[0]].alloc, FALSE); + orc_x86_emit_mov_memoffset_reg (p, 8, offset + 32, p->exec_reg, X86_EAX); + orc_x86_emit_mov_memoffset_reg (p, 8, offset + 40, p->exec_reg, X86_EDX); +} + +#ifndef MMX +static void +sse_rule_mulhul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,3,0,1), dest, tmp); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,3,0,1), src, tmp2); + orc_sse_emit_pmuludq (p, src, dest); + orc_sse_emit_pmuludq (p, tmp, tmp2); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,3,1), dest, dest); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,3,1), tmp2, tmp2); + orc_sse_emit_punpckldq (p, tmp2, dest); +} +#endif + +static void +sse_rule_mulslq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_punpckldq (p, dest, dest); + orc_sse_emit_punpckldq (p, tmp, tmp); + orc_sse_emit_pmuldq (p, tmp, dest); +} + +#ifndef MMX +static void +sse_rule_mululq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_punpckldq (p, dest, dest); + orc_sse_emit_punpckldq (p, tmp, tmp); + orc_sse_emit_pmuludq (p, tmp, dest); +} +#endif + +static void +sse_rule_select0lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + /* same as convlw */ + + orc_sse_emit_pslld (p, 16, dest); + orc_sse_emit_psrad (p, 16, dest); + orc_sse_emit_packssdw (p, dest, dest); +} + +static void +sse_rule_select1lw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + + orc_sse_emit_psrad (p, 16, dest); + orc_sse_emit_packssdw (p, dest, dest); +} + +static void +sse_rule_select0ql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* same as convql */ +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,2,0), src, dest); +#else + orc_sse_emit_movdqa (p, src, dest); +#endif +} + +static void +sse_rule_select1ql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_psrlq (p, 32, dest); +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,2,0), src, dest); +#else + orc_sse_emit_movdqa (p, src, dest); +#endif +} + +static void +sse_rule_select0wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + /* same as convwb */ + + orc_sse_emit_psllw (p, 8, dest); + orc_sse_emit_psraw (p, 8, dest); + orc_sse_emit_packsswb (p, dest, dest); +} + +static void +sse_rule_select1wb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + //int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + /* FIXME slow */ + + orc_sse_emit_psraw (p, 8, dest); + orc_sse_emit_packsswb (p, dest, dest); +} + +static void +sse_rule_splitql (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,0,2,0), src, dest2); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(3,1,3,1), src, dest1); +#else + orc_sse_emit_movdqa (p, src, dest2); + orc_sse_emit_pshufw (p, ORC_SSE_SHUF(3,2,3,2), src, dest1); +#endif +} + +static void +sse_rule_splitlw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + + /* FIXME slow */ + + orc_sse_emit_psrad (p, 16, dest1); + orc_sse_emit_packssdw (p, dest1, dest1); + + if (dest2 != src) { + orc_sse_emit_movdqa (p, src, dest2); + } + orc_sse_emit_pslld (p, 16, dest2); + orc_sse_emit_psrad (p, 16, dest2); + orc_sse_emit_packssdw (p, dest2, dest2); + +} + +static void +sse_rule_splitwb (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest1 = p->vars[insn->dest_args[0]].alloc; + int dest2 = p->vars[insn->dest_args[1]].alloc; + int tmp = orc_compiler_get_constant (p, 2, 0xff); + + /* FIXME slow */ + + orc_sse_emit_psraw (p, 8, dest1); + orc_sse_emit_packsswb (p, dest1, dest1); + + if (dest2 != src) { + orc_sse_emit_movdqa (p, src, dest2); + } + +#if 0 + orc_sse_emit_psllw (p, 8, dest2); + orc_sse_emit_psraw (p, 8, dest2); + orc_sse_emit_packsswb (p, dest2, dest2); +#else + orc_sse_emit_pand (p, tmp, dest2); + orc_sse_emit_packuswb (p, dest2, dest2); +#endif +} + +static void +sse_rule_mergebw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklbw (p, src, dest); +} + +static void +sse_rule_mergewl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpcklwd (p, src, dest); +} + +static void +sse_rule_mergelq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + + orc_sse_emit_punpckldq (p, src, dest); +} + +static void +sse_rule_swapw (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_swapl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pslld (p, 16, tmp); + orc_sse_emit_psrld (p, 16, dest); + orc_sse_emit_por (p, tmp, dest); + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_swapwl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pslld (p, 16, tmp); + orc_sse_emit_psrld (p, 16, dest); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_swapq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_psllq (p, 32, tmp); + orc_sse_emit_psrlq (p, 32, dest); + orc_sse_emit_por (p, tmp, dest); + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pslld (p, 16, tmp); + orc_sse_emit_psrld (p, 16, dest); + orc_sse_emit_por (p, tmp, dest); + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_psllw (p, 8, tmp); + orc_sse_emit_psrlw (p, 8, dest); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_swaplq (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + +#ifndef MMX + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(2,3,0,1), dest, dest); +#else + orc_mmx_emit_pshufw (p, ORC_MMX_SHUF(1,0,3,2), dest, dest); +#endif +} + +#ifndef MMX +static void +sse_rule_swapw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x02030001, 0x06070405, 0x0a0b0809, 0x0e0f0c0d); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_swapw (p, user, insn); + } +} + +static void +sse_rule_swapl_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e0f); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_swapl (p, user, insn); + } +} + +static void +sse_rule_swapwl_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x01000302, 0x05040706, 0x09080b0a, 0x0d0c0f0e); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_swapl (p, user, insn); + } +} + +static void +sse_rule_swapq_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x04050607, 0x00010203, 0x0c0d0e0f, 0x08090a0b); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_swapq (p, user, insn); + } +} + +static void +sse_rule_select0lw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x05040100, 0x0d0c0908, 0x05040100, 0x0d0c0908); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_select0lw (p, user, insn); + } +} + +static void +sse_rule_select1lw_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x07060302, 0x0f0e0b0a, 0x07060302, 0x0f0e0b0a); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_select1lw (p, user, insn); + } +} + +static void +sse_rule_select0wb_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x06040200, 0x0e0c0a08, 0x06040200, 0x0e0c0a08); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_select0wb (p, user, insn); + } +} + +static void +sse_rule_select1wb_ssse3 (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_try_get_constant_long (p, + 0x07050301, 0x0f0d0b09, 0x07050301, 0x0f0d0b09); + if (tmp != ORC_REG_INVALID) { + orc_sse_emit_pshufb (p, tmp, dest); + } else { + sse_rule_select1wb (p, user, insn); + } +} +#endif + +/* slow rules */ + +static void +sse_rule_maxuw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); + orc_sse_emit_pmaxsw (p, src, dest); + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); +} + +static void +sse_rule_minuw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); + orc_sse_emit_pminsw (p, src, dest); + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); +} + +static void +sse_rule_avgsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 1, 0x80); + + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); + orc_sse_emit_pavgb (p, src, dest); + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); +} + +static void +sse_rule_avgsw_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp; + + tmp = orc_compiler_get_constant (p, 2, 0x8000); + + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); + orc_sse_emit_pavgw (p, src, dest); + orc_sse_emit_pxor(p, tmp, src); + orc_sse_emit_pxor(p, tmp, dest); +} + +static void +sse_rule_maxsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pcmpgtb (p, src, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_minsb_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pcmpgtb (p, dest, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_maxsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pcmpgtd (p, src, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_minsl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pcmpgtd (p, dest, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_maxul_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 4, 0x80000000); + orc_sse_emit_pxor(p, tmpc, src); + orc_sse_emit_pxor(p, tmpc, dest); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pcmpgtd (p, src, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); + + orc_sse_emit_pxor(p, tmpc, src); + orc_sse_emit_pxor(p, tmpc, dest); +} + +static void +sse_rule_minul_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmpc; + + tmpc = orc_compiler_get_constant (p, 4, 0x80000000); + orc_sse_emit_pxor(p, tmpc, src); + orc_sse_emit_pxor(p, tmpc, dest); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pcmpgtd (p, dest, tmp); + orc_sse_emit_pand (p, tmp, dest); + orc_sse_emit_pandn (p, src, tmp); + orc_sse_emit_por (p, tmp, dest); + + orc_sse_emit_pxor(p, tmpc, src); + orc_sse_emit_pxor(p, tmpc, dest); +} + +static void +sse_rule_avgsl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* (a+b+1) >> 1 = (a|b) - ((a^b)>>1) */ + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pxor(p, src, tmp); + orc_sse_emit_psrad(p, 1, tmp); + + orc_sse_emit_por(p, src, dest); + orc_sse_emit_psubd(p, tmp, dest); +} + +static void +sse_rule_avgul (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + + /* (a+b+1) >> 1 = (a|b) - ((a^b)>>1) */ + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_pxor(p, src, tmp); + orc_sse_emit_psrld(p, 1, tmp); + + orc_sse_emit_por(p, src, dest); + orc_sse_emit_psubd(p, tmp, dest); +} + +static void +sse_rule_addssl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); +#if 0 + int tmp2 = orc_compiler_get_temp_reg (p); + int tmp3 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pand (p, dest, tmp); + + orc_sse_emit_movdqa (p, src, tmp2); + orc_sse_emit_pxor (p, dest, tmp2); + orc_sse_emit_psrad (p, 1, tmp2); + orc_sse_emit_paddd (p, tmp2, tmp); + + orc_sse_emit_psrad (p, 30, tmp); + orc_sse_emit_pslld (p, 30, tmp); + orc_sse_emit_movdqa (p, tmp, tmp2); + orc_sse_emit_pslld (p, 1, tmp2); + orc_sse_emit_movdqa (p, tmp, tmp3); + orc_sse_emit_pxor (p, tmp2, tmp3); + orc_sse_emit_psrad (p, 31, tmp3); + + orc_sse_emit_psrad (p, 31, tmp2); + tmp = orc_compiler_get_constant (p, 4, 0x80000000); + orc_sse_emit_pxor (p, tmp, tmp2); // clamped value + orc_sse_emit_pand (p, tmp3, tmp2); + + orc_sse_emit_paddd (p, src, dest); + orc_sse_emit_pandn (p, dest, tmp3); // tmp is mask: ~0 is for clamping + orc_sse_emit_movdqa (p, tmp3, dest); + + orc_sse_emit_por (p, tmp2, dest); +#endif + + int s = orc_compiler_get_temp_reg (p); + int t = orc_compiler_get_temp_reg (p); + + /* + From Tim Terriberry: (slightly faster than above) + + m=0xFFFFFFFF; + s=_a; + t=_a; + s^=_b; + _a+=_b; + t^=_a; + t^=m; + m>>=1; + s|=t; + t=_b; + s>>=31; + t>>=31; + _a&=s; + t^=m; + s=~s&t; + _a|=s; + */ + + orc_sse_emit_movdqa (p, dest, s); + orc_sse_emit_movdqa (p, dest, t); + orc_sse_emit_pxor (p, src, s); + orc_sse_emit_paddd (p, src, dest); + orc_sse_emit_pxor (p, dest, t); + tmp = orc_compiler_get_constant (p, 4, 0xffffffff); + orc_sse_emit_pxor (p, tmp, t); + orc_sse_emit_por (p, t, s); + orc_sse_emit_movdqa (p, src, t); + orc_sse_emit_psrad (p, 31, s); + orc_sse_emit_psrad (p, 31, t); + orc_sse_emit_pand (p, s, dest); + tmp = orc_compiler_get_constant (p, 4, 0x7fffffff); + orc_sse_emit_pxor (p, tmp, t); + orc_sse_emit_pandn (p, t, s); + orc_sse_emit_por (p, s, dest); +} + +static void +sse_rule_subssl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + int tmp3 = orc_compiler_get_temp_reg (p); + + tmp = orc_compiler_get_temp_constant (p, 4, 0xffffffff); + orc_sse_emit_pxor (p, src, tmp); + orc_sse_emit_movdqa (p, tmp, tmp2); + orc_sse_emit_por (p, dest, tmp); + + orc_sse_emit_pxor (p, dest, tmp2); + orc_sse_emit_psrad (p, 1, tmp2); + orc_sse_emit_psubd (p, tmp2, tmp); + + orc_sse_emit_psrad (p, 30, tmp); + orc_sse_emit_pslld (p, 30, tmp); + orc_sse_emit_movdqa (p, tmp, tmp2); + orc_sse_emit_pslld (p, 1, tmp2); + orc_sse_emit_movdqa (p, tmp, tmp3); + orc_sse_emit_pxor (p, tmp2, tmp3); + orc_sse_emit_psrad (p, 31, tmp3); // tmp3 is mask: ~0 is for clamping + + orc_sse_emit_psrad (p, 31, tmp2); + tmp = orc_compiler_get_constant (p, 4, 0x80000000); + orc_sse_emit_pxor (p, tmp, tmp2); // clamped value + orc_sse_emit_pand (p, tmp3, tmp2); + + orc_sse_emit_psubd (p, src, dest); + orc_sse_emit_pandn (p, dest, tmp3); + orc_sse_emit_movdqa (p, tmp3, dest); + + orc_sse_emit_por (p, tmp2, dest); + +} + +static void +sse_rule_addusl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + +#if 0 + /* an alternate version. slower. */ + /* Compute the bit that gets carried from bit 0 to bit 1 */ + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pand (p, dest, tmp); + orc_sse_emit_pslld (p, 31, tmp); + orc_sse_emit_psrld (p, 31, tmp); + + /* Add in (src>>1) */ + orc_sse_emit_movdqa (p, src, tmp2); + orc_sse_emit_psrld (p, 1, tmp2); + orc_sse_emit_paddd (p, tmp2, tmp); + + /* Add in (dest>>1) */ + orc_sse_emit_movdqa (p, dest, tmp2); + orc_sse_emit_psrld (p, 1, tmp2); + orc_sse_emit_paddd (p, tmp2, tmp); + + /* turn overflow bit into mask */ + orc_sse_emit_psrad (p, 31, tmp); + + /* compute the sum, then or over the mask */ + orc_sse_emit_paddd (p, src, dest); + orc_sse_emit_por (p, tmp, dest); +#endif + + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_pand (p, dest, tmp); + + orc_sse_emit_movdqa (p, src, tmp2); + orc_sse_emit_pxor (p, dest, tmp2); + orc_sse_emit_psrld (p, 1, tmp2); + orc_sse_emit_paddd (p, tmp2, tmp); + + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_paddd (p, src, dest); + orc_sse_emit_por (p, tmp, dest); +} + +static void +sse_rule_subusl_slow (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[1]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmp = orc_compiler_get_temp_reg (p); + int tmp2 = orc_compiler_get_temp_reg (p); + + orc_sse_emit_movdqa (p, src, tmp2); + orc_sse_emit_psrld (p, 1, tmp2); + + orc_sse_emit_movdqa (p, dest, tmp); + orc_sse_emit_psrld (p, 1, tmp); + orc_sse_emit_psubd (p, tmp, tmp2); + + /* turn overflow bit into mask */ + orc_sse_emit_psrad (p, 31, tmp2); + + /* compute the difference, then and over the mask */ + orc_sse_emit_psubd (p, src, dest); + orc_sse_emit_pand (p, tmp2, dest); + +} + +#ifndef MMX +/* float ops */ + +#define UNARY_F(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_0f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY_F(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_0f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +BINARY_F(addf, "addps", 0x58) +BINARY_F(subf, "subps", 0x5c) +BINARY_F(mulf, "mulps", 0x59) +BINARY_F(divf, "divps", 0x5e) +UNARY_F(sqrtf, "sqrtps", 0x51) + +#define UNARY_D(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +#define BINARY_D(opcode,insn_name,code) \ +static void \ +sse_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_660f (p, insn_name, code, \ + p->vars[insn->src_args[1]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +BINARY_D(addd, "addpd", 0x58) +BINARY_D(subd, "subpd", 0x5c) +BINARY_D(muld, "mulpd", 0x59) +BINARY_D(divd, "divpd", 0x5e) +UNARY_D(sqrtd, "sqrtpd", 0x51) + +static void +sse_rule_minf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_sse_emit_0f (p, "minps", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_sse_emit_movdqa (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_sse_emit_0f (p, "minps", 0x5d, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_sse_emit_0f (p, "minps", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_sse_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +sse_rule_mind (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_sse_emit_660f (p, "minpd", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_sse_emit_movdqa (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_sse_emit_660f (p, "minpd", 0x5d, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_sse_emit_660f (p, "minpd", 0x5d, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_sse_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +sse_rule_maxf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_sse_emit_0f (p, "maxps", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_sse_emit_movdqa (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_sse_emit_0f (p, "maxps", 0x5f, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_sse_emit_0f (p, "maxps", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_sse_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +sse_rule_maxd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + if (p->target_flags & ORC_TARGET_FAST_NAN) { + orc_sse_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + } else { + int tmp = orc_compiler_get_temp_reg (p); + orc_sse_emit_movdqa (p, + p->vars[insn->src_args[1]].alloc, + tmp); + orc_sse_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->dest_args[0]].alloc, + tmp); + orc_sse_emit_660f (p, "maxpd", 0x5f, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + orc_sse_emit_por (p, + tmp, + p->vars[insn->dest_args[0]].alloc); + } +} + +static void +sse_rule_cmpeqf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_0f (p, "cmpeqps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x00; +} + +static void +sse_rule_cmpeqd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_660f (p, "cmpeqpd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x00; +} + + +static void +sse_rule_cmpltf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_0f (p, "cmpltps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x01; +} + +static void +sse_rule_cmpltd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_660f (p, "cmpltpd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x01; +} + + +static void +sse_rule_cmplef (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_0f (p, "cmpleps", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x02; +} + +static void +sse_rule_cmpled (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_660f (p, "cmplepd", 0xc2, + p->vars[insn->src_args[1]].alloc, + p->vars[insn->dest_args[0]].alloc); + *p->codeptr++ = 0x02; +} + + +static void +sse_rule_convfl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmpc; + int tmp = orc_compiler_get_temp_reg (p); + + tmpc = orc_compiler_get_temp_constant (p, 4, 0x80000000); + orc_sse_emit_movdqa (p, src, tmp); + orc_sse_emit_f30f (p, "cvttps2dq", 0x5b, src, dest); + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_pcmpeqd (p, dest, tmpc); + orc_sse_emit_pandn (p, tmpc, tmp); + orc_sse_emit_paddd (p, tmp, dest); + +} + +static void +sse_rule_convdl (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + int src = p->vars[insn->src_args[0]].alloc; + int dest = p->vars[insn->dest_args[0]].alloc; + int tmpc; + int tmp = orc_compiler_get_temp_reg (p); + + tmpc = orc_compiler_get_temp_constant (p, 4, 0x80000000); + orc_sse_emit_pshufd (p, ORC_SSE_SHUF(3,1,3,1), src, tmp); + orc_sse_emit_660f (p, "cvttpd2dq", 0xe6, src, dest); + orc_sse_emit_psrad (p, 31, tmp); + orc_sse_emit_pcmpeqd (p, dest, tmpc); + orc_sse_emit_pandn (p, tmpc, tmp); + orc_sse_emit_paddd (p, tmp, dest); +} + +static void +sse_rule_convlf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_0f (p, "cvtdq2ps", 0x5b, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +sse_rule_convld (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_f30f (p, "cvtdq2pd", 0xe6, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +sse_rule_convfd (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_0f (p, "cvtps2pd", 0x5a, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} + +static void +sse_rule_convdf (OrcCompiler *p, void *user, OrcInstruction *insn) +{ + orc_sse_emit_660f (p, "cvtpd2ps", 0x5a, + p->vars[insn->src_args[0]].alloc, + p->vars[insn->dest_args[0]].alloc); +} +#endif + +#define UNARY_SSE41(opcode,insn_name) \ +static void \ +sse_rule_ ## opcode ## _sse41 (OrcCompiler *p, void *user, OrcInstruction *insn) \ +{ \ + orc_sse_emit_ ## insn_name (p, \ + p->vars[insn->src_args[0]].alloc, \ + p->vars[insn->dest_args[0]].alloc); \ +} + +UNARY_SSE41(convsbw,pmovsxbw); +UNARY_SSE41(convswl,pmovsxwd); +UNARY_SSE41(convslq,pmovsxdq); +UNARY_SSE41(convubw,pmovzxbw); +UNARY_SSE41(convuwl,pmovzxwd); +UNARY_SSE41(convulq,pmovzxdq); + + +void +orc_compiler_sse_register_rules (OrcTarget *target) +{ + OrcRuleSet *rule_set; + +#define REG(x) \ + orc_rule_register (rule_set, #x , sse_rule_ ## x, NULL) + + /* SSE 2 */ +#ifndef MMX + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_SSE_SSE2); +#else + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_MMX_MMX); +#endif + + orc_rule_register (rule_set, "loadb", sse_rule_loadX, NULL); + orc_rule_register (rule_set, "loadw", sse_rule_loadX, NULL); + orc_rule_register (rule_set, "loadl", sse_rule_loadX, NULL); + orc_rule_register (rule_set, "loadq", sse_rule_loadX, NULL); + orc_rule_register (rule_set, "loadoffb", sse_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffw", sse_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadoffl", sse_rule_loadoffX, NULL); + orc_rule_register (rule_set, "loadupdb", sse_rule_loadupdb, NULL); + orc_rule_register (rule_set, "loadupib", sse_rule_loadupib, NULL); + orc_rule_register (rule_set, "loadpb", sse_rule_loadpX, (void *)1); + orc_rule_register (rule_set, "loadpw", sse_rule_loadpX, (void *)2); + orc_rule_register (rule_set, "loadpl", sse_rule_loadpX, (void *)4); + orc_rule_register (rule_set, "loadpq", sse_rule_loadpX, (void *)8); + orc_rule_register (rule_set, "ldresnearl", sse_rule_ldresnearl, NULL); + orc_rule_register (rule_set, "ldreslinl", sse_rule_ldreslinl, NULL); + + orc_rule_register (rule_set, "storeb", sse_rule_storeX, NULL); + orc_rule_register (rule_set, "storew", sse_rule_storeX, NULL); + orc_rule_register (rule_set, "storel", sse_rule_storeX, NULL); + orc_rule_register (rule_set, "storeq", sse_rule_storeX, NULL); + + REG(addb); + REG(addssb); + REG(addusb); + REG(andb); + REG(andnb); + REG(avgub); + REG(cmpeqb); + REG(cmpgtsb); + REG(maxub); + REG(minub); + REG(orb); + REG(subb); + REG(subssb); + REG(subusb); + REG(xorb); + + REG(addw); + REG(addssw); + REG(addusw); + REG(andw); + REG(andnw); + REG(avguw); + REG(cmpeqw); + REG(cmpgtsw); + REG(maxsw); + REG(minsw); + REG(mullw); + REG(mulhsw); + REG(mulhuw); + REG(orw); + REG(subw); + REG(subssw); + REG(subusw); + REG(xorw); + + REG(addl); + REG(andl); + REG(andnl); + REG(cmpeql); + REG(cmpgtsl); + REG(orl); + REG(subl); + REG(xorl); + + REG(andq); + REG(andnq); + REG(orq); + REG(xorq); + + REG(select0ql); + REG(select1ql); + REG(select0lw); + REG(select1lw); + REG(select0wb); + REG(select1wb); + REG(mergebw); + REG(mergewl); + REG(mergelq); + + orc_rule_register (rule_set, "copyb", sse_rule_copyx, NULL); + orc_rule_register (rule_set, "copyw", sse_rule_copyx, NULL); + orc_rule_register (rule_set, "copyl", sse_rule_copyx, NULL); + orc_rule_register (rule_set, "copyq", sse_rule_copyx, NULL); + + orc_rule_register (rule_set, "shlw", sse_rule_shift, (void *)0); + orc_rule_register (rule_set, "shruw", sse_rule_shift, (void *)1); + orc_rule_register (rule_set, "shrsw", sse_rule_shift, (void *)2); + orc_rule_register (rule_set, "shll", sse_rule_shift, (void *)3); + orc_rule_register (rule_set, "shrul", sse_rule_shift, (void *)4); + orc_rule_register (rule_set, "shrsl", sse_rule_shift, (void *)5); + orc_rule_register (rule_set, "shlq", sse_rule_shift, (void *)6); + orc_rule_register (rule_set, "shruq", sse_rule_shift, (void *)7); + orc_rule_register (rule_set, "shrsq", sse_rule_shrsq, NULL); + + orc_rule_register (rule_set, "convsbw", sse_rule_convsbw, NULL); + orc_rule_register (rule_set, "convubw", sse_rule_convubw, NULL); + orc_rule_register (rule_set, "convssswb", sse_rule_convssswb, NULL); + orc_rule_register (rule_set, "convsuswb", sse_rule_convsuswb, NULL); + orc_rule_register (rule_set, "convuuswb", sse_rule_convuuswb, NULL); + orc_rule_register (rule_set, "convwb", sse_rule_convwb, NULL); + + orc_rule_register (rule_set, "convswl", sse_rule_convswl, NULL); + orc_rule_register (rule_set, "convuwl", sse_rule_convuwl, NULL); + orc_rule_register (rule_set, "convssslw", sse_rule_convssslw, NULL); + + orc_rule_register (rule_set, "convql", sse_rule_convql, NULL); + orc_rule_register (rule_set, "convslq", sse_rule_convslq, NULL); + orc_rule_register (rule_set, "convulq", sse_rule_convulq, NULL); + //orc_rule_register (rule_set, "convsssql", sse_rule_convsssql, NULL); + + orc_rule_register (rule_set, "mulsbw", sse_rule_mulsbw, NULL); + orc_rule_register (rule_set, "mulubw", sse_rule_mulubw, NULL); + orc_rule_register (rule_set, "mulswl", sse_rule_mulswl, NULL); + orc_rule_register (rule_set, "muluwl", sse_rule_muluwl, NULL); + + orc_rule_register (rule_set, "accw", sse_rule_accw, NULL); + orc_rule_register (rule_set, "accl", sse_rule_accl, NULL); + orc_rule_register (rule_set, "accsadubl", sse_rule_accsadubl, NULL); + +#ifndef MMX + /* These require the SSE2 flag, although could be used with MMX. + That flag is not yet handled. */ + orc_rule_register (rule_set, "mululq", sse_rule_mululq, NULL); + REG(addq); + REG(subq); + + orc_rule_register (rule_set, "addf", sse_rule_addf, NULL); + orc_rule_register (rule_set, "subf", sse_rule_subf, NULL); + orc_rule_register (rule_set, "mulf", sse_rule_mulf, NULL); + orc_rule_register (rule_set, "divf", sse_rule_divf, NULL); + orc_rule_register (rule_set, "minf", sse_rule_minf, NULL); + orc_rule_register (rule_set, "maxf", sse_rule_maxf, NULL); + orc_rule_register (rule_set, "sqrtf", sse_rule_sqrtf, NULL); + orc_rule_register (rule_set, "cmpeqf", sse_rule_cmpeqf, NULL); + orc_rule_register (rule_set, "cmpltf", sse_rule_cmpltf, NULL); + orc_rule_register (rule_set, "cmplef", sse_rule_cmplef, NULL); + orc_rule_register (rule_set, "convfl", sse_rule_convfl, NULL); + orc_rule_register (rule_set, "convlf", sse_rule_convlf, NULL); + + orc_rule_register (rule_set, "addd", sse_rule_addd, NULL); + orc_rule_register (rule_set, "subd", sse_rule_subd, NULL); + orc_rule_register (rule_set, "muld", sse_rule_muld, NULL); + orc_rule_register (rule_set, "divd", sse_rule_divd, NULL); + orc_rule_register (rule_set, "mind", sse_rule_mind, NULL); + orc_rule_register (rule_set, "maxd", sse_rule_maxd, NULL); + orc_rule_register (rule_set, "sqrtd", sse_rule_sqrtd, NULL); + orc_rule_register (rule_set, "cmpeqd", sse_rule_cmpeqd, NULL); + orc_rule_register (rule_set, "cmpltd", sse_rule_cmpltd, NULL); + orc_rule_register (rule_set, "cmpled", sse_rule_cmpled, NULL); + orc_rule_register (rule_set, "convdl", sse_rule_convdl, NULL); + orc_rule_register (rule_set, "convld", sse_rule_convld, NULL); + + orc_rule_register (rule_set, "convfd", sse_rule_convfd, NULL); + orc_rule_register (rule_set, "convdf", sse_rule_convdf, NULL); +#endif + + /* slow rules */ + orc_rule_register (rule_set, "maxuw", sse_rule_maxuw_slow, NULL); + orc_rule_register (rule_set, "minuw", sse_rule_minuw_slow, NULL); + orc_rule_register (rule_set, "avgsb", sse_rule_avgsb_slow, NULL); + orc_rule_register (rule_set, "avgsw", sse_rule_avgsw_slow, NULL); + orc_rule_register (rule_set, "maxsb", sse_rule_maxsb_slow, NULL); + orc_rule_register (rule_set, "minsb", sse_rule_minsb_slow, NULL); + orc_rule_register (rule_set, "maxsl", sse_rule_maxsl_slow, NULL); + orc_rule_register (rule_set, "minsl", sse_rule_minsl_slow, NULL); + orc_rule_register (rule_set, "maxul", sse_rule_maxul_slow, NULL); + orc_rule_register (rule_set, "minul", sse_rule_minul_slow, NULL); + orc_rule_register (rule_set, "convlw", sse_rule_convlw, NULL); + orc_rule_register (rule_set, "signw", sse_rule_signw_slow, NULL); + orc_rule_register (rule_set, "absb", sse_rule_absb_slow, NULL); + orc_rule_register (rule_set, "absw", sse_rule_absw_slow, NULL); + orc_rule_register (rule_set, "absl", sse_rule_absl_slow, NULL); + orc_rule_register (rule_set, "swapw", sse_rule_swapw, NULL); + orc_rule_register (rule_set, "swapl", sse_rule_swapl, NULL); + orc_rule_register (rule_set, "swapwl", sse_rule_swapwl, NULL); + orc_rule_register (rule_set, "swapq", sse_rule_swapq, NULL); + orc_rule_register (rule_set, "swaplq", sse_rule_swaplq, NULL); + orc_rule_register (rule_set, "splitql", sse_rule_splitql, NULL); + orc_rule_register (rule_set, "splitlw", sse_rule_splitlw, NULL); + orc_rule_register (rule_set, "splitwb", sse_rule_splitwb, NULL); + orc_rule_register (rule_set, "avgsl", sse_rule_avgsl, NULL); + orc_rule_register (rule_set, "avgul", sse_rule_avgul, NULL); + orc_rule_register (rule_set, "shlb", sse_rule_shlb, NULL); + orc_rule_register (rule_set, "shrsb", sse_rule_shrsb, NULL); + orc_rule_register (rule_set, "shrub", sse_rule_shrub, NULL); + orc_rule_register (rule_set, "mulll", sse_rule_mulll_slow, NULL); + orc_rule_register (rule_set, "mulhsl", sse_rule_mulhsl_slow, NULL); +#ifndef MMX + orc_rule_register (rule_set, "mulhul", sse_rule_mulhul, NULL); +#endif + orc_rule_register (rule_set, "mullb", sse_rule_mullb, NULL); + orc_rule_register (rule_set, "mulhsb", sse_rule_mulhsb, NULL); + orc_rule_register (rule_set, "mulhub", sse_rule_mulhub, NULL); + orc_rule_register (rule_set, "addssl", sse_rule_addssl_slow, NULL); + orc_rule_register (rule_set, "subssl", sse_rule_subssl_slow, NULL); + orc_rule_register (rule_set, "addusl", sse_rule_addusl_slow, NULL); + orc_rule_register (rule_set, "subusl", sse_rule_subusl_slow, NULL); + orc_rule_register (rule_set, "convhwb", sse_rule_convhwb, NULL); + orc_rule_register (rule_set, "convhlw", sse_rule_convhlw, NULL); + orc_rule_register (rule_set, "splatw3q", sse_rule_splatw3q, NULL); + orc_rule_register (rule_set, "splatbw", sse_rule_splatbw, NULL); + orc_rule_register (rule_set, "splatbl", sse_rule_splatbl, NULL); + orc_rule_register (rule_set, "div255w", sse_rule_div255w, NULL); + orc_rule_register (rule_set, "divluw", sse_rule_divluw, NULL); + + /* SSE 3 -- no rules */ + + /* SSSE 3 */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_SSE_SSSE3); + + orc_rule_register (rule_set, "signb", sse_rule_signX_ssse3, (void *)0); + orc_rule_register (rule_set, "signw", sse_rule_signX_ssse3, (void *)1); + orc_rule_register (rule_set, "signl", sse_rule_signX_ssse3, (void *)2); + REG(absb); + REG(absw); + REG(absl); +#ifndef MMX + orc_rule_register (rule_set, "swapw", sse_rule_swapw_ssse3, NULL); + orc_rule_register (rule_set, "swapl", sse_rule_swapl_ssse3, NULL); + orc_rule_register (rule_set, "swapwl", sse_rule_swapwl_ssse3, NULL); + orc_rule_register (rule_set, "swapq", sse_rule_swapq_ssse3, NULL); + orc_rule_register (rule_set, "select0lw", sse_rule_select0lw_ssse3, NULL); + orc_rule_register (rule_set, "select1lw", sse_rule_select1lw_ssse3, NULL); + orc_rule_register (rule_set, "select0wb", sse_rule_select0wb_ssse3, NULL); + orc_rule_register (rule_set, "select1wb", sse_rule_select1wb_ssse3, NULL); +#endif + + /* SSE 4.1 */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_SSE_SSE4_1); + + REG(maxsb); + REG(minsb); + REG(maxuw); + REG(minuw); + REG(maxsl); + REG(maxul); + REG(minsl); + REG(minul); + REG(mulll); + orc_rule_register (rule_set, "convsbw", sse_rule_convsbw_sse41, NULL); + orc_rule_register (rule_set, "convswl", sse_rule_convswl_sse41, NULL); + orc_rule_register (rule_set, "convslq", sse_rule_convslq_sse41, NULL); + orc_rule_register (rule_set, "convubw", sse_rule_convubw_sse41, NULL); + orc_rule_register (rule_set, "convuwl", sse_rule_convuwl_sse41, NULL); + orc_rule_register (rule_set, "convulq", sse_rule_convulq_sse41, NULL); + orc_rule_register (rule_set, "convsuslw", sse_rule_convsuslw, NULL); + orc_rule_register (rule_set, "mulslq", sse_rule_mulslq, NULL); +#ifndef MMX + orc_rule_register (rule_set, "mulhsl", sse_rule_mulhsl, NULL); +#endif + REG(cmpeqq); + + /* SSE 4.2 -- no rules */ + rule_set = orc_rule_set_new (orc_opcode_set_get("sys"), target, + ORC_TARGET_SSE_SSE4_2); + + REG(cmpgtsq); + + /* SSE 4a -- no rules */ +} + diff --git a/orc/orcsse.c b/orc/orcsse.c new file mode 100644 index 0000000..6e932e4 --- /dev/null +++ b/orc/orcsse.c @@ -0,0 +1,458 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include + +/** + * SECTION:orcsse + * @title: SSE + * @short_description: code generation for SSE + */ + + +const char * +orc_x86_get_regname_sse(int i) +{ + static const char *x86_regs[] = { + "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", + "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" + }; + + if (i>=X86_XMM0 && icodeptr++ = 0xf2; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_sse_emit_f30f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0xf3; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_sse_emit_0f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_sse_emit_660f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest) +{ + ORC_ASM_CODE(p," %s %%%s, %%%s\n", insn_name, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + if (code & 0xff00) { + *p->codeptr++ = code >> 8; + } + *p->codeptr++ = code & 0xff; + orc_x86_emit_modrm_reg (p, src, dest); +} + +void +orc_sse_emit_pshufd (OrcCompiler *p, int shuf, int src, int dest) +{ + ORC_ASM_CODE(p," pshufd $0x%04x, %%%s, %%%s\n", shuf, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x70; + orc_x86_emit_modrm_reg (p, src, dest); + *p->codeptr++ = shuf; +} + +void +orc_sse_emit_pshufhw (OrcCompiler *p, int shuf, int src, int dest) +{ + ORC_ASM_CODE(p," pshufhw $0x%04x, %%%s, %%%s\n", shuf, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0xf3; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x70; + orc_x86_emit_modrm_reg (p, src, dest); + *p->codeptr++ = shuf; +} + +void +orc_sse_emit_pshuflw (OrcCompiler *p, int shuf, int src, int dest) +{ + ORC_ASM_CODE(p," pshuflw $0x%04x, %%%s, %%%s\n", shuf, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0xf2; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x70; + orc_x86_emit_modrm_reg (p, src, dest); + *p->codeptr++ = shuf; +} + +void +orc_sse_emit_palignr (OrcCompiler *p, int align, int src, int dest) +{ + ORC_ASM_CODE(p," palignr $%d, %%%s, %%%s\n", align, + orc_x86_get_regname_sse(src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x3a; + *p->codeptr++ = 0x0f; + orc_x86_emit_modrm_reg (p, src, dest); + *p->codeptr++ = align; +} + +void +orc_sse_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, + int src, int dest) +{ + ORC_ASM_CODE(p," pinsrw $%d, %d(%%%s), %%%s\n", imm, offset, + orc_x86_get_regname_ptr (p, src), + orc_x86_get_regname_sse(dest)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, dest, 0, src); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0xc4; + orc_x86_emit_modrm_memoffset (p, dest, offset, src); + *p->codeptr++ = imm; + +} + +void +orc_sse_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, + int offset, int dest) +{ + ORC_ASM_CODE(p," pextrw $%d, %%%s, %d(%%%s)\n", imm, + orc_x86_get_regname_sse(src), + offset, orc_x86_get_regname_ptr (p, dest)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, src, 0, dest); + *p->codeptr++ = 0x0f; + *p->codeptr++ = 0x3a; + *p->codeptr++ = 0x15; + orc_x86_emit_modrm_memoffset (p, src, offset, dest); + *p->codeptr++ = imm; +} + +void +orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name, int code, + int modrm_code, int shift, int reg) +{ + ORC_ASM_CODE(p," %s $%d, %%%s\n", insn_name, shift, + orc_x86_get_regname_sse(reg)); + *p->codeptr++ = 0x66; + orc_x86_emit_rex (p, 0, 0, 0, reg); + *p->codeptr++ = 0x0f; + *p->codeptr++ = code; + orc_x86_emit_modrm_reg (p, reg, modrm_code); + *p->codeptr++ = shift; +} + +void +orc_x86_emit_mov_memoffset_sse (OrcCompiler *compiler, int size, int offset, + int reg1, int reg2, int is_aligned) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_sse(reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_sse(reg2)); + *compiler->codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + break; + case 16: + if (is_aligned) { + ORC_ASM_CODE(compiler," movdqa %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_sse(reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + } else { + ORC_ASM_CODE(compiler," movdqu %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_sse(reg2)); + *compiler->codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + } + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + orc_x86_emit_modrm_memoffset (compiler, reg2, offset, reg1); +} + +void +orc_x86_emit_movhps_memoffset_sse (OrcCompiler *compiler, int offset, + int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movhps %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_sse(reg2)); + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x16; + orc_x86_emit_modrm_memoffset (compiler, reg2, offset, reg1); +} + +void +orc_x86_emit_mov_memindex_sse (OrcCompiler *compiler, int size, int offset, + int reg1, int regindex, int shift, int reg2, int is_aligned) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %d(%%%s,%%%s,%d), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %d(%%%s,%%%s,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + break; + case 16: + if (is_aligned) { + ORC_ASM_CODE(compiler," movdqa %d(%%%s,%%%s,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + } else { + ORC_ASM_CODE(compiler," movdqu %d(%%%s,%%%s,%d), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_ptr(compiler, regindex), 1<codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + } + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + orc_x86_emit_modrm_memindex (compiler, reg2, offset, reg1, regindex, shift); +} + +void +orc_x86_emit_mov_sse_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, + int reg2, int aligned, int uncached) +{ + switch (size) { + case 4: + ORC_ASM_CODE(compiler," movd %%%s, %d(%%%s)\n", orc_x86_get_regname_sse(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + break; + case 8: + ORC_ASM_CODE(compiler," movq %%%s, %d(%%%s)\n", orc_x86_get_regname_sse(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xd6; + break; + case 16: + if (aligned) { + if (uncached) { + ORC_ASM_CODE(compiler," movntdq %%%s, %d(%%%s)\n", orc_x86_get_regname_sse(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xe7; + } else { + ORC_ASM_CODE(compiler," movdqa %%%s, %d(%%%s)\n", orc_x86_get_regname_sse(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7f; + } + } else { + ORC_ASM_CODE(compiler," movdqu %%%s, %d(%%%s)\n", orc_x86_get_regname_sse(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0xf3; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7f; + } + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg2); +} + +void orc_x86_emit_mov_sse_reg_reg (OrcCompiler *compiler, int reg1, int reg2) +{ + if (reg1 == reg2) { + return; + } + + ORC_ASM_CODE(compiler," movdqa %%%s, %%%s\n", orc_x86_get_regname_sse(reg1), + orc_x86_get_regname_sse(reg2)); + + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6f; + orc_x86_emit_modrm_reg (compiler, reg1, reg2); +} + +void orc_x86_emit_mov_reg_sse (OrcCompiler *compiler, int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movd %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname_sse(reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x6e; + orc_x86_emit_modrm_reg (compiler, reg1, reg2); +} + +void orc_x86_emit_mov_sse_reg (OrcCompiler *compiler, int reg1, int reg2) +{ + ORC_ASM_CODE(compiler," movd %%%s, %%%s\n", orc_x86_get_regname_sse(reg1), + orc_x86_get_regname(reg2)); + *compiler->codeptr++ = 0x66; + orc_x86_emit_rex(compiler, 0, reg1, 0, reg2); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x7e; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + +void +orc_sse_set_mxcsr (OrcCompiler *compiler) +{ + int value; + + ORC_ASM_CODE(compiler," stmxcsr %d(%%%s)\n", + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), + orc_x86_get_regname_ptr(compiler, compiler->exec_reg)); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xae; + orc_x86_emit_modrm_memoffset (compiler, 3, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg); + + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), + compiler->exec_reg, compiler->gp_tmpreg); + + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_C1]), + compiler->exec_reg); + + value = 0x8040; + ORC_ASM_CODE(compiler," orl $%d, %%%s\n", value, + orc_x86_get_regname(compiler->gp_tmpreg)); + orc_x86_emit_rex(compiler, 4, 0, 0, compiler->gp_tmpreg); + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_reg (compiler, compiler->gp_tmpreg, 1); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + + orc_x86_emit_mov_reg_memoffset (compiler, 4, compiler->gp_tmpreg, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), + compiler->exec_reg); + + ORC_ASM_CODE(compiler," ldmxcsr %d(%%%s)\n", + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), + orc_x86_get_regname_ptr(compiler, compiler->exec_reg)); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xae; + orc_x86_emit_modrm_memoffset (compiler, 2, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg); +} + +void +orc_sse_restore_mxcsr (OrcCompiler *compiler) +{ + ORC_ASM_CODE(compiler," ldmxcsr %d(%%%s)\n", + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_C1]), + orc_x86_get_regname_ptr(compiler, compiler->exec_reg)); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xae; + orc_x86_emit_modrm_memoffset (compiler, 2, + (int)ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_C1]), compiler->exec_reg); +} + diff --git a/orc/orcsse.h b/orc/orcsse.h new file mode 100644 index 0000000..6b58e7f --- /dev/null +++ b/orc/orcsse.h @@ -0,0 +1,221 @@ + +#ifndef _ORC_SSE_H_ +#define _ORC_SSE_H_ + +#include + +typedef enum { + ORC_TARGET_SSE_SSE2 = (1<<0), + ORC_TARGET_SSE_SSE3 = (1<<1), + ORC_TARGET_SSE_SSSE3 = (1<<2), + ORC_TARGET_SSE_SSE4_1 = (1<<3), + ORC_TARGET_SSE_SSE4_2 = (1<<4), + ORC_TARGET_SSE_SSE4A = (1<<5), + ORC_TARGET_SSE_SSE5 = (1<<6), + ORC_TARGET_SSE_FRAME_POINTER = (1<<7), + ORC_TARGET_SSE_SHORT_JUMPS = (1<<8), + ORC_TARGET_SSE_64BIT = (1<<9) +}OrcTargetSSEFlags; + +typedef enum { + X86_XMM0 = ORC_VEC_REG_BASE, + X86_XMM1, + X86_XMM2, + X86_XMM3, + X86_XMM4, + X86_XMM5, + X86_XMM6, + X86_XMM7, + X86_XMM8, + X86_XMM9, + X86_XMM10, + X86_XMM11, + X86_XMM12, + X86_XMM13, + X86_XMM14, + X86_XMM15 +}OrcSSERegister; + +#define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)&3)<<0)) + +const char * orc_x86_get_regname_sse(int i); +void orc_x86_emit_mov_memoffset_sse (OrcCompiler *compiler, int size, int offset, + int reg1, int reg2, int is_aligned); +void orc_x86_emit_movhps_memoffset_sse (OrcCompiler *compiler, int offset, + int reg1, int reg2); +void orc_x86_emit_mov_memindex_sse (OrcCompiler *compiler, int size, int offset, + int reg1, int regindex, int shift, int reg2, int is_aligned); +void orc_x86_emit_mov_sse_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, + int reg2, int aligned, int uncached); +void orc_x86_emit_mov_sse_reg_reg (OrcCompiler *compiler, int reg1, int reg2); +void orc_x86_emit_mov_reg_sse (OrcCompiler *compiler, int reg1, int reg2); +void orc_x86_emit_mov_sse_reg (OrcCompiler *compiler, int reg1, int reg2); +void orc_sse_emit_loadib (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadiw (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadil (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadpb (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadpw (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadpl (OrcCompiler *p, int reg, int value); +void orc_sse_emit_loadpq (OrcCompiler *p, int reg, int value); + +void orc_sse_emit_660f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_sse_emit_f20f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_sse_emit_f30f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_sse_emit_0f (OrcCompiler *p, const char *insn_name, int code, + int src, int dest); +void orc_sse_emit_pshufd (OrcCompiler *p, int shuf, int src, int dest); +void orc_sse_emit_pshuflw (OrcCompiler *p, int shuf, int src, int dest); +void orc_sse_emit_pshufhw (OrcCompiler *p, int shuf, int src, int dest); +void orc_sse_emit_palignr (OrcCompiler *p, int align, int src, int dest); +void orc_sse_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, int src, int dest); +void orc_sse_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, int offset, int dest); +void orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name, + int code, int modrm_code, int shift, int reg); + +void orc_sse_set_mxcsr (OrcCompiler *compiler); +void orc_sse_restore_mxcsr (OrcCompiler *compiler); + +void orc_sse_load_constant (OrcCompiler *compiler, int reg, int size, + orc_uint64 value); + + +unsigned int orc_sse_get_cpu_flags (void); + +/* SSE instructions */ + +/* SSE2 instructions */ +#define orc_sse_emit_punpcklbw(p,a,b) orc_sse_emit_660f (p, "punpcklbw", 0x60, a, b) +#define orc_sse_emit_punpcklwd(p,a,b) orc_sse_emit_660f (p, "punpcklwd", 0x61, a, b) +#define orc_sse_emit_punpckldq(p,a,b) orc_sse_emit_660f (p, "punpckldq", 0x62, a, b) +#define orc_sse_emit_packsswb(p,a,b) orc_sse_emit_660f (p, "packsswb", 0x63, a, b) +#define orc_sse_emit_pcmpgtb(p,a,b) orc_sse_emit_660f (p, "pcmpgtb", 0x64, a, b) +#define orc_sse_emit_pcmpgtw(p,a,b) orc_sse_emit_660f (p, "pcmpgtw", 0x65, a, b) +#define orc_sse_emit_pcmpgtd(p,a,b) orc_sse_emit_660f (p, "pcmpgtd", 0x66, a, b) +#define orc_sse_emit_packuswb(p,a,b) orc_sse_emit_660f (p, "packuswb", 0x67, a, b) +#define orc_sse_emit_punpckhbw(p,a,b) orc_sse_emit_660f (p, "punpckhbw", 0x68, a, b) +#define orc_sse_emit_punpckhwd(p,a,b) orc_sse_emit_660f (p, "punpckhwd", 0x69, a, b) +#define orc_sse_emit_punpckhdq(p,a,b) orc_sse_emit_660f (p, "punpckhdq", 0x6a, a, b) +#define orc_sse_emit_packssdw(p,a,b) orc_sse_emit_660f (p, "packssdw", 0x6b, a, b) +#define orc_sse_emit_punpcklqdq(p,a,b) orc_sse_emit_660f (p, "punpcklqdq", 0x6c, a, b) +#define orc_sse_emit_punpckhqdq(p,a,b) orc_sse_emit_660f (p, "punpckhqdq", 0x6d, a, b) + +#define orc_sse_emit_movdqa(p,a,b) orc_sse_emit_660f (p, "movdqa", 0x6f, a, b) + +#define orc_sse_emit_psraw(p,a,b) orc_sse_emit_shiftimm (p, "psraw", 0x71, 4, a, b) +#define orc_sse_emit_psrlw(p,a,b) orc_sse_emit_shiftimm (p, "psrlw", 0x71, 2, a, b) +#define orc_sse_emit_psllw(p,a,b) orc_sse_emit_shiftimm (p, "psllw", 0x71, 6, a, b) +#define orc_sse_emit_psrad(p,a,b) orc_sse_emit_shiftimm (p, "psrad", 0x72, 4, a, b) +#define orc_sse_emit_psrld(p,a,b) orc_sse_emit_shiftimm (p, "psrld", 0x72, 2, a, b) +#define orc_sse_emit_pslld(p,a,b) orc_sse_emit_shiftimm (p, "pslld", 0x72, 6, a, b) +#define orc_sse_emit_psrlq(p,a,b) orc_sse_emit_shiftimm (p, "psrlq", 0x73, 2, a, b) +#define orc_sse_emit_psllq(p,a,b) orc_sse_emit_shiftimm (p, "psllq", 0x73, 6, a, b) +#define orc_sse_emit_psrldq(p,a,b) orc_sse_emit_shiftimm (p, "psrldq", 0x73, 3, a, b) +#define orc_sse_emit_pslldq(p,a,b) orc_sse_emit_shiftimm (p, "pslldq", 0x73, 7, a, b) + +#define orc_sse_emit_psrlq_reg(p,a,b) orc_sse_emit_660f (p, "psrlq", 0xd3, a, b) + +#define orc_sse_emit_pcmpeqb(p,a,b) orc_sse_emit_660f (p, "pcmpeqb", 0x74, a, b) +#define orc_sse_emit_pcmpeqw(p,a,b) orc_sse_emit_660f (p, "pcmpeqw", 0x75, a, b) +#define orc_sse_emit_pcmpeqd(p,a,b) orc_sse_emit_660f (p, "pcmpeqd", 0x76, a, b) + + +#define orc_sse_emit_paddq(p,a,b) orc_sse_emit_660f (p, "paddq", 0xd4, a, b) +#define orc_sse_emit_pmullw(p,a,b) orc_sse_emit_660f (p, "pmullw", 0xd5, a, b) + +#define orc_sse_emit_psubusb(p,a,b) orc_sse_emit_660f (p, "psubusb", 0xd8, a, b) +#define orc_sse_emit_psubusw(p,a,b) orc_sse_emit_660f (p, "psubusw", 0xd9, a, b) +#define orc_sse_emit_pminub(p,a,b) orc_sse_emit_660f (p, "pminub", 0xda, a, b) +#define orc_sse_emit_pand(p,a,b) orc_sse_emit_660f (p, "pand", 0xdb, a, b) +#define orc_sse_emit_paddusb(p,a,b) orc_sse_emit_660f (p, "paddusb", 0xdc, a, b) +#define orc_sse_emit_paddusw(p,a,b) orc_sse_emit_660f (p, "paddusw", 0xdd, a, b) +#define orc_sse_emit_pmaxub(p,a,b) orc_sse_emit_660f (p, "pmaxub", 0xde, a, b) +#define orc_sse_emit_pandn(p,a,b) orc_sse_emit_660f (p, "pandn", 0xdf, a, b) + +#define orc_sse_emit_pavgb(p,a,b) orc_sse_emit_660f (p, "pavgb", 0xe0, a, b) +#define orc_sse_emit_pavgw(p,a,b) orc_sse_emit_660f (p, "pavgw", 0xe3, a, b) + +#define orc_sse_emit_pmulhuw(p,a,b) orc_sse_emit_660f (p, "pmulhuw", 0xe4, a, b) +#define orc_sse_emit_pmulhw(p,a,b) orc_sse_emit_660f (p, "pmulhw", 0xe5, a, b) + +#define orc_sse_emit_psubsb(p,a,b) orc_sse_emit_660f (p, "psubsb", 0xe8, a, b) +#define orc_sse_emit_psubsw(p,a,b) orc_sse_emit_660f (p, "psubsw", 0xe9, a, b) +#define orc_sse_emit_pminsw(p,a,b) orc_sse_emit_660f (p, "pminsw", 0xea, a, b) +#define orc_sse_emit_por(p,a,b) orc_sse_emit_660f (p, "por", 0xeb, a, b) +#define orc_sse_emit_paddsb(p,a,b) orc_sse_emit_660f (p, "paddsb", 0xec, a, b) +#define orc_sse_emit_paddsw(p,a,b) orc_sse_emit_660f (p, "paddsw", 0xed, a, b) +#define orc_sse_emit_pmaxsw(p,a,b) orc_sse_emit_660f (p, "pmaxsw", 0xee, a, b) +#define orc_sse_emit_pxor(p,a,b) orc_sse_emit_660f (p, "pxor", 0xef, a, b) + +#define orc_sse_emit_pmuludq(p,a,b) orc_sse_emit_660f (p, "pmuludq", 0xf4, a, b) +#define orc_sse_emit_pmaddwd(p,a,b) orc_sse_emit_660f (p, "pmaddwd", 0xf5, a, b) +#define orc_sse_emit_psadbw(p,a,b) orc_sse_emit_660f (p, "psadbw", 0xf6, a, b) + +#define orc_sse_emit_psubb(p,a,b) orc_sse_emit_660f (p, "psubb", 0xf8, a, b) +#define orc_sse_emit_psubw(p,a,b) orc_sse_emit_660f (p, "psubw", 0xf9, a, b) +#define orc_sse_emit_psubd(p,a,b) orc_sse_emit_660f (p, "psubd", 0xfa, a, b) +#define orc_sse_emit_psubq(p,a,b) orc_sse_emit_660f (p, "psubq", 0xfb, a, b) +#define orc_sse_emit_paddb(p,a,b) orc_sse_emit_660f (p, "paddb", 0xfc, a, b) +#define orc_sse_emit_paddw(p,a,b) orc_sse_emit_660f (p, "paddw", 0xfd, a, b) +#define orc_sse_emit_paddd(p,a,b) orc_sse_emit_660f (p, "paddd", 0xfe, a, b) + +/* SSE3 instructions */ + +/* SSSE3 instructions */ +#define orc_sse_emit_pshufb(p,a,b) orc_sse_emit_660f (p, "pshufb", 0x3800, a, b) +#define orc_sse_emit_phaddw(p,a,b) orc_sse_emit_660f (p, "phaddw", 0x3801, a, b) +#define orc_sse_emit_phaddd(p,a,b) orc_sse_emit_660f (p, "phaddd", 0x3802, a, b) +#define orc_sse_emit_phaddsw(p,a,b) orc_sse_emit_660f (p, "phaddsw", 0x3803, a, b) +#define orc_sse_emit_pmaddubsw(p,a,b) orc_sse_emit_660f (p, "pmaddubsw", 0x3804, a, b) +#define orc_sse_emit_phsubw(p,a,b) orc_sse_emit_660f (p, "phsubw", 0x3805, a, b) +#define orc_sse_emit_phsubd(p,a,b) orc_sse_emit_660f (p, "phsubd", 0x3806, a, b) +#define orc_sse_emit_phsubsw(p,a,b) orc_sse_emit_660f (p, "phsubsw", 0x3807, a, b) +#define orc_sse_emit_psignb(p,a,b) orc_sse_emit_660f (p, "psignb", 0x3808, a, b) +#define orc_sse_emit_psignw(p,a,b) orc_sse_emit_660f (p, "psignw", 0x3809, a, b) +#define orc_sse_emit_psignd(p,a,b) orc_sse_emit_660f (p, "psignd", 0x380a, a, b) +#define orc_sse_emit_pmulhrsw(p,a,b) orc_sse_emit_660f (p, "pmulhrsw", 0x380b, a, b) + +#define orc_sse_emit_pabsb(p,a,b) orc_sse_emit_660f (p, "pabsb", 0x381c, a, b) +#define orc_sse_emit_pabsw(p,a,b) orc_sse_emit_660f (p, "pabsw", 0x381d, a, b) +#define orc_sse_emit_pabsd(p,a,b) orc_sse_emit_660f (p, "pabsd", 0x381e, a, b) + + +/* SSE4.1 instructions */ +#define orc_sse_emit_pmovsxbw(p,a,b) orc_sse_emit_660f (p, "pmovsxbw", 0x3820, a, b) +#define orc_sse_emit_pmovsxbd(p,a,b) orc_sse_emit_660f (p, "pmovsxbd", 0x3821, a, b) +#define orc_sse_emit_pmovsxbq(p,a,b) orc_sse_emit_660f (p, "pmovsxbq", 0x3822, a, b) +#define orc_sse_emit_pmovsxwd(p,a,b) orc_sse_emit_660f (p, "pmovsxwd", 0x3823, a, b) +#define orc_sse_emit_pmovsxwq(p,a,b) orc_sse_emit_660f (p, "pmovsxwq", 0x3824, a, b) +#define orc_sse_emit_pmovsxdq(p,a,b) orc_sse_emit_660f (p, "pmovsxdq", 0x3825, a, b) + +#define orc_sse_emit_pmuldq(p,a,b) orc_sse_emit_660f (p, "pmuldq", 0x3828, a, b) +#define orc_sse_emit_pcmpeqq(p,a,b) orc_sse_emit_660f (p, "pcmpeqq", 0x3829, a, b) + +#define orc_sse_emit_packusdw(p,a,b) orc_sse_emit_660f (p, "packusdw", 0x382b, a, b) + +#define orc_sse_emit_pmovzxbw(p,a,b) orc_sse_emit_660f (p, "pmovzxbw", 0x3830, a, b) +#define orc_sse_emit_pmovzxbd(p,a,b) orc_sse_emit_660f (p, "pmovzxbd", 0x3831, a, b) +#define orc_sse_emit_pmovzxbq(p,a,b) orc_sse_emit_660f (p, "pmovzxbq", 0x3832, a, b) +#define orc_sse_emit_pmovzxwd(p,a,b) orc_sse_emit_660f (p, "pmovzxwd", 0x3833, a, b) +#define orc_sse_emit_pmovzxwq(p,a,b) orc_sse_emit_660f (p, "pmovzxwq", 0x3834, a, b) +#define orc_sse_emit_pmovzxdq(p,a,b) orc_sse_emit_660f (p, "pmovzxdq", 0x3835, a, b) + +#define orc_sse_emit_pmulld(p,a,b) orc_sse_emit_660f (p, "pmulld", 0x3840, a, b) +#define orc_sse_emit_phminposuw(p,a,b) orc_sse_emit_660f (p, "phminposuw", 0x3841, a, b) + +#define orc_sse_emit_pminsb(p,a,b) orc_sse_emit_660f (p, "pminsb", 0x3838, a, b) +#define orc_sse_emit_pminsd(p,a,b) orc_sse_emit_660f (p, "pminsd", 0x3839, a, b) +#define orc_sse_emit_pminuw(p,a,b) orc_sse_emit_660f (p, "pminuw", 0x383a, a, b) +#define orc_sse_emit_pminud(p,a,b) orc_sse_emit_660f (p, "pminud", 0x383b, a, b) +#define orc_sse_emit_pmaxsb(p,a,b) orc_sse_emit_660f (p, "pmaxsb", 0x383c, a, b) +#define orc_sse_emit_pmaxsd(p,a,b) orc_sse_emit_660f (p, "pmaxsd", 0x383d, a, b) +#define orc_sse_emit_pmaxuw(p,a,b) orc_sse_emit_660f (p, "pmaxuw", 0x383e, a, b) +#define orc_sse_emit_pmaxud(p,a,b) orc_sse_emit_660f (p, "pmaxud", 0x383f, a, b) + +/* SSE4.2 instructions */ +#define orc_sse_emit_pcmpgtq(p,a,b) orc_sse_emit_660f (p, "pcmpgtq", 0x3837, a, b) + +#endif + diff --git a/orc/orcutils.c b/orc/orcutils.c new file mode 100644 index 0000000..a37129d --- /dev/null +++ b/orc/orcutils.c @@ -0,0 +1,174 @@ +/* + * ORC - Library of Optimized Inner Loops + * Copyright (c) 2003,2004 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include +#include + +#include +#include +#include +#include + +/** + * SECTION:orcutils + * @title: Utility functions + * @short_description: Orc utility functions + */ + +char * +_strndup (const char *s, int n) +{ + char *r; + r = malloc (n+1); + memcpy(r,s,n); + r[n]=0; + + return r; +} + +char ** +strsplit (const char *s, char delimiter) +{ + char **list = NULL; + const char *tok; + int n = 0; + + while (*s == ' ') s++; + + list = malloc (1 * sizeof(char *)); + while (*s) { + tok = s; + while (*s && *s != delimiter) s++; + + list[n] = _strndup (tok, s - tok); + while (*s && *s == delimiter) s++; + list = realloc (list, (n + 2) * sizeof(char *)); + n++; + } + + list[n] = NULL; + return list; +} + +char * +get_tag_value (char *s, const char *tag) +{ + char *flags; + char *end; + char *colon; + + flags = strstr(s,tag); + if (flags == NULL) return NULL; + + end = strchr(flags, '\n'); + if (end == NULL) return NULL; + colon = strchr (flags, ':'); + if (colon == NULL) return NULL; + colon++; + if(colon >= end) return NULL; + + return _strndup (colon, end-colon); +} + +orc_int64 +_strtoll (const char *nptr, char **endptr, int base) +{ + int neg = 0; + orc_int64 val = 0; + + /* Skip all spaces */ + while (isspace (*nptr)) + nptr++; + + if (!*nptr) + return val; + + /* Get sign */ + if (*nptr == '-') { + neg = 1; + nptr++; + } else if (*nptr == '+') { + nptr++; + } + + if (!*nptr) + return val; + + /* Try to detect the base if none was given */ + if (base == 0) { + if (*nptr == '0' && (*(nptr + 1) == 'x' || *(nptr + 1) == 'X')) { + base = 16; + nptr += 2; + } else if (*nptr == '0') { + base = 8; + nptr++; + } else { + base = 10; + } + } else if (base == 16) { + if (*nptr == '0' && (*(nptr + 1) == 'x' || *(nptr + 1) == 'X')) + nptr += 2; + } else if (base == 8) { + if (*nptr == '0') + nptr++; + } + + while (*nptr) { + int c = *nptr; + + if (c >= '0' && c <= '9') + c = c - '0'; + else if (c >= 'a' && c <= 'z') + c = 10 + c - 'a'; + else if (c >= 'A' && c <= 'Z') + c = 10 + c - 'A'; + else + break; + + if (c >= base) + break; + + if ((orc_uint64) val > ORC_UINT64_C(0xffffffffffffffff) / base || + (orc_uint64) (val * base) > ORC_UINT64_C(0xffffffffffffffff) - c) { + val = ORC_UINT64_C(0xffffffffffffffff); + break; + } + + val = val * base + c; + + nptr++; + } + + if (endptr) + *endptr = (char *) nptr; + + return (neg) ? - val : val; +} + diff --git a/orc/orcutils.h b/orc/orcutils.h new file mode 100644 index 0000000..750f80a --- /dev/null +++ b/orc/orcutils.h @@ -0,0 +1,173 @@ +/* + * ORC - Library of Optimized Inner Loops + * Copyright (c) 2007 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ORC_UTILS_H_ +#define _ORC_UTILS_H_ + +#ifndef _ORC_INTEGER_TYPEDEFS_ +#define _ORC_INTEGER_TYPEDEFS_ +#if defined(_x_STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t orc_int8; +typedef int16_t orc_int16; +typedef int32_t orc_int32; +typedef int64_t orc_int64; +typedef uint8_t orc_uint8; +typedef uint16_t orc_uint16; +typedef uint32_t orc_uint32; +typedef uint64_t orc_uint64; +#define ORC_UINT64_C(x) UINT64_C(x) +#elif defined(_MSC_VER) +typedef signed __int8 orc_int8; +typedef signed __int16 orc_int16; +typedef signed __int32 orc_int32; +typedef signed __int64 orc_int64; +typedef unsigned __int8 orc_uint8; +typedef unsigned __int16 orc_uint16; +typedef unsigned __int32 orc_uint32; +typedef unsigned __int64 orc_uint64; +#define ORC_UINT64_C(x) (x##Ui64) +#else +#include +typedef signed char orc_int8; +typedef short orc_int16; +typedef int orc_int32; +typedef unsigned char orc_uint8; +typedef unsigned short orc_uint16; +typedef unsigned int orc_uint32; +#if INT_MAX == LONG_MAX +typedef long long orc_int64; +typedef unsigned long long orc_uint64; +#define ORC_UINT64_C(x) (x##ULL) +#else +typedef long orc_int64; +typedef unsigned long orc_uint64; +#define ORC_UINT64_C(x) (x##UL) +#endif +#endif +typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; +typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; +typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; +#endif + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +typedef unsigned int orc_bool; + +#ifdef ORC_ENABLE_UNSTABLE_API + +#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#ifndef MIN +#define MIN(a,b) ((a)<(b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a)>(b) ? (a) : (b)) +#endif +#ifndef ORC_CLAMP +#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) +#endif +#define ORC_PTR_TO_INT(x) ((int)(long)(x)) +#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) + +#define ORC_READ_UINT32_LE(ptr) \ + ((orc_uint32)( \ + ((orc_uint8 *)(ptr))[0] | \ + (((orc_uint8 *)(ptr))[1]<<8) | \ + (((orc_uint8 *)(ptr))[2]<<16) | \ + (((orc_uint8 *)(ptr))[3]<<24))) + +#define ORC_WRITE_UINT32_LE(ptr,val) \ + do { \ + ((orc_uint8 *)ptr)[0] = ((val)>>0)&0xff; \ + ((orc_uint8 *)ptr)[1] = ((val)>>8)&0xff; \ + ((orc_uint8 *)ptr)[2] = ((val)>>16)&0xff; \ + ((orc_uint8 *)ptr)[3] = ((val)>>24)&0xff; \ + } while(0) + +#endif + +#if defined(__GNUC__) && defined(__GNUC_MINOR__) +#define ORC_GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +#define ORC_GNUC_PREREQ(maj, min) 0 +#endif + +#if ORC_GNUC_PREREQ(3,3) && defined(__ELF__) +#define ORC_INTERNAL __attribute__ ((visibility ("internal"))) +#else +#define ORC_INTERNAL +#endif + +#if ORC_GNUC_PREREQ(3,3) /* guess */ +#define ORC_GNU_PRINTF(a,b) __attribute__((__format__ (__printf__, a, b))) +#else +#define ORC_GNU_PRINTF(a,b) +#endif + +#ifdef __cplusplus +#define ORC_BEGIN_DECLS extern "C" { +#define ORC_END_DECLS } +#else +#define ORC_BEGIN_DECLS +#define ORC_END_DECLS +#endif + +#ifdef _MSC_VER +#ifdef ORC_EXPORTS +#define ORC_EXPORT __declspec(dllexport) extern +#else +#define ORC_EXPORT __declspec(dllimport) extern +#endif +#else /* not _MSC_VER */ +#define ORC_EXPORT extern +#endif + +ORC_BEGIN_DECLS + +#ifdef ORC_ENABLE_UNSTABLE_API + +int get_file_int (const char *file, int *value); +char * get_file (const char *file); +char * get_cpuinfo_line (char *cpuinfo, const char *tag); +char * _strndup (const char *s, int n); +char ** strsplit (const char *s, char delimiter); +char * get_tag_value (char *s, const char *tag); + +orc_int64 _strtoll (const char *nptr, char **endptr, int base); + +#endif + +ORC_END_DECLS + +#endif + diff --git a/orc/orcx86.c b/orc/orcx86.c new file mode 100644 index 0000000..ce6fcf9 --- /dev/null +++ b/orc/orcx86.c @@ -0,0 +1,1149 @@ + +#include "config.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include + + +/** + * SECTION:orcx86 + * @title: x86 + * @short_description: code generation for x86 + */ + +const char * +orc_x86_get_regname(int i) +{ + static const char *x86_regs[] = { + "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", + "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }; + + if (i>=ORC_GP_REG_BASE && i=ORC_GP_REG_BASE && i=ORC_GP_REG_BASE && i=ORC_GP_REG_BASE && iis_64bit) { + return orc_x86_get_regname_64 (i); + } else { + return orc_x86_get_regname (i); + } +} + +void +orc_x86_emit_push (OrcCompiler *compiler, int size, int reg) +{ + + if (size == 1) { + ORC_COMPILER_ERROR(compiler, "bad size"); + } else if (size == 2) { + ORC_ASM_CODE(compiler," pushw %%%s\n", orc_x86_get_regname_16(reg)); + *compiler->codeptr++ = 0x66; + *compiler->codeptr++ = 0x50 + orc_x86_get_regnum(reg); + } else { + ORC_ASM_CODE(compiler," pushl %%%s\n", orc_x86_get_regname(reg)); + *compiler->codeptr++ = 0x50 + orc_x86_get_regnum(reg); + } +} + +void +orc_x86_emit_pop (OrcCompiler *compiler, int size, int reg) +{ + + if (size == 1) { + ORC_COMPILER_ERROR(compiler, "bad size"); + } else if (size == 2) { + ORC_ASM_CODE(compiler," popw %%%s\n", orc_x86_get_regname_16(reg)); + *compiler->codeptr++ = 0x66; + *compiler->codeptr++ = 0x58 + orc_x86_get_regnum(reg); + } else { + ORC_ASM_CODE(compiler," popl %%%s\n", orc_x86_get_regname(reg)); + *compiler->codeptr++ = 0x58 + orc_x86_get_regnum(reg); + } +} + +#define X86_MODRM(mod, rm, reg) ((((mod)&3)<<6)|(((rm)&7)<<0)|(((reg)&7)<<3)) +#define X86_SIB(ss, ind, reg) ((((ss)&3)<<6)|(((ind)&7)<<3)|((reg)&7)) + +void +orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int offset, int reg2) +{ + if (offset == 0 && reg2 != compiler->exec_reg) { + if (reg2 == X86_ESP) { + *compiler->codeptr++ = X86_MODRM(0, 4, reg1); + *compiler->codeptr++ = X86_SIB(0, 4, reg2); + } else { + *compiler->codeptr++ = X86_MODRM(0, reg2, reg1); + } + } else if (offset >= -128 && offset < 128) { + *compiler->codeptr++ = X86_MODRM(1, reg2, reg1); + if (reg2 == X86_ESP) { + *compiler->codeptr++ = X86_SIB(0, 4, reg2); + } + *compiler->codeptr++ = (offset & 0xff); + } else { + *compiler->codeptr++ = X86_MODRM(2, reg2, reg1); + if (reg2 == X86_ESP) { + *compiler->codeptr++ = X86_SIB(0, 4, reg2); + } + *compiler->codeptr++ = (offset & 0xff); + *compiler->codeptr++ = ((offset>>8) & 0xff); + *compiler->codeptr++ = ((offset>>16) & 0xff); + *compiler->codeptr++ = ((offset>>24) & 0xff); + } +} + +void orc_x86_emit_modrm_memindex (OrcCompiler *compiler, int reg1, int offset, + int reg2, int regindex, int shift) +{ + if (offset == 0) { + *compiler->codeptr++ = X86_MODRM(0, 4, reg1); + *compiler->codeptr++ = X86_SIB(shift, regindex, reg2); + } else if (offset >= -128 && offset < 128) { + *compiler->codeptr++ = X86_MODRM(1, 4, reg1); + *compiler->codeptr++ = X86_SIB(shift, regindex, reg2); + *compiler->codeptr++ = (offset & 0xff); + } else { + *compiler->codeptr++ = X86_MODRM(2, 4, reg1); + *compiler->codeptr++ = X86_SIB(shift, regindex, reg2); + *compiler->codeptr++ = (offset & 0xff); + *compiler->codeptr++ = ((offset>>8) & 0xff); + *compiler->codeptr++ = ((offset>>16) & 0xff); + *compiler->codeptr++ = ((offset>>24) & 0xff); + } +} + +void +orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2) +{ + *compiler->codeptr++ = X86_MODRM(3, reg1, reg2); +} + +void +orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2, int reg3) +{ + int rex = 0x40; + + if (compiler->is_64bit) { + if (size >= 8) rex |= 0x08; + if (reg1 & 8) rex |= 0x4; + if (reg2 & 8) rex |= 0x2; + if (reg3 & 8) rex |= 0x1; + + if (rex != 0x40) *compiler->codeptr++ = rex; + } +} + +void +orc_x86_emit_mov_memoffset_reg (OrcCompiler *compiler, int size, int offset, + int reg1, int reg2) +{ + + switch (size) { + case 1: + ORC_ASM_CODE(compiler," movzx %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname(reg2)); + orc_x86_emit_rex(compiler, size, reg2, 0, reg1); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xb6; + orc_x86_emit_modrm_memoffset (compiler, reg2, offset, reg1); + return; + case 2: + ORC_ASM_CODE(compiler," movw %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_16(reg2)); + *compiler->codeptr++ = 0x66; + break; + case 4: + ORC_ASM_CODE(compiler," movl %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname(reg2)); + break; + case 8: + ORC_ASM_CODE(compiler," mov %d(%%%s), %%%s\n", offset, orc_x86_get_regname_ptr(compiler, reg1), + orc_x86_get_regname_64(reg2)); + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + + orc_x86_emit_rex(compiler, size, reg2, 0, reg1); + *compiler->codeptr++ = 0x8b; + orc_x86_emit_modrm_memoffset (compiler, reg2, offset, reg1); +} + +void +orc_x86_emit_mov_reg_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, + int reg2) +{ + switch (size) { + case 1: + ORC_ASM_CODE(compiler," movb %%%s, %d(%%%s)\n", orc_x86_get_regname_8(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + orc_x86_emit_rex(compiler, size, reg1, 0, reg2); + *compiler->codeptr++ = 0x88; + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg2); + return; + case 2: + ORC_ASM_CODE(compiler," movw %%%s, %d(%%%s)\n", orc_x86_get_regname_16(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + *compiler->codeptr++ = 0x66; + break; + case 4: + ORC_ASM_CODE(compiler," movl %%%s, %d(%%%s)\n", orc_x86_get_regname(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + break; + case 8: + ORC_ASM_CODE(compiler," mov %%%s, %d(%%%s)\n", orc_x86_get_regname_64(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg2)); + break; + default: + ORC_COMPILER_ERROR(compiler, "bad size"); + break; + } + + orc_x86_emit_rex(compiler, size, reg1, 0, reg2); + *compiler->codeptr++ = 0x89; + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg2); +} + +void +orc_x86_emit_mov_imm_reg (OrcCompiler *compiler, int size, int value, int reg1) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," movw $%d, %%%s\n", value, orc_x86_get_regname_16(reg1)); + orc_x86_emit_rex(compiler, size, 0, 0, reg1); + *compiler->codeptr++ = 0x66; + *compiler->codeptr++ = 0xb8 + (orc_x86_get_regnum(reg1) & 0x7); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + } else if (size == 4) { + ORC_ASM_CODE(compiler," movl $%d, %%%s\n", value, orc_x86_get_regname(reg1)); + orc_x86_emit_rex(compiler, size, 0, 0, reg1); + *compiler->codeptr++ = 0xb8 + (orc_x86_get_regnum(reg1) & 0x7); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } else { + /* FIXME */ + } + +} + +void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," movw %%%s, %%%s\n", orc_x86_get_regname_16(reg1), + orc_x86_get_regname_16(reg2)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," movl %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname(reg2)); + } else { + ORC_ASM_CODE(compiler," mov %%%s, %%%s\n", orc_x86_get_regname_64(reg1), + orc_x86_get_regname_64(reg2)); + } + + orc_x86_emit_rex(compiler, size, reg1, 0, reg2); + *compiler->codeptr++ = 0x89; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + +void +orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," testw %%%s, %%%s\n", orc_x86_get_regname_16(reg1), + orc_x86_get_regname_16(reg2)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," testl %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname(reg2)); + } else { + ORC_ASM_CODE(compiler," test %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname(reg2)); + } + + orc_x86_emit_rex(compiler, size, reg2, 0, reg1); + *compiler->codeptr++ = 0x85; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + +void +orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value, int reg) +{ + if (value == 0) return; + + if (size == 2) { + ORC_ASM_CODE(compiler," sarw $%d, %%%s\n", value, orc_x86_get_regname_16(reg)); + } else if (size == 4) { + ORC_ASM_CODE(compiler," sarl $%d, %%%s\n", value, orc_x86_get_regname(reg)); + } else { + ORC_ASM_CODE(compiler," sar $%d, %%%s\n", value, orc_x86_get_regname_64(reg)); + } + + orc_x86_emit_rex(compiler, size, reg, 0, 0); + if (value == 1) { + *compiler->codeptr++ = 0xd1; + orc_x86_emit_modrm_reg (compiler, reg, 7); + } else { + *compiler->codeptr++ = 0xc1; + orc_x86_emit_modrm_reg (compiler, reg, 7); + *compiler->codeptr++ = value; + } +} + +void +orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," andw $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," andl $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," and $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + /* FIXME */ + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = (value & 0xff); + } else { + *compiler->codeptr++ = 0x81; + /* FIXME */ + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," andw $%d, %%%s\n", value, orc_x86_get_regname_16(reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," andl $%d, %%%s\n", value, orc_x86_get_regname(reg)); + } else { + ORC_ASM_CODE(compiler," and $%d, %%%s\n", value, orc_x86_get_regname_64(reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_reg (compiler, reg, 4); + *compiler->codeptr++ = (value & 0xff); + } else { + if (reg == X86_EAX) { + *compiler->codeptr++ = 0x25; + } else { + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_reg (compiler, reg, 4); + } + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," addw $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," addq $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = (value & 0xff); + } else { + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4 || size == 8) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int reg1, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," addw %%%s, %d(%%%s)\n", + orc_x86_get_regname_ptr(compiler, reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl %%%s, %d(%%%s)\n", + orc_x86_get_regname_ptr(compiler, reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," add %%%s, %d(%%%s)\n", + orc_x86_get_regname_ptr(compiler, reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, reg1, 0, reg); + *compiler->codeptr++ = 0x01; + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg); +} + +void +orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value, int reg, orc_bool record) +{ + if (!record) { + if (size == 4 && !compiler->is_64bit) { + ORC_ASM_CODE(compiler," leal %d(%%%s), %%%s\n", value, + orc_x86_get_regname(reg), orc_x86_get_regname(reg)); + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0x8d; + orc_x86_emit_modrm_memoffset (compiler, reg, value, reg); + return; + } + if (size == 8 && compiler->is_64bit) { + ORC_ASM_CODE(compiler," leaq %d(%%%s), %%%s\n", value, + orc_x86_get_regname_64(reg), orc_x86_get_regname_64(reg)); + orc_x86_emit_rex(compiler, size, reg, 0, reg); + *compiler->codeptr++ = 0x8d; + orc_x86_emit_modrm_memoffset (compiler, reg, value, reg); + return; + } + } + + if (size == 2) { + ORC_ASM_CODE(compiler," addw $%d, %%%s\n", value, orc_x86_get_regname_16(reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl $%d, %%%s\n", value, orc_x86_get_regname(reg)); + } else { + ORC_ASM_CODE(compiler," addq $%d, %%%s\n", value, orc_x86_get_regname_64(reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_reg (compiler, reg, 0); + *compiler->codeptr++ = (value & 0xff); + } else { + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_reg (compiler, reg, 0); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4 || size == 8) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_add_reg_reg_shift (OrcCompiler *compiler, int size, int reg1, + int reg2, int shift) +{ + if (size == 4) { + ORC_ASM_CODE(compiler," leal (%%%s, %%%s, %d), %%%s\n", + orc_x86_get_regname(reg2), + orc_x86_get_regname(reg1), 1<codeptr++ = 0x8d; + orc_x86_emit_modrm_memindex (compiler, reg2, 0, reg2, reg1, shift); +} + +void +orc_x86_emit_add_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," addw %%%s, %%%s\n", orc_x86_get_regname_16(reg1), + orc_x86_get_regname_16(reg2)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname(reg2)); + } else { + ORC_ASM_CODE(compiler," add %%%s, %%%s\n", orc_x86_get_regname_64(reg1), + orc_x86_get_regname_64(reg2)); + } + + orc_x86_emit_rex(compiler, size, reg2, 0, reg1); + *compiler->codeptr++ = 0x01; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + +void +orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," subw %%%s, %%%s\n", orc_x86_get_regname_16(reg1), + orc_x86_get_regname_16(reg2)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," subl %%%s, %%%s\n", orc_x86_get_regname(reg1), + orc_x86_get_regname(reg2)); + } else { + ORC_ASM_CODE(compiler," sub %%%s, %%%s\n", orc_x86_get_regname_64(reg1), + orc_x86_get_regname_64(reg2)); + } + + orc_x86_emit_rex(compiler, size, reg2, 0, reg1); + *compiler->codeptr++ = 0x29; + orc_x86_emit_modrm_reg (compiler, reg2, reg1); +} + +void +orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg) +{ + ORC_ASM_CODE(compiler," imul %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname(destreg)); + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0xaf; + orc_x86_emit_modrm_memoffset (compiler, destreg, offset, reg); +} + +void +orc_x86_emit_add_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," addw %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname_16(destreg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname(destreg)); + } else { + ORC_ASM_CODE(compiler," add %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname_64(destreg)); + } + + orc_x86_emit_rex(compiler, size, destreg, 0, reg); + *compiler->codeptr++ = 0x03; + orc_x86_emit_modrm_memoffset (compiler, destreg, offset, reg); +} + +void +orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," subw %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname_16(destreg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," subl %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname(destreg)); + } else { + ORC_ASM_CODE(compiler," sub %d(%%%s), %%%s\n", offset, + orc_x86_get_regname_ptr(compiler, reg), + orc_x86_get_regname_64(destreg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0x2b; + orc_x86_emit_modrm_memoffset (compiler, destreg, offset, reg); +} + +void +orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int reg1, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," cmpw %%%s, %d(%%%s)\n", orc_x86_get_regname_16(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," cmpl %%%s, %d(%%%s)\n", orc_x86_get_regname(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," cmp %%%s, %d(%%%s)\n", orc_x86_get_regname_64(reg1), offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0x39; + orc_x86_emit_modrm_memoffset (compiler, reg1, offset, reg); +} + +void +orc_x86_emit_cmp_imm_reg (OrcCompiler *compiler, int size, int value, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," cmpw $%d, %%%s\n", value, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," cmpl $%d, %%%s\n", value, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," cmp $%d, %%%s\n", value, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_reg (compiler, reg, 7); + *compiler->codeptr++ = (value & 0xff); + } else { + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_reg (compiler, reg, 7); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," cmpw $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," cmpl $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," cmp $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + if (value >= -128 && value < 128) { + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_memoffset (compiler, 7, offset, reg); + *compiler->codeptr++ = (value & 0xff); + } else { + *compiler->codeptr++ = 0x81; + orc_x86_emit_modrm_memoffset (compiler, 7, offset, reg); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } + } +} + +void +orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," testw $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," testl $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } else { + ORC_ASM_CODE(compiler," test $%d, %d(%%%s)\n", value, offset, + orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + + *compiler->codeptr++ = 0xf7; + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = (value & 0xff); + *compiler->codeptr++ = ((value>>8) & 0xff); + if (size == 4) { + *compiler->codeptr++ = ((value>>16) & 0xff); + *compiler->codeptr++ = ((value>>24) & 0xff); + } +} + +void +orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, + int offset, int reg) +{ + if (size == 2) { + ORC_ASM_CODE(compiler," decw %d(%%%s)\n", offset, orc_x86_get_regname_ptr(compiler, reg)); + *compiler->codeptr++ = 0x66; + } else if (size == 4) { + ORC_ASM_CODE(compiler," addl $-1, %d(%%%s)\n", offset, orc_x86_get_regname_ptr(compiler, reg)); + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0x83; + orc_x86_emit_modrm_memoffset (compiler, 0, offset, reg); + *compiler->codeptr++ = 0xff; + return; + } else { + ORC_ASM_CODE(compiler," dec %d(%%%s)\n", offset, orc_x86_get_regname_ptr(compiler, reg)); + } + + orc_x86_emit_rex(compiler, size, 0, 0, reg); + *compiler->codeptr++ = 0xff; + orc_x86_emit_modrm_memoffset (compiler, 1, offset, reg); +} + +void orc_x86_emit_ret (OrcCompiler *compiler) +{ + if (compiler->is_64bit) { + ORC_ASM_CODE(compiler," retq\n"); + } else { + ORC_ASM_CODE(compiler," ret\n"); + } + *compiler->codeptr++ = 0xc3; +} + +void orc_x86_emit_emms (OrcCompiler *compiler) +{ + ORC_ASM_CODE(compiler," emms\n"); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x77; +} + +void orc_x86_emit_rdtsc (OrcCompiler *compiler) +{ + ORC_ASM_CODE(compiler," rdtsc\n"); + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x31; +} + +void orc_x86_emit_rep_movs (OrcCompiler *compiler, int size) +{ + switch (size) { + case 1: + ORC_ASM_CODE(compiler," rep movsb\n"); + *compiler->codeptr++ = 0xf3; + *compiler->codeptr++ = 0xa4; + break; + case 2: + ORC_ASM_CODE(compiler," rep movsw\n"); + *compiler->codeptr++ = 0x66; + *compiler->codeptr++ = 0xf3; + *compiler->codeptr++ = 0xa5; + break; + case 4: + ORC_ASM_CODE(compiler," rep movsl\n"); + *compiler->codeptr++ = 0xf3; + *compiler->codeptr++ = 0xa5; + break; + } +} + +void +x86_add_fixup (OrcCompiler *compiler, unsigned char *ptr, int label, int type) +{ + compiler->fixups[compiler->n_fixups].ptr = ptr; + compiler->fixups[compiler->n_fixups].label = label; + compiler->fixups[compiler->n_fixups].type = type; + compiler->n_fixups++; +} + +void +x86_add_label (OrcCompiler *compiler, unsigned char *ptr, int label) +{ + compiler->labels[label] = ptr; +} + +void orc_x86_emit_jmp (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," jmp %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + if (compiler->long_jumps) { + *compiler->codeptr++ = 0xe9; + x86_add_fixup (compiler, compiler->codeptr, label, 1); + *compiler->codeptr++ = 0xfc; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + } else { + *compiler->codeptr++ = 0xeb; + x86_add_fixup (compiler, compiler->codeptr, label, 0); + *compiler->codeptr++ = 0xff; + } +} + +void orc_x86_emit_jg (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," jg %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + if (compiler->long_jumps) { + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x8f; + x86_add_fixup (compiler, compiler->codeptr, label, 1); + *compiler->codeptr++ = 0xfc; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + } else { + *compiler->codeptr++ = 0x7f; + x86_add_fixup (compiler, compiler->codeptr, label, 0); + *compiler->codeptr++ = 0xff; + } +} + +void orc_x86_emit_jle (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," jle %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + if (compiler->long_jumps) { + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x8e; + x86_add_fixup (compiler, compiler->codeptr, label, 1); + *compiler->codeptr++ = 0xfc; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + } else { + *compiler->codeptr++ = 0x7e; + x86_add_fixup (compiler, compiler->codeptr, label, 0); + *compiler->codeptr++ = 0xff; + } +} + +void orc_x86_emit_je (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," je %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + if (compiler->long_jumps) { + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x84; + x86_add_fixup (compiler, compiler->codeptr, label, 1); + *compiler->codeptr++ = 0xfc; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + } else { + *compiler->codeptr++ = 0x74; + x86_add_fixup (compiler, compiler->codeptr, label, 0); + *compiler->codeptr++ = 0xff; + } +} + +void orc_x86_emit_jne (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler," jne %d%c\n", label, + (compiler->labels[label]!=NULL) ? 'b' : 'f'); + + if (compiler->long_jumps) { + *compiler->codeptr++ = 0x0f; + *compiler->codeptr++ = 0x85; + x86_add_fixup (compiler, compiler->codeptr, label, 1); + *compiler->codeptr++ = 0xfc; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + *compiler->codeptr++ = 0xff; + } else { + *compiler->codeptr++ = 0x75; + x86_add_fixup (compiler, compiler->codeptr, label, 0); + *compiler->codeptr++ = 0xff; + } +} + +void orc_x86_emit_label (OrcCompiler *compiler, int label) +{ + ORC_ASM_CODE(compiler,"%d:\n", label); + + x86_add_label (compiler, compiler->codeptr, label); +} + +void +orc_x86_do_fixups (OrcCompiler *compiler) +{ + int i; + for(i=0;in_fixups;i++){ + if (compiler->fixups[i].type == 0) { + unsigned char *label = compiler->labels[compiler->fixups[i].label]; + unsigned char *ptr = compiler->fixups[i].ptr; + int diff; + + diff = ((orc_int8)ptr[0]) + (label - ptr); + if (diff != (orc_int8)diff) { + ORC_COMPILER_ERROR(compiler, "short jump too long"); + } + + ptr[0] = diff; + } else if (compiler->fixups[i].type == 1) { + unsigned char *label = compiler->labels[compiler->fixups[i].label]; + unsigned char *ptr = compiler->fixups[i].ptr; + int diff; + + diff = ORC_READ_UINT32_LE (ptr) + (label - ptr); + ORC_WRITE_UINT32_LE(ptr, diff); + } + } +} + +void +orc_x86_emit_prologue (OrcCompiler *compiler) +{ + orc_compiler_append_code(compiler,".global %s\n", compiler->program->name); + orc_compiler_append_code(compiler,".p2align 4\n"); + orc_compiler_append_code(compiler,"%s:\n", compiler->program->name); + if (compiler->is_64bit) { + int i; + for(i=0;i<16;i++){ + if (compiler->used_regs[ORC_GP_REG_BASE+i] && + compiler->save_regs[ORC_GP_REG_BASE+i]) { + orc_x86_emit_push (compiler, 8, ORC_GP_REG_BASE+i); + } + } + } else { + orc_x86_emit_push (compiler, 4, X86_EBP); + if (compiler->use_frame_pointer) { + orc_x86_emit_mov_reg_reg (compiler, 4, X86_ESP, X86_EBP); + } + orc_x86_emit_mov_memoffset_reg (compiler, 4, 8, X86_ESP, compiler->exec_reg); + if (compiler->used_regs[X86_EDI]) { + orc_x86_emit_push (compiler, 4, X86_EDI); + } + if (compiler->used_regs[X86_ESI]) { + orc_x86_emit_push (compiler, 4, X86_ESI); + } + if (compiler->used_regs[X86_EBX]) { + orc_x86_emit_push (compiler, 4, X86_EBX); + } + } + +#if 0 + orc_x86_emit_rdtsc(compiler); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A3]), compiler->exec_reg); +#endif +} + +void +orc_x86_emit_epilogue (OrcCompiler *compiler) +{ +#if 0 + orc_x86_emit_rdtsc(compiler); + orc_x86_emit_mov_reg_memoffset (compiler, 4, X86_EAX, + ORC_STRUCT_OFFSET(OrcExecutor,params[ORC_VAR_A4]), compiler->exec_reg); +#endif + + if (compiler->is_64bit) { + int i; + for(i=15;i>=0;i--){ + if (compiler->used_regs[ORC_GP_REG_BASE+i] && + compiler->save_regs[ORC_GP_REG_BASE+i]) { + orc_x86_emit_pop (compiler, 8, ORC_GP_REG_BASE+i); + } + } + } else { + if (compiler->used_regs[X86_EBX]) { + orc_x86_emit_pop (compiler, 4, X86_EBX); + } + if (compiler->used_regs[X86_ESI]) { + orc_x86_emit_pop (compiler, 4, X86_ESI); + } + if (compiler->used_regs[X86_EDI]) { + orc_x86_emit_pop (compiler, 4, X86_EDI); + } + orc_x86_emit_pop (compiler, 4, X86_EBP); + } + orc_x86_emit_ret (compiler); +} + +void +orc_x86_emit_align (OrcCompiler *compiler) +{ + int diff; + int align_shift = 4; + + diff = (compiler->code - compiler->codeptr)&((1<codeptr++ = 0x90; + diff--; + } +} + +/* memcpy implementation based on rep movs */ + +int +orc_x86_assemble_copy_check (OrcCompiler *compiler) +{ + if (compiler->program->n_insns == 1 && + compiler->program->is_2d == FALSE && + (strcmp (compiler->program->insns[0].opcode->name, "copyb") == 0 || + strcmp (compiler->program->insns[0].opcode->name, "copyw") == 0 || + strcmp (compiler->program->insns[0].opcode->name, "copyl") == 0)) { + return TRUE; + } + + return FALSE; +} + +void +orc_x86_assemble_copy (OrcCompiler *compiler) +{ + OrcInstruction *insn; + int shift = 0; + + insn = compiler->program->insns + 0; + + if (strcmp (insn->opcode->name, "copyw") == 0) { + shift = 1; + } else if (strcmp (insn->opcode->name, "copyl") == 0) { + shift = 2; + } + + compiler->used_regs[X86_EDI] = TRUE; + compiler->used_regs[X86_ESI] = TRUE; + + orc_x86_emit_prologue (compiler); + + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,arrays[insn->dest_args[0]]), + compiler->exec_reg, X86_EDI); + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,arrays[insn->src_args[0]]), + compiler->exec_reg, X86_ESI); + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + + orc_x86_emit_sar_imm_reg (compiler, 4, 2 - shift, compiler->gp_tmpreg); + orc_x86_emit_rep_movs (compiler, 4); + if (shift == 0) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_and_imm_reg (compiler, 4, 3, compiler->gp_tmpreg); + orc_x86_emit_rep_movs (compiler, 1); + } + if (shift == 1) { + orc_x86_emit_mov_memoffset_reg (compiler, 4, + (int)ORC_STRUCT_OFFSET(OrcExecutor,n), compiler->exec_reg, + compiler->gp_tmpreg); + orc_x86_emit_and_imm_reg (compiler, 4, 1, compiler->gp_tmpreg); + orc_x86_emit_rep_movs (compiler, 2); + } + + orc_x86_emit_epilogue (compiler); + + orc_x86_do_fixups (compiler); +} + diff --git a/orc/orcx86.h b/orc/orcx86.h new file mode 100644 index 0000000..05b4f9f --- /dev/null +++ b/orc/orcx86.h @@ -0,0 +1,107 @@ + +#ifndef _ORC_X86_H_ +#define _ORC_X86_H_ + +#include + +enum { + X86_EAX = ORC_GP_REG_BASE, + X86_ECX, + X86_EDX, + X86_EBX, + X86_ESP, + X86_EBP, + X86_ESI, + X86_EDI, + X86_R8, + X86_R9, + X86_R10, + X86_R11, + X86_R12, + X86_R13, + X86_R14, + X86_R15 +}; + +enum { + ORC_X86_UNKNOWN, + ORC_X86_P6, + ORC_X86_NETBURST, + ORC_X86_CORE, + ORC_X86_PENRYN, + ORC_X86_NEHALEM, + ORC_X86_BONNELL, + ORC_X86_WESTMERE, + ORC_X86_SANDY_BRIDGE, + ORC_X86_K5, + ORC_X86_K6, + ORC_X86_K7, + ORC_X86_K8, + ORC_X86_K10 +}; + +const char * orc_x86_get_regname(int i); +int orc_x86_get_regnum(int i); +const char * orc_x86_get_regname_16(int i); +const char * orc_x86_get_regname_64(int i); +const char * orc_x86_get_regname_ptr(OrcCompiler *compiler, int i); + +void orc_x86_emit_push (OrcCompiler *compiler, int size, int reg); +void orc_x86_emit_pop (OrcCompiler *compiler, int size, int reg); +void orc_x86_emit_mov_memoffset_reg (OrcCompiler *compiler, int size, int offset, int reg1, int reg2); +void orc_x86_emit_mov_reg_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, int reg2); +void orc_x86_emit_mov_imm_reg (OrcCompiler *compiler, int size, int value, int reg1); +void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2); +void orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2); +void orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value, int reg); +void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offset, int reg); +void orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int value, int offset, int reg); +void orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int reg1, int offset, int reg); +void orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int value, int offset, int reg); +void orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value, int reg, orc_bool record); +void orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value, int reg); +void orc_x86_emit_or_imm_reg (OrcCompiler *compiler, int size, int value, int reg); +void orc_x86_emit_add_reg_reg_shift (OrcCompiler *compiler, int size, int reg1, int reg2, int shift); +void orc_x86_emit_add_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2); +void orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2); +void orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg); +void orc_x86_emit_add_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg); +void orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size, + int offset, int reg, int destreg); +void orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int reg1, + int offset, int reg); +void orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg); +void orc_x86_emit_cmp_imm_reg (OrcCompiler *compiler, int size, int value, int reg); +void orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int value, + int offset, int reg); +void orc_x86_emit_emms (OrcCompiler *compiler); +void orc_x86_emit_rdtsc (OrcCompiler *compiler); +void orc_x86_emit_rep_movs (OrcCompiler *compiler, int size); +void orc_x86_emit_ret (OrcCompiler *compiler); +void orc_x86_emit_jle (OrcCompiler *compiler, int label); +void orc_x86_emit_jg (OrcCompiler *compiler, int label); +void orc_x86_emit_je (OrcCompiler *compiler, int label); +void orc_x86_emit_jne (OrcCompiler *compiler, int label); +void orc_x86_emit_jmp (OrcCompiler *compiler, int label); +void orc_x86_emit_label (OrcCompiler *compiler, int label); +void orc_x86_emit_align (OrcCompiler *compiler); +void orc_x86_emit_prologue (OrcCompiler *compiler); +void orc_x86_emit_epilogue (OrcCompiler *compiler); + +void orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2, int reg3); +void orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int offset, int reg2); +void orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2); +void orc_x86_emit_modrm_memindex (OrcCompiler *compiler, int reg1, int offset, + int reg2, int regindex, int shift); + +void orc_x86_do_fixups (OrcCompiler *compiler); + +int orc_x86_assemble_copy_check (OrcCompiler *compiler); +void orc_x86_assemble_copy (OrcCompiler *compiler); + + +#endif + diff --git a/packaging/add-armv7l-to-as-host-defines.patch b/packaging/add-armv7l-to-as-host-defines.patch new file mode 100644 index 0000000..b98aa6e --- /dev/null +++ b/packaging/add-armv7l-to-as-host-defines.patch @@ -0,0 +1,13 @@ +Signed-off-by: Topi Santakivi +--- +--- orc-0.4.11/m4/as-host-defines-orig.m4 2011-01-28 08:45:36.424943003 +0200 ++++ orc-0.4.11/m4/as-host-defines.m4 2011-01-28 08:50:57.808942569 +0200 +@@ -23,7 +23,7 @@ + HAVE_POWERPC=yes + AC_DEFINE(HAVE_POWERPC, 1, [Defined if host is powerpc]) + ;; +- xarm) ++ xarm|xarmv7l) + HAVE_ARM=yes + AC_DEFINE(HAVE_ARM, 1, [Defined if host is arm]) + ;; diff --git a/packaging/orc-0.4.11.tar.bz2 b/packaging/orc-0.4.11.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..5395268f89b0d204e26c50004c9f385607ed1246 GIT binary patch literal 523920 zcmV)bK&ih%T4*^jL0KkKS-LV5@&%+?|NsC0|NsC0|NsC0|NsC0|Ns8~-}nE&|NsBK z|G)qL|NrAA9tU^dJPe;*L42~<6>xne>k^GJ3U9lL?za^}DQv9(0)ar4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nb9{wl?|Ha&qP81|E9QE|TnBJ52 literal 0 HcmV?d00001 diff --git a/packaging/orc-0.4.5-arm-build-failure.patch b/packaging/orc-0.4.5-arm-build-failure.patch new file mode 100644 index 0000000..27740b1 --- /dev/null +++ b/packaging/orc-0.4.5-arm-build-failure.patch @@ -0,0 +1,12 @@ +diff -ru orc-0.4.5-old/orc-test/orctest.c orc-0.4.5/orc-test/orctest.c +--- orc-0.4.5-old/orc-test/orctest.c 2010-06-07 21:59:01.000000000 -0400 ++++ orc-0.4.5/orc-test/orctest.c 2010-08-10 02:27:01.000000000 -0400 +@@ -146,7 +146,7 @@ + } + + +-#define PREFIX "/opt/arm-2008q3/bin/arm-none-linux-gnueabi-" ++#define PREFIX "" + + OrcTestResult + orc_test_gcc_compile_neon (OrcProgram *p) diff --git a/packaging/orc.changes b/packaging/orc.changes new file mode 100644 index 0000000..29df86f --- /dev/null +++ b/packaging/orc.changes @@ -0,0 +1,16 @@ +* Wed May 30 03:17:39 UTC 2012 - Lin Yang - 0.4.11 +- Initial commit to Gerrit + +* Fri Jan 28 2011 Topi Santakivi - 0.4.11 +- add-armv7l-to-as-host-defines.patch (BMC#13056) + +* Thu Nov 04 2010 Ling Yue - 0.4.11 +- Upgrade to 0.4.11 (BMC#10209) + +* Tue Aug 10 2010 Carsten Munk - 0.4.5 +- Fix ARM build error (hardcoded cross compiler) +- Disable tests for ARM as NEON isn't properly supported in QEMU target. + +* Wed Jul 28 2010 Ling Yue - 0.4.5 +- Init 0.4.5 (import from F13 update) + diff --git a/packaging/orc.spec b/packaging/orc.spec new file mode 100644 index 0000000..d9a450c --- /dev/null +++ b/packaging/orc.spec @@ -0,0 +1,158 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.21 +# +# >> macros +# << macros + +Name: orc +Summary: The Oil Run-time Compiler +Version: 0.4.11 +Release: 1 +Group: System/Libraries +License: BSD +URL: http://code.entropywave.com/projects/orc/ +Source0: %{name}-%{version}.tar.bz2 +Source100: orc.yaml +Patch0: orc-0.4.5-arm-build-failure.patch +Patch1: add-armv7l-to-as-host-defines.patch +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: libtool + + +%description +Orc is a library and set of tools for compiling and executing +very simple programs that operate on arrays of data. The "language" +is a generic assembly language that represents many of the features +available in SIMD architectures, including saturated addition and +subtraction, and many arithmetic operations. + + + + +%package doc +Summary: Documentation for Orc +Group: Development/Languages +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Documentation for Orc. + +%package compiler +Summary: Orc compiler +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description compiler +The Orc compiler, to produce optimized code. + +%package devel +Summary: Development files and static libraries for Orc +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-compiler +Requires: pkgconfig + +%description devel +This package contains the files needed to build packages that depend +on orc. + + + +%prep +%setup -q -n %{name}-%{version} + +# orc-0.4.5-arm-build-failure.patch +%patch0 -p1 +# add-armv7l-to-as-host-defines.patch +%patch1 -p1 +# >> setup +autoreconf -vif +# << setup + +%build +# >> build pre +# << build pre + +%configure --disable-static \ + --disable-gtk-doc + + +# >> build post +make %{?jobs:-j%jobs} +# << build post +%install +rm -rf %{buildroot} +# >> install pre +make install DESTDIR=%{buildroot} INSTALL="install -p" +# << install pre + +# >> install post + +# Remove unneeded files. +find %{buildroot}/%{_libdir} -name \*.a -or -name \*.la -delete +rm -rf %{buildroot}/%{_libdir}/orc + +touch -r stamp-h1 %{buildroot}%{_includedir}/%{name}-0.4/orc/orc-stdint.h + +%clean +rm -rf %{buildroot} + + +# << install post +%check +# >> check +%ifnarch %{arm} +make check +%endif +# << check + + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + + + + + + + + + + +%files +%defattr(-,root,root,-) +# >> files +%doc COPYING README +%{_libdir}/liborc-*.so.* +# << files + + +%files doc +%defattr(-,root,root,-) +# >> files doc +%doc %{_datadir}/gtk-doc/html/orc/* +# << files doc + +%files compiler +%defattr(-,root,root,-) +# >> files compiler +%{_bindir}/orcc +# << files compiler + +%files devel +%defattr(-,root,root,-) +# >> files devel +%doc examples/*.c +%{_includedir}/%{name}-0.4/* +%{_libdir}/liborc-*.so +%{_libdir}/pkgconfig/orc-0.4.pc +%{_bindir}/orc-bugreport +# << files devel + diff --git a/packaging/orc.yaml b/packaging/orc.yaml new file mode 100644 index 0000000..8cec90f --- /dev/null +++ b/packaging/orc.yaml @@ -0,0 +1,53 @@ +Name: orc +Summary: The Oil Run-time Compiler +Version: 0.4.11 +Release: 1 +Group: System/Libraries +License: BSD +URL: http://code.entropywave.com/projects/orc/ +Sources: + - http://code.entropywave.com/download/orc/orc-%{version}.tar.gz +Patches: + - orc-0.4.5-arm-build-failure.patch + - add-armv7l-to-as-host-defines.patch +Description: | + Orc is a library and set of tools for compiling and executing + very simple programs that operate on arrays of data. The "language" + is a generic assembly language that represents many of the features + available in SIMD architectures, including saturated addition and + subtraction, and many arithmetic operations. + +PkgConfigBR: + - gtk-doc +PkgBR: + - libtool +Configure: configure +ConfigOptions: + - --enable-gtk-doc +#Builder: make +Builder: none +Check: yes +SubPackages: + - Name: doc + Summary: Documentation for Orc + Group: Development/Languages + Description: Documentation for Orc. + BuildArch: noarch + + - Name: compiler + Summary: Orc compiler + Group: Development/Libraries + Description: The Orc compiler, to produce optimized code. + Requires: + - pkgconfig + + - Name: devel + Summary: Development files and static libraries for Orc + Group: Development/Libraries + Description: | + This package contains the files needed to build packages that depend + on orc. + Requires: + - "%{name}-compiler" + - pkgconfig + diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am new file mode 100644 index 0000000..2e0044b --- /dev/null +++ b/testsuite/Makefile.am @@ -0,0 +1,38 @@ + +DIST_SUBDIRS = orcc benchmorc + +SUBDIRS = orcc benchmorc + +TESTS_ENVIRONMENT = \ + testfile="$(srcdir)/test.orc" + +TESTS = \ + test_accsadubl test-schro \ + exec_opcodes_sys \ + exec_parse \ + perf_opcodes_sys perf_parse \ + memcpy_speed \ + abi + +noinst_PROGRAMS = $(TESTS) generate_xml_table generate_xml_table2 \ + generate_opcodes_sys compile_parse compile_parse_c memcpy_speed \ + perf_opcodes_sys_compare perf_parse_compare \ + exec_parse \ + compile_opcodes_sys_c \ + compile_opcodes_sys \ + show_parse + + +EXTRA_DIST = test.orc + +CLEANFILES = temp-orc-test-* + +if ENABLE_BACKEND_NEON +noinst_PROGRAMS += compile_opcodes_sys_neon \ + compile_parse_neon +endif + +AM_CFLAGS = $(ORC_CFLAGS) +LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la + + diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in new file mode 100644 index 0000000..d7a42a3 --- /dev/null +++ b/testsuite/Makefile.in @@ -0,0 +1,911 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +TESTS = test_accsadubl$(EXEEXT) test-schro$(EXEEXT) \ + exec_opcodes_sys$(EXEEXT) exec_parse$(EXEEXT) \ + perf_opcodes_sys$(EXEEXT) perf_parse$(EXEEXT) \ + memcpy_speed$(EXEEXT) abi$(EXEEXT) +noinst_PROGRAMS = $(am__EXEEXT_1) generate_xml_table$(EXEEXT) \ + generate_xml_table2$(EXEEXT) generate_opcodes_sys$(EXEEXT) \ + compile_parse$(EXEEXT) compile_parse_c$(EXEEXT) \ + memcpy_speed$(EXEEXT) perf_opcodes_sys_compare$(EXEEXT) \ + perf_parse_compare$(EXEEXT) exec_parse$(EXEEXT) \ + compile_opcodes_sys_c$(EXEEXT) compile_opcodes_sys$(EXEEXT) \ + show_parse$(EXEEXT) $(am__EXEEXT_2) +@ENABLE_BACKEND_NEON_TRUE@am__append_1 = compile_opcodes_sys_neon \ +@ENABLE_BACKEND_NEON_TRUE@ compile_parse_neon + +subdir = testsuite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__EXEEXT_1 = test_accsadubl$(EXEEXT) test-schro$(EXEEXT) \ + exec_opcodes_sys$(EXEEXT) exec_parse$(EXEEXT) \ + perf_opcodes_sys$(EXEEXT) perf_parse$(EXEEXT) \ + memcpy_speed$(EXEEXT) abi$(EXEEXT) +@ENABLE_BACKEND_NEON_TRUE@am__EXEEXT_2 = \ +@ENABLE_BACKEND_NEON_TRUE@ compile_opcodes_sys_neon$(EXEEXT) \ +@ENABLE_BACKEND_NEON_TRUE@ compile_parse_neon$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +abi_SOURCES = abi.c +abi_OBJECTS = abi.$(OBJEXT) +abi_LDADD = $(LDADD) +compile_opcodes_sys_SOURCES = compile_opcodes_sys.c +compile_opcodes_sys_OBJECTS = compile_opcodes_sys.$(OBJEXT) +compile_opcodes_sys_LDADD = $(LDADD) +compile_opcodes_sys_c_SOURCES = compile_opcodes_sys_c.c +compile_opcodes_sys_c_OBJECTS = compile_opcodes_sys_c.$(OBJEXT) +compile_opcodes_sys_c_LDADD = $(LDADD) +compile_opcodes_sys_neon_SOURCES = compile_opcodes_sys_neon.c +compile_opcodes_sys_neon_OBJECTS = compile_opcodes_sys_neon.$(OBJEXT) +compile_opcodes_sys_neon_LDADD = $(LDADD) +compile_parse_SOURCES = compile_parse.c +compile_parse_OBJECTS = compile_parse.$(OBJEXT) +compile_parse_LDADD = $(LDADD) +compile_parse_c_SOURCES = compile_parse_c.c +compile_parse_c_OBJECTS = compile_parse_c.$(OBJEXT) +compile_parse_c_LDADD = $(LDADD) +compile_parse_neon_SOURCES = compile_parse_neon.c +compile_parse_neon_OBJECTS = compile_parse_neon.$(OBJEXT) +compile_parse_neon_LDADD = $(LDADD) +exec_opcodes_sys_SOURCES = exec_opcodes_sys.c +exec_opcodes_sys_OBJECTS = exec_opcodes_sys.$(OBJEXT) +exec_opcodes_sys_LDADD = $(LDADD) +exec_parse_SOURCES = exec_parse.c +exec_parse_OBJECTS = exec_parse.$(OBJEXT) +exec_parse_LDADD = $(LDADD) +generate_opcodes_sys_SOURCES = generate_opcodes_sys.c +generate_opcodes_sys_OBJECTS = generate_opcodes_sys.$(OBJEXT) +generate_opcodes_sys_LDADD = $(LDADD) +generate_xml_table_SOURCES = generate_xml_table.c +generate_xml_table_OBJECTS = generate_xml_table.$(OBJEXT) +generate_xml_table_LDADD = $(LDADD) +generate_xml_table2_SOURCES = generate_xml_table2.c +generate_xml_table2_OBJECTS = generate_xml_table2.$(OBJEXT) +generate_xml_table2_LDADD = $(LDADD) +memcpy_speed_SOURCES = memcpy_speed.c +memcpy_speed_OBJECTS = memcpy_speed.$(OBJEXT) +memcpy_speed_LDADD = $(LDADD) +perf_opcodes_sys_SOURCES = perf_opcodes_sys.c +perf_opcodes_sys_OBJECTS = perf_opcodes_sys.$(OBJEXT) +perf_opcodes_sys_LDADD = $(LDADD) +perf_opcodes_sys_compare_SOURCES = perf_opcodes_sys_compare.c +perf_opcodes_sys_compare_OBJECTS = perf_opcodes_sys_compare.$(OBJEXT) +perf_opcodes_sys_compare_LDADD = $(LDADD) +perf_parse_SOURCES = perf_parse.c +perf_parse_OBJECTS = perf_parse.$(OBJEXT) +perf_parse_LDADD = $(LDADD) +perf_parse_compare_SOURCES = perf_parse_compare.c +perf_parse_compare_OBJECTS = perf_parse_compare.$(OBJEXT) +perf_parse_compare_LDADD = $(LDADD) +show_parse_SOURCES = show_parse.c +show_parse_OBJECTS = show_parse.$(OBJEXT) +show_parse_LDADD = $(LDADD) +test_schro_SOURCES = test-schro.c +test_schro_OBJECTS = test-schro.$(OBJEXT) +test_schro_LDADD = $(LDADD) +test_accsadubl_SOURCES = test_accsadubl.c +test_accsadubl_OBJECTS = test_accsadubl.$(OBJEXT) +test_accsadubl_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = abi.c compile_opcodes_sys.c compile_opcodes_sys_c.c \ + compile_opcodes_sys_neon.c compile_parse.c compile_parse_c.c \ + compile_parse_neon.c exec_opcodes_sys.c exec_parse.c \ + generate_opcodes_sys.c generate_xml_table.c \ + generate_xml_table2.c memcpy_speed.c perf_opcodes_sys.c \ + perf_opcodes_sys_compare.c perf_parse.c perf_parse_compare.c \ + show_parse.c test-schro.c test_accsadubl.c +DIST_SOURCES = abi.c compile_opcodes_sys.c compile_opcodes_sys_c.c \ + compile_opcodes_sys_neon.c compile_parse.c compile_parse_c.c \ + compile_parse_neon.c exec_opcodes_sys.c exec_parse.c \ + generate_opcodes_sys.c generate_xml_table.c \ + generate_xml_table2.c memcpy_speed.c perf_opcodes_sys.c \ + perf_opcodes_sys_compare.c perf_parse.c perf_parse_compare.c \ + show_parse.c test-schro.c test_accsadubl.c +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +DIST_SUBDIRS = orcc benchmorc +SUBDIRS = orcc benchmorc +TESTS_ENVIRONMENT = \ + testfile="$(srcdir)/test.orc" + +EXTRA_DIST = test.orc +CLEANFILES = temp-orc-test-* +AM_CFLAGS = $(ORC_CFLAGS) +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu testsuite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +abi$(EXEEXT): $(abi_OBJECTS) $(abi_DEPENDENCIES) + @rm -f abi$(EXEEXT) + $(LINK) $(abi_OBJECTS) $(abi_LDADD) $(LIBS) +compile_opcodes_sys$(EXEEXT): $(compile_opcodes_sys_OBJECTS) $(compile_opcodes_sys_DEPENDENCIES) + @rm -f compile_opcodes_sys$(EXEEXT) + $(LINK) $(compile_opcodes_sys_OBJECTS) $(compile_opcodes_sys_LDADD) $(LIBS) +compile_opcodes_sys_c$(EXEEXT): $(compile_opcodes_sys_c_OBJECTS) $(compile_opcodes_sys_c_DEPENDENCIES) + @rm -f compile_opcodes_sys_c$(EXEEXT) + $(LINK) $(compile_opcodes_sys_c_OBJECTS) $(compile_opcodes_sys_c_LDADD) $(LIBS) +compile_opcodes_sys_neon$(EXEEXT): $(compile_opcodes_sys_neon_OBJECTS) $(compile_opcodes_sys_neon_DEPENDENCIES) + @rm -f compile_opcodes_sys_neon$(EXEEXT) + $(LINK) $(compile_opcodes_sys_neon_OBJECTS) $(compile_opcodes_sys_neon_LDADD) $(LIBS) +compile_parse$(EXEEXT): $(compile_parse_OBJECTS) $(compile_parse_DEPENDENCIES) + @rm -f compile_parse$(EXEEXT) + $(LINK) $(compile_parse_OBJECTS) $(compile_parse_LDADD) $(LIBS) +compile_parse_c$(EXEEXT): $(compile_parse_c_OBJECTS) $(compile_parse_c_DEPENDENCIES) + @rm -f compile_parse_c$(EXEEXT) + $(LINK) $(compile_parse_c_OBJECTS) $(compile_parse_c_LDADD) $(LIBS) +compile_parse_neon$(EXEEXT): $(compile_parse_neon_OBJECTS) $(compile_parse_neon_DEPENDENCIES) + @rm -f compile_parse_neon$(EXEEXT) + $(LINK) $(compile_parse_neon_OBJECTS) $(compile_parse_neon_LDADD) $(LIBS) +exec_opcodes_sys$(EXEEXT): $(exec_opcodes_sys_OBJECTS) $(exec_opcodes_sys_DEPENDENCIES) + @rm -f exec_opcodes_sys$(EXEEXT) + $(LINK) $(exec_opcodes_sys_OBJECTS) $(exec_opcodes_sys_LDADD) $(LIBS) +exec_parse$(EXEEXT): $(exec_parse_OBJECTS) $(exec_parse_DEPENDENCIES) + @rm -f exec_parse$(EXEEXT) + $(LINK) $(exec_parse_OBJECTS) $(exec_parse_LDADD) $(LIBS) +generate_opcodes_sys$(EXEEXT): $(generate_opcodes_sys_OBJECTS) $(generate_opcodes_sys_DEPENDENCIES) + @rm -f generate_opcodes_sys$(EXEEXT) + $(LINK) $(generate_opcodes_sys_OBJECTS) $(generate_opcodes_sys_LDADD) $(LIBS) +generate_xml_table$(EXEEXT): $(generate_xml_table_OBJECTS) $(generate_xml_table_DEPENDENCIES) + @rm -f generate_xml_table$(EXEEXT) + $(LINK) $(generate_xml_table_OBJECTS) $(generate_xml_table_LDADD) $(LIBS) +generate_xml_table2$(EXEEXT): $(generate_xml_table2_OBJECTS) $(generate_xml_table2_DEPENDENCIES) + @rm -f generate_xml_table2$(EXEEXT) + $(LINK) $(generate_xml_table2_OBJECTS) $(generate_xml_table2_LDADD) $(LIBS) +memcpy_speed$(EXEEXT): $(memcpy_speed_OBJECTS) $(memcpy_speed_DEPENDENCIES) + @rm -f memcpy_speed$(EXEEXT) + $(LINK) $(memcpy_speed_OBJECTS) $(memcpy_speed_LDADD) $(LIBS) +perf_opcodes_sys$(EXEEXT): $(perf_opcodes_sys_OBJECTS) $(perf_opcodes_sys_DEPENDENCIES) + @rm -f perf_opcodes_sys$(EXEEXT) + $(LINK) $(perf_opcodes_sys_OBJECTS) $(perf_opcodes_sys_LDADD) $(LIBS) +perf_opcodes_sys_compare$(EXEEXT): $(perf_opcodes_sys_compare_OBJECTS) $(perf_opcodes_sys_compare_DEPENDENCIES) + @rm -f perf_opcodes_sys_compare$(EXEEXT) + $(LINK) $(perf_opcodes_sys_compare_OBJECTS) $(perf_opcodes_sys_compare_LDADD) $(LIBS) +perf_parse$(EXEEXT): $(perf_parse_OBJECTS) $(perf_parse_DEPENDENCIES) + @rm -f perf_parse$(EXEEXT) + $(LINK) $(perf_parse_OBJECTS) $(perf_parse_LDADD) $(LIBS) +perf_parse_compare$(EXEEXT): $(perf_parse_compare_OBJECTS) $(perf_parse_compare_DEPENDENCIES) + @rm -f perf_parse_compare$(EXEEXT) + $(LINK) $(perf_parse_compare_OBJECTS) $(perf_parse_compare_LDADD) $(LIBS) +show_parse$(EXEEXT): $(show_parse_OBJECTS) $(show_parse_DEPENDENCIES) + @rm -f show_parse$(EXEEXT) + $(LINK) $(show_parse_OBJECTS) $(show_parse_LDADD) $(LIBS) +test-schro$(EXEEXT): $(test_schro_OBJECTS) $(test_schro_DEPENDENCIES) + @rm -f test-schro$(EXEEXT) + $(LINK) $(test_schro_OBJECTS) $(test_schro_LDADD) $(LIBS) +test_accsadubl$(EXEEXT): $(test_accsadubl_OBJECTS) $(test_accsadubl_DEPENDENCIES) + @rm -f test_accsadubl$(EXEEXT) + $(LINK) $(test_accsadubl_OBJECTS) $(test_accsadubl_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_opcodes_sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_opcodes_sys_c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_opcodes_sys_neon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_parse_c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile_parse_neon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exec_opcodes_sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exec_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_opcodes_sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_xml_table.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_xml_table2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy_speed.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_opcodes_sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_opcodes_sys_compare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_parse_compare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/show_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-schro.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_accsadubl.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-TESTS check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags ctags-recursive \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/testsuite/abi.c b/testsuite/abi.c new file mode 100644 index 0000000..553c8fa --- /dev/null +++ b/testsuite/abi.c @@ -0,0 +1,33 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + + +int main (int argc, char *argv[]) +{ + long offset; + int expected_offset; + int error = 0; + + offset = ((long) ((unsigned char *) &((OrcProgram*) 0)->code_exec)); + + if (sizeof(void *) == 4) { + expected_offset = 8360; + } else { + expected_offset = 9688; + } + + if (offset != expected_offset) { + printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n", + offset, expected_offset); + error = 1; + } + + return error; +} + diff --git a/testsuite/benchmorc/Makefile.am b/testsuite/benchmorc/Makefile.am new file mode 100644 index 0000000..8bc1152 --- /dev/null +++ b/testsuite/benchmorc/Makefile.am @@ -0,0 +1,6 @@ + +noinst_PROGRAMS = benchmorc + +AM_CFLAGS = $(ORC_CFLAGS) +LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la + diff --git a/testsuite/benchmorc/Makefile.in b/testsuite/benchmorc/Makefile.in new file mode 100644 index 0000000..0130347 --- /dev/null +++ b/testsuite/benchmorc/Makefile.in @@ -0,0 +1,491 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = benchmorc$(EXEEXT) +subdir = testsuite/benchmorc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +benchmorc_SOURCES = benchmorc.c +benchmorc_OBJECTS = benchmorc.$(OBJEXT) +benchmorc_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = benchmorc.c +DIST_SOURCES = benchmorc.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = $(ORC_LIBS) $(top_builddir)/orc-test/liborc-test-@ORC_MAJORMINOR@.la +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = $(ORC_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/benchmorc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu testsuite/benchmorc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +benchmorc$(EXEEXT): $(benchmorc_OBJECTS) $(benchmorc_DEPENDENCIES) + @rm -f benchmorc$(EXEEXT) + $(LINK) $(benchmorc_OBJECTS) $(benchmorc_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchmorc.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/testsuite/benchmorc/benchmorc.c b/testsuite/benchmorc/benchmorc.c new file mode 100644 index 0000000..fc72d91 --- /dev/null +++ b/testsuite/benchmorc/benchmorc.c @@ -0,0 +1,693 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +double weights_ginger[]; +//double weights_preston[]; +double weights_n900[]; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + double sum; + + orc_init (); + orc_test_init (); + + filename = "bench10.orc"; + code = read_file (filename); + if (!code) { + printf("benchmorc needs bench10.orc file in current directory\n"); + exit(1); + } + + n = orc_parse (code, &programs); + +#if 0 + sum = 0; + for(i=0;iname); + } + printf("sum = %g\n", sum); +#else + sum = 0; + for(i=0;i +#include + +#include +#include + + +int error = FALSE; + +void test_opcode (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_init(); + orc_test_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + printf("/* %s %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + printf("/* %s const %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_const (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + printf("/* %s param %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_param (opcode_set->opcodes + i); + } + + if (error) return 1; + return 0; +} + +void +test_opcode (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode (opcode); + if (!p) return; + + ret = orc_test_gcc_compile (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode_const (opcode); + if (!p) return; + + ret = orc_test_gcc_compile (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode_param (opcode); + if (!p) return; + + ret = orc_test_gcc_compile (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + diff --git a/testsuite/compile_opcodes_sys_c.c b/testsuite/compile_opcodes_sys_c.c new file mode 100644 index 0000000..8f88235 --- /dev/null +++ b/testsuite/compile_opcodes_sys_c.c @@ -0,0 +1,124 @@ + +#include "config.h" + +#include +#include + +#include +#include + + +int error = FALSE; +int verbose = FALSE; + +void test_opcode (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_init(); + orc_test_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + if (verbose) printf("/* %s %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode (opcode_set->opcodes + i); + } + + if (error) { + printf("test failed\n"); + return 1; + } else { + printf("test passed\n"); + return 0; + } +} + +void +test_opcode (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcCompileResult result; + const char *s; + + p = orc_test_get_program_for_opcode (opcode); + if (!p) return; + + result = orc_program_compile_for_target (p, orc_target_get_by_name("c")); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + s = orc_program_get_asm_code (p); + if (s != NULL) { + printf("%s\n", s); + } else { + printf("no code\n"); + } + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcCompileResult result; + const char *s; + + p = orc_test_get_program_for_opcode_const (opcode); + if (!p) return; + + result = orc_program_compile_for_target (p, orc_target_get_by_name("c")); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + s = orc_program_get_asm_code (p); + if (s != NULL) { + printf("%s\n", s); + } else { + printf("no code\n"); + } + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcCompileResult result; + const char *s; + + p = orc_test_get_program_for_opcode_param (opcode); + if (!p) return; + + result = orc_program_compile_for_target (p, orc_target_get_by_name("c")); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + s = orc_program_get_asm_code (p); + if (s != NULL) { + printf("%s\n", s); + } else { + printf("no code\n"); + } + error = TRUE; + return; + } + + orc_program_free (p); +} + + + + diff --git a/testsuite/compile_opcodes_sys_neon.c b/testsuite/compile_opcodes_sys_neon.c new file mode 100644 index 0000000..16e92a7 --- /dev/null +++ b/testsuite/compile_opcodes_sys_neon.c @@ -0,0 +1,113 @@ + +#include "config.h" + +#include +#include + +#include +#include + + +int error = FALSE; + +void test_opcode (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_init(); + orc_test_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + printf("/* %s %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + printf("/* %s const %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_const (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + printf("/* %s param %d,%d,%d */\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_param (opcode_set->opcodes + i); + } + + if (error) return 1; + return 0; +} + +void +test_opcode (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode (opcode); + if (!p) return; + + ret = orc_test_gcc_compile_neon (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode_const (opcode); + if (!p) return; + + ret = orc_test_gcc_compile_neon (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + +void +test_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + OrcTestResult ret; + + p = orc_test_get_program_for_opcode_param (opcode); + if (!p) return; + + ret = orc_test_gcc_compile_neon (p); + if (ret == ORC_TEST_FAILED) { + printf("%s", orc_program_get_asm_code (p)); + error = TRUE; + return; + } + + orc_program_free (p); +} + diff --git a/testsuite/compile_parse.c b/testsuite/compile_parse.c new file mode 100644 index 0000000..59b144f --- /dev/null +++ b/testsuite/compile_parse.c @@ -0,0 +1,96 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + if (filename == NULL) { + filename = getenv ("testfile"); + } + if (filename == NULL) { + filename = "test.orc"; + } + code = read_file (filename); + if (!code) { + printf("compile_parse_test \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;iname); + ret = orc_test_gcc_compile (programs[i]); + if (ret == ORC_TEST_FAILED) { + error = TRUE; + } + } + + if (error) return 1; + return 0; +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + diff --git a/testsuite/compile_parse_c.c b/testsuite/compile_parse_c.c new file mode 100644 index 0000000..8862003 --- /dev/null +++ b/testsuite/compile_parse_c.c @@ -0,0 +1,90 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = "test.orc"; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + code = read_file (filename); + if (!code) { + printf("compile_parse_test \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;iname); + ret = orc_test_gcc_compile (programs[i]); + if (ret == ORC_TEST_FAILED) { + error = TRUE; + } + } + + if (error) return 1; + return 0; +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + diff --git a/testsuite/compile_parse_neon.c b/testsuite/compile_parse_neon.c new file mode 100644 index 0000000..730a6e6 --- /dev/null +++ b/testsuite/compile_parse_neon.c @@ -0,0 +1,96 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + if (filename == NULL) { + filename = getenv ("testfile"); + } + if (filename == NULL) { + filename = "test.orc"; + } + code = read_file (filename); + if (!code) { + printf("compile_parse_test \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;iname); + ret = orc_test_gcc_compile_neon (programs[i]); + if (ret == ORC_TEST_FAILED) { + error = TRUE; + } + } + + if (error) return 1; + return 0; +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + diff --git a/testsuite/exec_opcodes_sys.c b/testsuite/exec_opcodes_sys.c new file mode 100644 index 0000000..0a8dec7 --- /dev/null +++ b/testsuite/exec_opcodes_sys.c @@ -0,0 +1,444 @@ + +#include "config.h" + +#include + +#include +#include + + +int error = FALSE; +int verbose = FALSE; + +void test_opcode_src (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); +void test_opcode_inplace (OrcStaticOpcode *opcode); +void test_opcode_src_2d (OrcStaticOpcode *opcode); +void test_opcode_src_const_n (OrcStaticOpcode *opcode); +void test_opcode_src_const_n_2d (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_test_init(); + orc_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s src %d,%d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].dest_size[1], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_src (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s const %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_const (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s param %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_param (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s inplace %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_inplace (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s src 2d %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_src_2d (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s src const n %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_src_const_n (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + if (verbose) printf("%s src const n 2d %d,%d,%d\n", + opcode_set->opcodes[i].name, + opcode_set->opcodes[i].dest_size[0], + opcode_set->opcodes[i].src_size[0], + opcode_set->opcodes[i].src_size[1]); + test_opcode_src_const_n_2d (opcode_set->opcodes + i); + } + + if (error) return 1; + return 0; +} + +void +test_opcode_src (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + if (opcode->src_size[1] == 0) { + return; + } + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[1], 1, "c1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[2], 1, "c2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_const_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + if (opcode->src_size[1] == 0) { + return; + } + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[1], "p1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[2], "p2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_p_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_inplace (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->dest_size[0] != opcode->src_size[0]) return; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR || + opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + return; + } + + p = orc_program_new (); + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[0], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_inplace_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_str (p, opcode->name, "d1", "d1", "s2"); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_2d (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_2d (p); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_const_n (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_constant_n (p, 8); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_const_n_2d (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_2d (p); + orc_program_set_constant_n (p, 8); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("test failed\n"); + error = TRUE; + } + + orc_program_free (p); +} + diff --git a/testsuite/exec_parse.c b/testsuite/exec_parse.c new file mode 100644 index 0000000..17ee569 --- /dev/null +++ b/testsuite/exec_parse.c @@ -0,0 +1,92 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int verbose = FALSE; +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + if (filename == NULL) { + filename = getenv ("testfile"); + } + if (filename == NULL) { + filename = "test.orc"; + } + code = read_file (filename); + if (!code) { + printf("perf_parse \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;iname); + orc_test_compare_output_full (programs[i], 0); + } + + if (error) return 1; + return 0; +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + diff --git a/testsuite/generate_opcodes_sys.c b/testsuite/generate_opcodes_sys.c new file mode 100644 index 0000000..2de7e81 --- /dev/null +++ b/testsuite/generate_opcodes_sys.c @@ -0,0 +1,102 @@ + +#include "config.h" + +#include +#include + +#include +#include + + +int error = FALSE; + +void test_opcode (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + OrcStaticOpcode *opcode; + const char *d1; + + orc_init(); + orc_test_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + opcode = opcode_set->opcodes + i; + + printf(".function emulate_%s\n", opcode->name); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + printf(".accumulator %d a1\n", opcode->dest_size[0]); + d1 = "a1"; + } else { + printf(".dest %d d1\n", opcode->dest_size[0]); + d1 = "d1"; + } + if (opcode->dest_size[1]) { + printf(".dest %d d2\n", opcode->dest_size[1]); + } + printf(".source %d s1\n", opcode->src_size[0]); + if (opcode->src_size[1]) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + printf(".param %d s2\n", opcode->src_size[1]); + } else { + printf(".source %d s2\n", opcode->src_size[1]); + } + } + printf("\n"); + if (opcode->src_size[1]) { + printf("%s %s, s1, s2\n", opcode->name, d1); + } else { + if (opcode->dest_size[1]) { + printf("%s %s, d2, s1\n", opcode->name, d1); + } else { + printf("%s %s, s1\n", opcode->name, d1); + } + } + printf("\n"); + printf("\n"); + + printf(".function emulate_n16_%s\n", opcode->name); + printf(".n 16\n"); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + printf(".accumulator %d a1\n", opcode->dest_size[0]); + d1 = "a1"; + } else { + printf(".dest %d d1\n", opcode->dest_size[0]); + d1 = "d1"; + } + if (opcode->dest_size[1]) { + printf(".dest %d d2\n", opcode->dest_size[1]); + } + printf(".source %d s1\n", opcode->src_size[0]); + if (opcode->src_size[1]) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + printf(".param %d s2\n", opcode->src_size[1]); + } else { + printf(".source %d s2\n", opcode->src_size[1]); + } + } + printf("\n"); + if (opcode->src_size[1]) { + printf("%s %s, s1, s2\n", opcode->name, d1); + } else { + if (opcode->dest_size[1]) { + printf("%s %s, d2, s1\n", opcode->name, d1); + } else { + printf("%s %s, s1\n", opcode->name, d1); + } + } + printf("\n"); + printf("\n"); + } + + if (error) return 1; + return 0; +} + diff --git a/testsuite/generate_xml_table.c b/testsuite/generate_xml_table.c new file mode 100644 index 0000000..fb7fb0c --- /dev/null +++ b/testsuite/generate_xml_table.c @@ -0,0 +1,113 @@ + +#include "config.h" + +#include +#include + +#include +#include + + +int error = FALSE; + +char * test_opcode (OrcStaticOpcode *opcode, OrcTarget *target, + unsigned int target_flags); + +int +main (int argc, char *argv[]) +{ + int i; + int j; + OrcOpcodeSet *opcode_set; + OrcTarget *targets[10]; + unsigned int target_flags[10]; + int n_targets; + + orc_init(); + orc_test_init(); + + targets[0] = orc_target_get_by_name("sse"); + target_flags[0] = orc_target_get_default_flags(targets[0]); + + targets[1] = orc_target_get_by_name("mmx"); + target_flags[1] = orc_target_get_default_flags(targets[1]); + + targets[2] = orc_target_get_by_name("altivec"); + target_flags[2] = orc_target_get_default_flags(targets[2]); + + targets[3] = orc_target_get_by_name("arm"); + target_flags[3] = orc_target_get_default_flags(targets[3]); + + targets[4] = orc_target_get_by_name("neon"); + target_flags[4] = orc_target_get_default_flags(targets[4]); + + targets[5] = orc_target_get_by_name("c64x-c"); + target_flags[5] = orc_target_get_default_flags(targets[5]); + + n_targets=6; + + printf( +"\n" +"Table of Opcode Rule Coverage\n" +"\n" +"\n" +"\n" +"opcode name\n", n_targets+1); + for(j=0;j%s\n", + orc_target_get_name(targets[j])); + } + printf( +"\n" +"\n" +"\n"); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + printf("\n"); + printf("%s\n", opcode_set->opcodes[i].name); + for(j=0;j%s\n", + test_opcode (opcode_set->opcodes + i, targets[j], target_flags[j])); + } + printf("\n"); + } + printf( +"\n" +"\n" +"
\n"); + + return 0; +} + +char * +test_opcode (OrcStaticOpcode *opcode, OrcTarget *target, + unsigned int target_flags) +{ + OrcProgram *p; + OrcCompileResult ret; + + p = orc_test_get_program_for_opcode (opcode); + if (p) { + ret = orc_program_compile_full (p, target, target_flags); + orc_program_free (p); + + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(ret)) { + return "yes"; + } + } + + p = orc_test_get_program_for_opcode_const (opcode); + if (p) { + ret = orc_program_compile_full (p, target, target_flags); + orc_program_free (p); + + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(ret)) { + return "yes"; + } + } + + return "no"; +} + diff --git a/testsuite/generate_xml_table2.c b/testsuite/generate_xml_table2.c new file mode 100644 index 0000000..750d840 --- /dev/null +++ b/testsuite/generate_xml_table2.c @@ -0,0 +1,288 @@ + +#include "config.h" + +#include +#include +#include + +#include +#include + + +int error = FALSE; + +char * get_desc (OrcStaticOpcode *opcode); +char * get_code (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + OrcTarget *targets[10]; + unsigned int target_flags[10]; + int n_targets; + + orc_init(); + orc_test_init(); + + targets[0] = orc_target_get_by_name("sse"); + target_flags[0] = orc_target_get_default_flags(targets[0]); + + targets[1] = orc_target_get_by_name("mmx"); + target_flags[1] = orc_target_get_default_flags(targets[1]); + + targets[2] = orc_target_get_by_name("altivec"); + target_flags[2] = orc_target_get_default_flags(targets[2]); + + targets[3] = orc_target_get_by_name("arm"); + target_flags[3] = orc_target_get_default_flags(targets[3]); + + targets[4] = orc_target_get_by_name("c64x-c"); + target_flags[4] = orc_target_get_default_flags(targets[4]); + + n_targets=5; + + printf( +"\n" +"Table of Opcodes\n" +"\n" +"\n" +"\n" +"opcode\n" +"destination size\n" +"source 1 size\n" +"source 2 size\n" +"description\n" +"pseudo code\n" +"\n" +"\n" +"\n"); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + printf("\n"); + printf("%s\n", opcode_set->opcodes[i].name); + printf("%d\n", opcode_set->opcodes[i].dest_size[0]); + printf("%d\n", opcode_set->opcodes[i].src_size[0]); + if (opcode_set->opcodes[i].src_size[1]) { + printf("%d%s\n", opcode_set->opcodes[i].src_size[1], + (opcode_set->opcodes[i].flags & ORC_STATIC_OPCODE_SCALAR) ? "S" : ""); + } else { + printf("\n"); + } + printf("%s\n", get_desc(&opcode_set->opcodes[i])); + printf("%s\n", get_code(&opcode_set->opcodes[i])); + printf("\n"); + } + printf( +"\n" +"\n" +"
\n"); + + return 0; +} + +struct a { + char *name; + char *code; + char *desc; +}; + +struct a ops[] = { + { "absb", "(a < 0) ? -a : a", "absolute value" }, + { "addb", "a + b", "add" }, + { "addssb", "clamp(a + b)", "add with signed saturate" }, + { "addusb", "clamp(a + b)", "add with unsigned saturate" }, + { "andb", "a & b", "bitwise AND" }, + { "andnb", "a & (~b)", "bitwise AND NOT" }, + { "avgsb", "(a + b + 1)>>1", "signed average" }, + { "avgub", "(a + b + 1)>>1", "unsigned average" }, + { "cmpeqb", "(a == b) ? (~0) : 0", "compare equal" }, + { "cmpgtsb", "(a > b) ? (~0) : 0", "compare greater than" }, + { "copyb", "a", "copy" }, + { "maxsb", "(a > b) ? a : b", "signed maximum" }, + { "maxub", "(a > b) ? a : b", "unsigned maximum" }, + { "minsb", "(a < b) ? a : b", "signed minimum" }, + { "minub", "(a < b) ? a : b", "unsigned minimum" }, + { "mullb", "a * b", "low bits of multiply" }, + { "mulhsb", "(a * b) >> 8", "high bits of signed multiply" }, + { "mulhub", "(a * b) >> 8", "high bits of unsigned multiply" }, + { "orb", "a | b", "bitwise or" }, + { "shlb", "a << b", "shift left" }, + { "shrsb", "a >> b", "signed shift right" }, + { "shrub", "a >> b", "unsigned shift right" }, + { "signb", "sign(a)", "sign" }, + { "subb", "a - b", "subtract" }, + { "subssb", "clamp(a - b)", "subtract with signed saturate" }, + { "subusb", "clamp(a - b)", "subtract with unsigned saturate" }, + { "xorb", "a ^ b", "bitwise XOR" }, + + { "absw", "(a < 0) ? -a : a", "absolute value" }, + { "addw", "a + b", "add" }, + { "addssw", "clamp(a + b)", "add with signed saturate" }, + { "addusw", "clamp(a + b)", "add with unsigned saturate" }, + { "andw", "a & b", "bitwise AND" }, + { "andnw", "a & (~b)", "bitwise AND NOT" }, + { "avgsw", "(a + b + 1)>>1", "signed average" }, + { "avguw", "(a + b + 1)>>1", "unsigned average" }, + { "cmpeqw", "(a == b) ? (~0) : 0", "compare equal" }, + { "cmpgtsw", "(a > b) ? (~0) : 0", "compare greater than" }, + { "copyw", "a", "copy" }, + { "maxsw", "(a > b) ? a : b", "signed maximum" }, + { "maxuw", "(a > b) ? a : b", "unsigned maximum" }, + { "minsw", "(a < b) ? a : b", "signed minimum" }, + { "minuw", "(a < b) ? a : b", "unsigned minimum" }, + { "mullw", "a * b", "low bits of multiply" }, + { "mulhsw", "(a * b) >> 8", "high bits of signed multiply" }, + { "mulhuw", "(a * b) >> 8", "high bits of unsigned multiply" }, + { "orw", "a | b", "bitwise or" }, + { "shlw", "a << b", "shift left" }, + { "shrsw", "a >> b", "signed shift right" }, + { "shruw", "a >> b", "unsigned shift right" }, + { "signw", "sign(a)", "sign" }, + { "subw", "a - b", "subtract" }, + { "subssw", "clamp(a - b)", "subtract with signed saturate" }, + { "subusw", "clamp(a - b)", "subtract with unsigned saturate" }, + { "xorw", "a ^ b", "bitwise XOR" }, + + { "absl", "(a < 0) ? -a : a", "absolute value" }, + { "addl", "a + b", "add" }, + { "addssl", "clamp(a + b)", "add with signed saturate" }, + { "addusl", "clamp(a + b)", "add with unsigned saturate" }, + { "andl", "a & b", "bitwise AND" }, + { "andnl", "a & (~b)", "bitwise AND NOT" }, + { "avgsl", "(a + b + 1)>>1", "signed average" }, + { "avgul", "(a + b + 1)>>1", "unsigned average" }, + { "cmpeql", "(a == b) ? (~0) : 0", "compare equal" }, + { "cmpgtsl", "(a > b) ? (~0) : 0", "compare greater than" }, + { "copyl", "a", "copy" }, + { "maxsl", "(a > b) ? a : b", "signed maximum" }, + { "maxul", "(a > b) ? a : b", "unsigned maximum" }, + { "minsl", "(a < b) ? a : b", "signed minimum" }, + { "minul", "(a < b) ? a : b", "unsigned minimum" }, + { "mulll", "a * b", "low bits of multiply" }, + { "mulhsl", "(a * b) >> 16", "high bits of signed multiply" }, + { "mulhul", "(a * b) >> 16", "high bits of unsigned multiply" }, + { "orl", "a | b", "bitwise or" }, + { "shll", "a << b", "shift left" }, + { "shrsl", "a >> b", "signed shift right" }, + { "shrul", "a >> b", "unsigned shift right" }, + { "signl", "sign(a)", "sign" }, + { "subl", "a - b", "subtract" }, + { "subssl", "clamp(a - b)", "subtract with signed saturate" }, + { "subusl", "clamp(a - b)", "subtract with unsigned saturate" }, + { "xorl", "a ^ b", "bitwise XOR" }, + + { "convsbw", "a", "convert signed" }, + { "convubw", "a", "convert unsigned" }, + { "convswl", "a", "convert signed" }, + { "convuwl", "a", "convert unsigned" }, + { "convwb", "a", "convert" }, + { "convssswb", "clamp(a)", "convert signed to signed with saturation" }, + { "convsuswb", "clamp(a)", "convert signed to unsigned with saturation" }, + { "convusswb", "clamp(a)", "convert unsigned to signed with saturation" }, + { "convuuswb", "clamp(a)", "convert unsigned to unsigned with saturation" }, + { "convlw", "a", "convert" }, + { "convssslw", "clamp(a)", "convert signed to signed with saturation" }, + { "convsuslw", "clamp(a)", "convert signed to unsigned with saturation" }, + { "convusslw", "clamp(a)", "convert unsigned to signed with saturation" }, + { "convuuslw", "clamp(a)", "convert unsigned to unsigned with saturation" }, + { "mulsbw", "a * b", "multiply signed" }, + { "mulubw", "a * b", "multiply unsigned" }, + { "mulswl", "a * b", "multiply signed" }, + { "muluwl", "a * b", "multiply unsigned" }, + { "mergewl", "special", "merge halves" }, + { "mergebw", "special", "merge halves" }, + { "select0wb", "special", "select first half" }, + { "select1wb", "special", "select second half" }, + { "select0lw", "special", "select first half" }, + { "select1lw", "special", "select second half" }, + { "swapw", "special", "endianness swap" }, + { "swapl", "special", "endianness swap" }, + + { "accw", "+= a", "accumulate" }, + { "accl", "+= a", "accumulate" }, + { "accsadubl", "+= abs(a - b)", "accumulate absolute difference" }, + + { "splitlw" , "special", "split first/second words" }, + { "splitwb" , "special", "split first/second bytes" }, + { "addf", "a + b", "add" }, + { "subf", "a - b", "subtract" }, + { "mulf", "a * b", "multiply" }, + { "divf", "a / b", "divide" }, + { "sqrtf", "sqrt(a)", "square root" }, + { "maxf", "max(a,b)", "maximum" }, + { "minf", "min(a,b)", "minimum" }, + { "cmpeqf", "(a == b) ? (~0) : 0", "compare equal" }, + { "cmpltf", "(a == b) ? (~0) : 0", "compare less than" }, + { "cmplef", "(a == b) ? (~0) : 0", "compare less than or equal" }, + { "convfl", "a", "convert float point to integer" }, + { "convlf", "a", "convert integer to floating point" }, + + { "loadb", "array[i]", "load from memory" }, + { "loadw", "array[i]", "load from memory" }, + { "loadl", "array[i]", "load from memory" }, + { "loadq", "array[i]", "load from memory" }, + { "storeb", "special", "store to memory" }, + { "storew", "special", "store to memory" }, + { "storel", "special", "store to memory" }, + { "storeq", "special", "store to memory" }, + { "loadoffb", "array[i+offset]", "load from memory with offset" }, + { "loadoffw", "array[i+offset]", "load from memory with offset" }, + { "loadoffl", "array[i+offset]", "load from memory with offset" }, + { "loadoffq", "array[i+offset]", "load from memory with offset" }, + { "loadpb", "scalar", "load parameter or constant" }, + { "loadpw", "scalar", "load parameter or constant" }, + { "loadpl", "scalar", "load parameter or constant" }, + { "loadpq", "scalar", "load parameter or constant" }, + { "loadupdb", "array[i>>1]", "load upsampled duplicate" }, + { "loadupib", "(array[i>>1] + array[(i+1)>>1] + 1)>>1", + "load upsampled interpolate" }, + { "ldresnearb", "array[(b+c*i)>>8]", "load, nearest neighbor resampled" }, + { "ldreslinb", "special", "load, bilinear resampled" }, + { "ldresnearl", "array[(b+c*i)>>8]", "load, nearest neighbor resampled" }, + { "ldreslinl", "special", "load, bilinear resampled" }, + { "div255w", "a/255", "divide by 255" }, + { "divluw", "clamp(a/(b & 255),0,255)", "saturated unsigned divide 16-bit by 8-bit" }, + { "splatw3q", "special", "duplicates high 16-bits to lower 48 bits" }, + { "splatbw", "special", "duplicates 8 bits to both halfs of 16 bits" }, + { "splatbl", "special", "duplicates 8 bits to all parts of 32 bits" }, + { "convql", "a", "convert" }, + { "convslq", "a", "signed convert" }, + { "convulq", "a", "unsigned convert" }, + { "convhwb", "a>>8", "shift and convert" }, + { "convhlw", "a>>16", "shift and convert" }, + { "convsssql", "clamp(a)", "convert signed to signed with saturation" }, + { "convsusql", "clamp(a)", "convert signed to unsigned with saturation" }, + { "convussql", "clamp(a)", "convert unsigned to signed with saturation" }, + { "convuusql", "clamp(a)", "convert unsigned to unsigned with saturation" }, + +}; + + +char * +get_desc (OrcStaticOpcode *opcode) +{ + int i; + for(i=0;iname, ops[i].name) == 0) { + return ops[i].desc; + } + } + return ""; +} + +char * +get_code (OrcStaticOpcode *opcode) +{ + int i; + for(i=0;iname, ops[i].name) == 0) { + return ops[i].code; + } + } + return ""; +} + diff --git a/testsuite/memcpy_speed.c b/testsuite/memcpy_speed.c new file mode 100644 index 0000000..25f96a9 --- /dev/null +++ b/testsuite/memcpy_speed.c @@ -0,0 +1,174 @@ + +#include +#include +#include +#include + +#define ORC_ENABLE_UNSTABLE_API + +#include +#include +#include + + +#define ALIGN(ptr,n) ((void *)((unsigned long)(ptr) & (~(unsigned long)(n-1)))) + +int hot_src = TRUE; +int hot_dest = TRUE; +int flush_cache = FALSE; + + +void +touch (unsigned char *ptr, int n) +{ + static int sum; + int i; + for(i=0;i 1) { + unalign = strtoul (argv[1], NULL, 0); + } else { + unalign = 0; + } + + s = malloc(1024*1024*64+1024); + d = malloc(1024*1024*64+1024); + src = ORC_PTR_OFFSET(ALIGN(s,128),unalign); + dest = ALIGN(d,128); + + orc_profile_init (&prof); + for(j=0;j<10;j++){ + orc_profile_start(&prof); + orc_profile_stop(&prof); + } + orc_profile_get_ave_std (&prof, &null, &std); + + { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_memcpy"); + //orc_program_set_name (p, "orc_memset"); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + //orc_program_add_parameter (p, 1, "p1"); + + orc_program_append (p, "copyb", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + +#ifndef M_LN2 +#define M_LN2 0.69314718055994530942 +#endif + orc_get_data_cache_sizes (&level1, &level2, &level3); + if (level3 > 0) { + max = (log(level3)/M_LN2 - 6.0) * 10 + 20; + } else if (level3 > 0) { + max = (log(level2)/M_LN2 - 6.0) * 10 + 20; + } else { + max = 140; + } + + for(i=0;iprogram = p; + ex->n = size; + ex->arrays[ORC_VAR_D1] = dest; + ex->arrays[ORC_VAR_S1] = (void *)src; + + func = p->code_exec; + func (ex); + + orc_profile_stop(&prof); + if (flush_cache) { + touch (src, (1<<18)); + } + if (hot_src) { + touch (src, size); + } + if (hot_dest) { + touch (dest, size); + } + } + + orc_profile_init (&prof_libc); + for(j=0;j<10;j++){ + orc_profile_start(&prof_libc); + memcpy (dest, src, size); + orc_profile_stop(&prof_libc); + if (flush_cache) { + touch (src, (1<<18)); + } + if (hot_src) { + touch (src, size); + } + if (hot_dest) { + touch (dest, size); + } + } + + orc_profile_get_ave_std (&prof, &ave, &std); + orc_profile_get_ave_std (&prof_libc, &ave_libc, &std_libc); + + ave -= null + 65 + 20; + ave_libc -= null + 40; + + //printf("%d: %10.4g %10.4g %10.4g %10.4g (libc %10.4g)\n", i, ave, std, + // ave/(1< +#include +#include +#include +#include +#include +#include + +#ifndef _ORC_INTEGER_TYPEDEFS_ +#define _ORC_INTEGER_TYPEDEFS_ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +typedef int8_t orc_int8; +typedef int16_t orc_int16; +typedef int32_t orc_int32; +typedef int64_t orc_int64; +typedef uint8_t orc_uint8; +typedef uint16_t orc_uint16; +typedef uint32_t orc_uint32; +typedef uint64_t orc_uint64; +#define ORC_UINT64_C(x) UINT64_C(x) +#elif defined(_MSC_VER) +typedef signed __int8 orc_int8; +typedef signed __int16 orc_int16; +typedef signed __int32 orc_int32; +typedef signed __int64 orc_int64; +typedef unsigned __int8 orc_uint8; +typedef unsigned __int16 orc_uint16; +typedef unsigned __int32 orc_uint32; +typedef unsigned __int64 orc_uint64; +#define ORC_UINT64_C(x) (x##Ui64) +#else +#include +typedef signed char orc_int8; +typedef short orc_int16; +typedef int orc_int32; +typedef unsigned char orc_uint8; +typedef unsigned short orc_uint16; +typedef unsigned int orc_uint32; +#if INT_MAX == LONG_MAX +typedef long long orc_int64; +typedef unsigned long long orc_uint64; +#define ORC_UINT64_C(x) (x##ULL) +#else +typedef long orc_int64; +typedef unsigned long orc_uint64; +#define ORC_UINT64_C(x) (x##UL) +#endif +#endif +typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; +typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; +typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; +#endif + +/* begin Orc C target preamble */ +#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) +#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) +#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) +#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b)) +#define ORC_SB_MAX 127 +#define ORC_SB_MIN (-1-ORC_SB_MAX) +#define ORC_UB_MAX 255 +#define ORC_UB_MIN 0 +#define ORC_SW_MAX 32767 +#define ORC_SW_MIN (-1-ORC_SW_MAX) +#define ORC_UW_MAX 65535 +#define ORC_UW_MIN 0 +#define ORC_SL_MAX 2147483647 +#define ORC_SL_MIN (-1-ORC_SL_MAX) +#define ORC_UL_MAX 4294967295U +#define ORC_UL_MIN 0 +#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX) +#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX) +#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX) +#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX) +#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX) +#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX) +#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8)) +#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24)) +#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56)) +#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) +#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff)) +#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0)) +#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff))) +#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0)) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define ORC_RESTRICT restrict +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define ORC_RESTRICT __restrict__ +#else +#define ORC_RESTRICT +#endif +/* end Orc C target preamble */ + + +/* orc_add2_rshift_add_s16_22_op */ +static void +_backup_orc_add2_rshift_add_s16_22_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +/* orc_add2_rshift_add_s16_22 */ +static void +_backup_orc_add2_rshift_add_s16_22 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +/* orc_add2_rshift_sub_s16_22_op */ +static void +_backup_orc_add2_rshift_sub_s16_22_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +/* orc_add2_rshift_sub_s16_22 */ +static void +_backup_orc_add2_rshift_sub_s16_22 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +/* orc_add2_rshift_add_s16_11_op */ +static void +_backup_orc_add2_rshift_add_s16_11_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_add2_rshift_add_s16_11 */ +static void +_backup_orc_add2_rshift_add_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_add2_rshift_sub_s16_11_op */ +static void +_backup_orc_add2_rshift_sub_s16_11_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_add2_rshift_sub_s16_11 */ +static void +_backup_orc_add2_rshift_sub_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_add_const_rshift_s16_11 */ +static void +_backup_orc_add_const_rshift_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 1; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_add_const_rshift_s16 */ +static void +_backup_orc_add_const_rshift_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 1: loadpw */ + var34.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> ex->params[25]; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_add_s16 */ +static void +_backup_orc_add_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +/* orc_add_s16_2d */ +static void +_backup_orc_add_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + } + +} + +/* orc_addc_rshift_s16 */ +static void +_backup_orc_addc_rshift_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> ex->params[24]; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_lshift1_s16 */ +static void +_backup_orc_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 1; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_lshift2_s16 */ +static void +_backup_orc_lshift2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 2; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_lshift_s16_ip */ +static void +_backup_orc_lshift_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: shlw */ + var33.i = var32.i << ex->params[24]; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_mas2_add_s16_op */ +static void +_backup_orc_mas2_add_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +/* orc_mas2_add_s16_ip */ +static void +_backup_orc_mas2_add_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +/* orc_mas2_sub_s16_op */ +static void +_backup_orc_mas2_sub_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +/* orc_mas2_sub_s16_ip */ +static void +_backup_orc_mas2_sub_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +/* orc_mas4_across_add_s16_1991_op */ +static void +_backup_orc_mas4_across_add_s16_1991_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + ptr8 = (orc_union16 *)ex->arrays[8]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +/* orc_mas4_across_add_s16_1991_ip */ +static void +_backup_orc_mas4_across_add_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +/* orc_mas4_across_sub_s16_1991_op */ +static void +_backup_orc_mas4_across_sub_s16_1991_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + ptr8 = (orc_union16 *)ex->arrays[8]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +/* orc_mas4_across_sub_s16_1991_ip */ +static void +_backup_orc_mas4_across_sub_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +/* orc_subtract_s16 */ +static void +_backup_orc_subtract_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +/* orc_add_s16_u8 */ +static void +_backup_orc_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: addw */ + var35.i = var36.i + var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_add_s16_u8_2d */ +static void +_backup_orc_add_s16_u8_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr0[i]; + /* 3: addw */ + var35.i = var34.i + var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +/* orc_convert_s16_u8 */ +static void +_backup_orc_convert_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: convubw */ + var33.i = (orc_uint8)var32; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_convert_u8_s16 */ +static void +_backup_orc_convert_u8_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convsuswb */ + var33 = ORC_CLAMP_UB(var32.i); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +/* orc_offsetconvert_u8_s16 */ +static void +_backup_orc_offsetconvert_u8_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_int8 var35; + orc_union16 var36; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: convsuswb */ + var35 = ORC_CLAMP_UB(var36.i); + /* 4: storeb */ + ptr0[i] = var35; + } + +} + +/* orc_offsetconvert_s16_u8 */ +static void +_backup_orc_offsetconvert_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + /* 2: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 3: subw */ + var35.i = var36.i - var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_subtract_s16_u8 */ +static void +_backup_orc_subtract_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: subw */ + var35.i = var34.i - var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_multiply_and_add_s16_u8 */ +static void +_backup_orc_multiply_and_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: mullw */ + var38.i = (var37.i * var34.i) & 0xffff; + /* 4: loadw */ + var35 = ptr0[i]; + /* 5: addw */ + var36.i = var35.i + var38.i; + /* 6: storew */ + ptr0[i] = var36; + } + +} + +/* orc_splat_s16_ns */ +static void +_backup_orc_splat_s16_ns (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_splat_s16_2d_4xn */ +static void +_backup_orc_splat_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 4; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +/* orc_splat_s16_2d_8xn */ +static void +_backup_orc_splat_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +/* orc_splat_s16_2d */ +static void +_backup_orc_splat_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +/* orc_splat_u8_ns */ +static void +_backup_orc_splat_u8_ns (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + + /* 0: loadpb */ + var32 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +/* orc_splat_u8_2d */ +static void +_backup_orc_splat_u8_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpb */ + var32 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + } + +} + +/* orc_average_u8 */ +static void +_backup_orc_average_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_rrshift6_add_s16_2d */ +static void +_backup_orc_rrshift6_add_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 1: loadpw */ + var34.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var37.i = var33.i + var34.i; + /* 3: shrsw */ + var38.i = var37.i >> 6; + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: addw */ + var39.i = var35.i + var38.i; + /* 6: convsuswb */ + var36 = ORC_CLAMP_UB(var39.i); + /* 7: storeb */ + ptr0[i] = var36; + } + } + +} + +/* orc_rrshift6_sub_s16_2d */ +static void +_backup_orc_rrshift6_sub_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr1 = ORC_PTR_OFFSET(ex->arrays[1], ex->params[1] * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr1[i]; + /* 2: subw */ + var38.i = var33.i - var34.i; + /* 3: shrsw */ + var39.i = var38.i >> 6; + /* 4: copyw */ + var35.i = var39.i; + /* 5: storew */ + ptr1[i] = var35; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var39.i; + /* 8: storew */ + ptr0[i] = var37; + } + } + +} + +/* orc_rrshift6_s16_ip_2d */ +static void +_backup_orc_rrshift6_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +/* orc_rrshift6_s16_ip */ +static void +_backup_orc_rrshift6_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +/* orc_unpack_yuyv_y */ +static void +_backup_orc_unpack_yuyv_y (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select0wb */ + var33 = (orc_uint16)var32.i & 0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +/* orc_unpack_yuyv_u */ +static void +_backup_orc_unpack_yuyv_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_unpack_yuyv_v */ +static void +_backup_orc_unpack_yuyv_v (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_packyuyv */ +static void +_backup_orc_packyuyv (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union32 var40; + orc_union16 var41; + orc_int8 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var37 = ptr4[i]; + /* 1: copyw */ + var41.i = var37.i; + /* 2: select0wb */ + var42 = (orc_uint16)var41.i & 0xff; + /* 3: select1wb */ + var43 = ((orc_uint16)var41.i >> 8)&0xff; + /* 4: loadb */ + var38 = ptr5[i]; + /* 5: mergebw */ + var44.i = ((orc_uint8)var42 & 0x00ff) | ((orc_uint8)var38 << 8); + /* 6: loadb */ + var39 = ptr6[i]; + /* 7: mergebw */ + var45.i = ((orc_uint8)var43 & 0x00ff) | ((orc_uint8)var39 << 8); + /* 8: mergewl */ + var40.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 9: storel */ + ptr0[i] = var40; + } + +} + +/* orc_unpack_uyvy_y */ +static void +_backup_orc_unpack_uyvy_y (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select1wb */ + var33 = ((orc_uint16)var32.i >> 8)&0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +/* orc_unpack_uyvy_u */ +static void +_backup_orc_unpack_uyvy_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_unpack_uyvy_v */ +static void +_backup_orc_unpack_uyvy_v (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_interleave2_s16 */ +static void +_backup_orc_interleave2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mergewl */ + var34.i = ((orc_uint16)var32.i & 0x0000ffff) | ((orc_uint16)var33.i << 16); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +/* orc_interleave2_rrshift1_s16 */ +static void +_backup_orc_interleave2_rrshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 1: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 5: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 2: addw */ + var39.i = var34.i + var35.i; + /* 3: shrsw */ + var40.i = var39.i >> 1; + /* 4: loadw */ + var36 = ptr5[i]; + /* 6: addw */ + var41.i = var36.i + var37.i; + /* 7: shrsw */ + var42.i = var41.i >> 1; + /* 8: mergewl */ + var38.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var42.i << 16); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +/* orc_deinterleave2_s16 */ +static void +_backup_orc_deinterleave2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: copyl */ + var36.i = var33.i; + /* 2: select0lw */ + var34.i = (orc_uint32)var36.i & 0xffff; + /* 3: storew */ + ptr0[i] = var34; + /* 4: select1lw */ + var35.i = ((orc_uint32)var36.i >> 16)&0xffff; + /* 5: storew */ + ptr1[i] = var35; + } + +} + +/* orc_deinterleave2_lshift1_s16 */ +static void +_backup_orc_deinterleave2_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var38.i = var35.i; + /* 2: select0lw */ + var39.i = (orc_uint32)var38.i & 0xffff; + /* 3: shlw */ + var36.i = var39.i << 1; + /* 4: storew */ + ptr0[i] = var36; + /* 5: select1lw */ + var40.i = ((orc_uint32)var38.i >> 16)&0xffff; + /* 6: shlw */ + var37.i = var40.i << 1; + /* 7: storew */ + ptr1[i] = var37; + } + +} + +/* orc_haar_deint_lshift1_split_s16 */ +static void +_backup_orc_haar_deint_lshift1_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 9: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: shlw */ + var42.i = var40.i << 1; + /* 5: shlw */ + var43.i = var41.i << 1; + /* 6: subw */ + var44.i = var43.i - var42.i; + /* 7: copyw */ + var36.i = var44.i; + /* 8: storew */ + ptr1[i] = var36; + /* 10: avgsw */ + var45.i = (var44.i + var37.i + 1)>>1; + /* 11: addw */ + var38.i = var42.i + var45.i; + /* 12: storew */ + ptr0[i] = var38; + } + +} + +/* orc_haar_deint_split_s16 */ +static void +_backup_orc_haar_deint_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: subw */ + var42.i = var41.i - var40.i; + /* 5: copyw */ + var36.i = var42.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var43.i = (var42.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var40.i + var43.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +/* orc_haar_split_s16_lo */ +static void +_backup_orc_haar_split_s16_lo (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var39.i = var35.i - var38.i; + /* 5: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 6: addw */ + var37.i = var38.i + var40.i; + /* 7: storew */ + ptr0[i] = var37; + } + +} + +/* orc_haar_split_s16_hi */ +static void +_backup_orc_haar_split_s16_hi (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr5[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +/* orc_haar_split_s16_op */ +static void +_backup_orc_haar_split_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 6: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var40.i = var35.i - var39.i; + /* 4: copyw */ + var36.i = var40.i; + /* 5: storew */ + ptr1[i] = var36; + /* 7: avgsw */ + var41.i = (var40.i + var37.i + 1)>>1; + /* 8: addw */ + var38.i = var39.i + var41.i; + /* 9: storew */ + ptr0[i] = var38; + } + +} + +/* orc_haar_split_s16 */ +static void +_backup_orc_haar_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr1[i]; + /* 3: copyw */ + var40.i = var35.i; + /* 4: subw */ + var41.i = var40.i - var39.i; + /* 5: copyw */ + var36.i = var41.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var39.i + var42.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +/* orc_haar_synth_s16_lo */ +static void +_backup_orc_haar_synth_s16_lo (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_haar_synth_s16_hi */ +static void +_backup_orc_haar_synth_s16_hi (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var39.i = var35.i; + /* 3: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var41.i = var37.i - var40.i; + /* 6: addw */ + var38.i = var39.i + var41.i; + /* 7: storew */ + ptr0[i] = var38; + } + +} + +/* orc_haar_synth_s16_op */ +static void +_backup_orc_haar_synth_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 3: avgsw */ + var41.i = (var40.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var42.i = var37.i - var41.i; + /* 6: copyw */ + var38.i = var42.i; + /* 7: storew */ + ptr0[i] = var38; + /* 8: addw */ + var39.i = var40.i + var42.i; + /* 9: storew */ + ptr1[i] = var39; + } + +} + +/* orc_haar_synth_s16 */ +static void +_backup_orc_haar_synth_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 4: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr0[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 2: loadw */ + var36 = ptr1[i]; + /* 3: copyw */ + var41.i = var36.i; + /* 5: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 6: subw */ + var43.i = var40.i - var42.i; + /* 7: copyw */ + var38.i = var43.i; + /* 8: storew */ + ptr0[i] = var38; + /* 9: addw */ + var39.i = var41.i + var43.i; + /* 10: storew */ + ptr1[i] = var39; + } + +} + +/* orc_haar_synth_rrshift1_int_s16 */ +static void +_backup_orc_haar_synth_rrshift1_int_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + /* 9: loadpw */ + var38.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 3: avgsw */ + var41.i = (var40.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var42.i = var36.i - var41.i; + /* 6: addw */ + var43.i = var40.i + var42.i; + /* 8: avgsw */ + var44.i = (var42.i + var37.i + 1)>>1; + /* 10: avgsw */ + var45.i = (var43.i + var38.i + 1)>>1; + /* 11: mergewl */ + var39.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 12: storel */ + ptr0[i] = var39; + } + +} + +/* orc_haar_synth_int_s16 */ +static void +_backup_orc_haar_synth_int_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 3: avgsw */ + var39.i = (var38.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var40.i = var36.i - var39.i; + /* 6: addw */ + var41.i = var38.i + var40.i; + /* 7: mergewl */ + var37.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var41.i << 16); + /* 8: storel */ + ptr0[i] = var37; + } + +} + +/* orc_haar_sub_s16 */ +static void +_backup_orc_haar_sub_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +/* orc_haar_add_half_s16 */ +static void +_backup_orc_haar_add_half_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_haar_add_s16 */ +static void +_backup_orc_haar_add_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +/* orc_haar_sub_half_s16 */ +static void +_backup_orc_haar_sub_half_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +/* orc_sum_u8 */ +static void +_backup_orc_sum_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_int8 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_int8 var34; + orc_union16 var35; + orc_union32 var36; + + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var35.i = (orc_uint8)var34; + /* 2: convuwl */ + var36.i = (orc_uint16)var35.i; + /* 3: accl */ + var12.i = var12.i + var36.i; + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sum_s16 */ +static void +_backup_orc_sum_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var33; + orc_union32 var34; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: convswl */ + var34.i = var33.i; + /* 2: accl */ + var12.i = var12.i + var34.i; + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sum_square_diff_u8 */ +static void +_backup_orc_sum_square_diff_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr5[i]; + /* 3: convubw */ + var38.i = (orc_uint8)var36; + /* 4: subw */ + var39.i = var37.i - var38.i; + /* 5: mullw */ + var40.i = (var39.i * var39.i) & 0xffff; + /* 6: convuwl */ + var41.i = (orc_uint16)var40.i; + /* 7: accl */ + var12.i = var12.i + var41.i; + } + ex->accumulators[0] = var12.i; + +} + +/* orc_dequantise_s16_2d_4xn */ +static void +_backup_orc_dequantise_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 4; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +/* orc_dequantise_s16_2d_8xn */ +static void +_backup_orc_dequantise_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +/* orc_dequantise_s16_ip_2d_8xn */ +static void +_backup_orc_dequantise_s16_ip_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +/* orc_dequantise_s16_ip_2d */ +static void +_backup_orc_dequantise_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +/* orc_dequantise_s16_ip */ +static void +_backup_orc_dequantise_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +/* orc_dequantise_s16 */ +static void +_backup_orc_dequantise_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +/* orc_dequantise_var_s16_ip */ +static void +_backup_orc_dequantise_var_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 6: loadw */ + var36 = ptr5[i]; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +/* orc_quantise1_s16 */ +static void +_backup_orc_quantise1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 7: loadpw */ + var36.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: shlw */ + var41.i = var40.i << 2; + /* 6: subw */ + var42.i = var41.i - var35.i; + /* 8: mulhuw */ + var43.i = ((orc_uint32)((orc_uint16)var42.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var44.i = ((orc_uint16)var43.i) >> ex->params[26]; + /* 10: mullw */ + var37.i = (var44.i * var39.i) & 0xffff; + /* 11: storew */ + ptr0[i] = var37; + } + +} + +/* orc_quantise2_s16 */ +static void +_backup_orc_quantise2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var37.i = var34.i; + /* 2: signw */ + var38.i = ORC_CLAMP(var37.i,-1,1); + /* 3: absw */ + var39.i = ORC_ABS(var37.i); + /* 4: shlw */ + var40.i = var39.i << 2; + /* 6: subw */ + var41.i = var40.i - var35.i; + /* 7: shruw */ + var42.i = ((orc_uint16)var41.i) >> ex->params[24]; + /* 8: mullw */ + var36.i = (var42.i * var38.i) & 0xffff; + /* 9: storew */ + ptr0[i] = var36; + } + +} + +/* orc_quantdequant1_s16 */ +static void +_backup_orc_quantdequant1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 7: loadpw */ + var36.i = ex->params[24]; + /* 14: loadpw */ + var38.i = ex->params[27]; + /* 16: loadpw */ + var39.i = ex->params[28]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var41.i = var34.i; + /* 2: signw */ + var42.i = ORC_CLAMP(var41.i,-1,1); + /* 3: absw */ + var43.i = ORC_ABS(var41.i); + /* 4: shlw */ + var44.i = var43.i << 2; + /* 6: subw */ + var45.i = var44.i - var35.i; + /* 8: mulhuw */ + var46.i = ((orc_uint32)((orc_uint16)var45.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var47.i = ((orc_uint16)var46.i) >> ex->params[26]; + /* 10: mullw */ + var48.i = (var47.i * var42.i) & 0xffff; + /* 11: copyw */ + var37.i = var48.i; + /* 12: storew */ + ptr0[i] = var37; + /* 13: signw */ + var49.i = ORC_CLAMP(var48.i,-1,1); + /* 15: mullw */ + var50.i = (var47.i * var38.i) & 0xffff; + /* 17: addw */ + var51.i = var50.i + var39.i; + /* 18: shrsw */ + var52.i = var51.i >> 2; + /* 19: mullw */ + var40.i = (var52.i * var49.i) & 0xffff; + /* 20: storew */ + ptr1[i] = var40; + } + +} + +/* orc_quantdequant3_s16 */ +static void +_backup_orc_quantdequant3_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var36.i = ex->params[25]; + /* 7: loadpw */ + var37.i = ex->params[24]; + /* 9: loadpl */ + var38.i = ex->params[29]; + /* 17: loadpw */ + var40.i = ex->params[27]; + /* 19: loadpw */ + var41.i = ex->params[28]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr1[i]; + /* 1: copyw */ + var43.i = var35.i; + /* 2: signw */ + var44.i = ORC_CLAMP(var43.i,-1,1); + /* 3: absw */ + var45.i = ORC_ABS(var43.i); + /* 4: shlw */ + var46.i = var45.i << 2; + /* 6: subw */ + var47.i = var46.i - var36.i; + /* 8: muluwl */ + var48.i = ((orc_uint16)var47.i) * ((orc_uint16)var37.i); + /* 10: addl */ + var49.i = var48.i + var38.i; + /* 11: shrul */ + var50.i = ((orc_uint32)var49.i) >> ex->params[26]; + /* 12: convlw */ + var51.i = var50.i; + /* 13: mullw */ + var52.i = (var51.i * var44.i) & 0xffff; + /* 14: copyw */ + var39.i = var52.i; + /* 15: storew */ + ptr0[i] = var39; + /* 16: signw */ + var53.i = ORC_CLAMP(var52.i,-1,1); + /* 18: mullw */ + var54.i = (var51.i * var40.i) & 0xffff; + /* 20: addw */ + var55.i = var54.i + var41.i; + /* 21: shrsw */ + var56.i = var55.i >> 2; + /* 22: mullw */ + var42.i = (var56.i * var53.i) & 0xffff; + /* 23: storew */ + ptr1[i] = var42; + } + +} + +/* orc_quantdequant2_s16 */ +static void +_backup_orc_quantdequant2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 12: loadpw */ + var37.i = ex->params[26]; + /* 14: loadpw */ + var38.i = ex->params[27]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 2: signw */ + var41.i = ORC_CLAMP(var40.i,-1,1); + /* 3: absw */ + var42.i = ORC_ABS(var40.i); + /* 4: shlw */ + var43.i = var42.i << 2; + /* 6: subw */ + var44.i = var43.i - var35.i; + /* 7: shruw */ + var45.i = ((orc_uint16)var44.i) >> ex->params[24]; + /* 8: mullw */ + var46.i = (var45.i * var41.i) & 0xffff; + /* 9: copyw */ + var36.i = var46.i; + /* 10: storew */ + ptr0[i] = var36; + /* 11: signw */ + var47.i = ORC_CLAMP(var46.i,-1,1); + /* 13: mullw */ + var48.i = (var45.i * var37.i) & 0xffff; + /* 15: addw */ + var49.i = var48.i + var38.i; + /* 16: shrsw */ + var50.i = var49.i >> 2; + /* 17: mullw */ + var39.i = (var50.i * var47.i) & 0xffff; + /* 18: storew */ + ptr1[i] = var39; + } + +} + +/* orc_downsample_vert_u8 */ +static void +_backup_orc_downsample_vert_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + ptr7 = (orc_int8 *)ex->arrays[7]; + + /* 5: loadpw */ + var37.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 12: loadpw */ + var40.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 15: loadpw */ + var41.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var43.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr7[i]; + /* 3: convubw */ + var44.i = (orc_uint8)var36; + /* 4: addw */ + var45.i = var43.i + var44.i; + /* 6: mullw */ + var46.i = (var45.i * var37.i) & 0xffff; + /* 7: loadb */ + var38 = ptr5[i]; + /* 8: convubw */ + var47.i = (orc_uint8)var38; + /* 9: loadb */ + var39 = ptr6[i]; + /* 10: convubw */ + var48.i = (orc_uint8)var39; + /* 11: addw */ + var49.i = var47.i + var48.i; + /* 13: mullw */ + var50.i = (var49.i * var40.i) & 0xffff; + /* 14: addw */ + var51.i = var50.i + var46.i; + /* 16: addw */ + var52.i = var51.i + var41.i; + /* 17: shruw */ + var53.i = ((orc_uint16)var52.i) >> 6; + /* 18: convwb */ + var42 = var53.i; + /* 19: storeb */ + ptr0[i] = var42; + } + +} + +/* orc_downsample_horiz_u8 */ +static void +_backup_orc_downsample_horiz_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_int8 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_int8 var52; + orc_union16 var53; + orc_int8 var54; + orc_union16 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 9: loadpw */ + var40.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 16: loadpw */ + var41.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 19: loadpw */ + var42.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var38 = ptr4[i]; + /* 1: copyw */ + var44.i = var38.i; + /* 2: loadw */ + var39 = ptr5[i]; + /* 3: copyw */ + var45.i = var39.i; + /* 4: select0wb */ + var46 = (orc_uint16)var44.i & 0xff; + /* 5: convubw */ + var47.i = (orc_uint8)var46; + /* 6: select1wb */ + var48 = ((orc_uint16)var45.i >> 8)&0xff; + /* 7: convubw */ + var49.i = (orc_uint8)var48; + /* 8: addw */ + var50.i = var47.i + var49.i; + /* 10: mullw */ + var51.i = (var50.i * var40.i) & 0xffff; + /* 11: select1wb */ + var52 = ((orc_uint16)var44.i >> 8)&0xff; + /* 12: convubw */ + var53.i = (orc_uint8)var52; + /* 13: select0wb */ + var54 = (orc_uint16)var45.i & 0xff; + /* 14: convubw */ + var55.i = (orc_uint8)var54; + /* 15: addw */ + var56.i = var53.i + var55.i; + /* 17: mullw */ + var57.i = (var56.i * var41.i) & 0xffff; + /* 18: addw */ + var58.i = var51.i + var57.i; + /* 20: addw */ + var59.i = var58.i + var42.i; + /* 21: shruw */ + var60.i = ((orc_uint16)var59.i) >> 6; + /* 22: convwb */ + var43 = var60.i; + /* 23: storeb */ + ptr0[i] = var43; + } + +} + +/* orc_stats_moment_s16 */ +static void +_backup_orc_stats_moment_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union32 var40; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var37.i = ORC_ABS(var34.i); + /* 3: subw */ + var38.i = var37.i - var35.i; + /* 5: maxsw */ + var39.i = ORC_MAX(var38.i, var36.i); + /* 6: convuwl */ + var40.i = (orc_uint16)var39.i; + /* 7: accl */ + var12.i = var12.i + var40.i; + } + ex->accumulators[0] = var12.i; + +} + +/* orc_stats_above_s16 */ +static void +_backup_orc_stats_above_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union32 var42; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + /* 6: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var38.i = ORC_ABS(var34.i); + /* 3: subw */ + var39.i = var38.i - var35.i; + /* 5: maxsw */ + var40.i = ORC_MAX(var39.i, var36.i); + /* 7: minsw */ + var41.i = ORC_MIN(var40.i, var37.i); + /* 8: convuwl */ + var42.i = (orc_uint16)var41.i; + /* 9: accl */ + var12.i = var12.i + var42.i; + } + ex->accumulators[0] = var12.i; + +} + +/* orc_accw */ +static void +_backup_orc_accw (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var12 = { 0 }; + orc_union16 var33; + orc_union16 var34; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: absw */ + var34.i = ORC_ABS(var33.i); + /* 2: accw */ + var12.i = var12.i + var34.i; + } + ex->accumulators[0] = (var12.i & 0xffff); + +} + +/* orc_avg2_8xn_u8 */ +static void +_backup_orc_avg2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +/* orc_avg2_12xn_u8 */ +static void +_backup_orc_avg2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +/* orc_avg2_16xn_u8 */ +static void +_backup_orc_avg2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +/* orc_avg2_32xn_u8 */ +static void +_backup_orc_avg2_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +/* orc_avg2_nxm_u8 */ +static void +_backup_orc_avg2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +/* orc_combine4_8xn_u8 */ +static void +_backup_orc_combine4_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine4_12xn_u8 */ +static void +_backup_orc_combine4_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine4_16xn_u8 */ +static void +_backup_orc_combine4_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine4_24xn_u8 */ +static void +_backup_orc_combine4_24xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 24; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine4_32xn_u8 */ +static void +_backup_orc_combine4_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine4_nxm_u8 */ +static void +_backup_orc_combine4_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: shrsw */ + var56.i = var55.i >> 4; + /* 22: convsuswb */ + var43 = ORC_CLAMP_UB(var56.i); + /* 23: storeb */ + ptr0[i] = var43; + } + } + +} + +/* orc_combine2_8xn_u8 */ +static void +_backup_orc_combine2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +/* orc_combine2_12xn_u8 */ +static void +_backup_orc_combine2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +/* orc_combine2_16xn_u8 */ +static void +_backup_orc_combine2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +/* orc_combine2_nxm_u8 */ +static void +_backup_orc_combine2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +/* orc_sad_nxm_u8 */ +static void +_backup_orc_sad_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sad_8x8_u8 */ +static void +_backup_orc_sad_8x8_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = 8; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sad_12x12_u8 */ +static void +_backup_orc_sad_12x12_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = 12; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sad_16xn_u8 */ +static void +_backup_orc_sad_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +/* orc_sad_32xn_u8 */ +static void +_backup_orc_sad_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +/* convert_rgb_to_gray */ +static void +_backup_convert_rgb_to_gray (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_int8 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_int8 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_int8 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var36.i = 0x00004c8b; /* 19595 or 9.68122e-320f */ + /* 12: loadpw */ + var38.i = 0x00009646; /* 38470 or 1.90067e-319f */ + /* 20: loadpw */ + var40.i = 0x00001d2f; /* 7471 or 3.69116e-320f */ + /* 23: loadpw */ + var41.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: select0lw */ + var43.i = (orc_uint32)var35.i & 0xffff; + /* 2: select0wb */ + var44 = (orc_uint16)var43.i & 0xff; + /* 3: convubw */ + var45.i = (orc_uint8)var44; + /* 4: swapw */ + var46.i = ORC_SWAP_W(var45.i); + /* 6: mulhuw */ + var47.i = ((orc_uint32)((orc_uint16)var46.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 7: loadl */ + var37 = ptr4[i]; + /* 8: select0lw */ + var48.i = (orc_uint32)var37.i & 0xffff; + /* 9: select1wb */ + var49 = ((orc_uint16)var48.i >> 8)&0xff; + /* 10: convubw */ + var50.i = (orc_uint8)var49; + /* 11: swapw */ + var51.i = ORC_SWAP_W(var50.i); + /* 13: mulhuw */ + var52.i = ((orc_uint32)((orc_uint16)var51.i) * (orc_uint32)((orc_uint16)var38.i)) >> 16; + /* 14: addusw */ + var53.i = ORC_CLAMP_UW((orc_uint16)var47.i + (orc_uint16)var52.i); + /* 15: loadl */ + var39 = ptr4[i]; + /* 16: select1lw */ + var54.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 17: select0wb */ + var55 = (orc_uint16)var54.i & 0xff; + /* 18: convubw */ + var56.i = (orc_uint8)var55; + /* 19: swapw */ + var57.i = ORC_SWAP_W(var56.i); + /* 21: mulhuw */ + var58.i = ((orc_uint32)((orc_uint16)var57.i) * (orc_uint32)((orc_uint16)var40.i)) >> 16; + /* 22: addusw */ + var59.i = ORC_CLAMP_UW((orc_uint16)var53.i + (orc_uint16)var58.i); + /* 24: addusw */ + var60.i = ORC_CLAMP_UW((orc_uint16)var59.i + (orc_uint16)var41.i); + /* 25: select1wb */ + var42 = ((orc_uint16)var60.i >> 8)&0xff; + /* 26: storeb */ + ptr0[i] = var42; + } + +} + +/* canny_calc_delta_x */ +static void +_backup_canny_calc_delta_x (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union32 var44; + orc_union32 var45; + orc_union32 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_int8 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union32 var54; + orc_union32 var55; + orc_union16 var56; + orc_int8 var57; + orc_union16 var58; + orc_int8 var59; + orc_union16 var60; + orc_union16 var61; + orc_union16 var62; + orc_union32 var63; + orc_union32 var64; + orc_union32 var65; + orc_union16 var66; + orc_int8 var67; + orc_union16 var68; + orc_int8 var69; + orc_union16 var70; + orc_union16 var71; + orc_union16 var72; + orc_union32 var73; + orc_union32 var74; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: select0lw */ + var47.i = (orc_uint32)var40.i & 0xffff; + /* 2: select1wb */ + var48 = ((orc_uint16)var47.i >> 8)&0xff; + /* 3: loadl */ + var41 = ptr5[i]; + /* 4: select0lw */ + var49.i = (orc_uint32)var41.i & 0xffff; + /* 5: select1wb */ + var50 = ((orc_uint16)var49.i >> 8)&0xff; + /* 6: convubw */ + var51.i = (orc_uint8)var48; + /* 7: convubw */ + var52.i = (orc_uint8)var50; + /* 8: subw */ + var53.i = var51.i - var52.i; + /* 9: convswl */ + var54.i = var53.i; + /* 10: mulll */ + var55.i = (var54.i * var54.i) & 0xffffffff; + /* 11: loadl */ + var42 = ptr4[i]; + /* 12: select1lw */ + var56.i = ((orc_uint32)var42.i >> 16)&0xffff; + /* 13: select0wb */ + var57 = (orc_uint16)var56.i & 0xff; + /* 14: loadl */ + var43 = ptr5[i]; + /* 15: select1lw */ + var58.i = ((orc_uint32)var43.i >> 16)&0xffff; + /* 16: select0wb */ + var59 = (orc_uint16)var58.i & 0xff; + /* 17: convubw */ + var60.i = (orc_uint8)var57; + /* 18: convubw */ + var61.i = (orc_uint8)var59; + /* 19: subw */ + var62.i = var60.i - var61.i; + /* 20: convswl */ + var63.i = var62.i; + /* 21: mulll */ + var64.i = (var63.i * var63.i) & 0xffffffff; + /* 22: addl */ + var65.i = var55.i + var64.i; + /* 23: loadl */ + var44 = ptr4[i]; + /* 24: select1lw */ + var66.i = ((orc_uint32)var44.i >> 16)&0xffff; + /* 25: select1wb */ + var67 = ((orc_uint16)var66.i >> 8)&0xff; + /* 26: loadl */ + var45 = ptr5[i]; + /* 27: select1lw */ + var68.i = ((orc_uint32)var45.i >> 16)&0xffff; + /* 28: select1wb */ + var69 = ((orc_uint16)var68.i >> 8)&0xff; + /* 29: convubw */ + var70.i = (orc_uint8)var67; + /* 30: convubw */ + var71.i = (orc_uint8)var69; + /* 31: subw */ + var72.i = var70.i - var71.i; + /* 32: convswl */ + var73.i = var72.i; + /* 33: mulll */ + var74.i = (var73.i * var73.i) & 0xffffffff; + /* 34: addl */ + var46.i = var65.i + var74.i; + /* 35: storel */ + ptr0[i] = var46; + } + +} + +/* i420_to_ayuv */ +static void +_backup_i420_to_ayuv (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_int8 var37; + orc_union32 var38; + orc_int8 var39; + orc_int8 var40; + orc_int8 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + + /* 3: loadpb */ + var37 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadupdb */ + var39 = ptr5[i>>1]; + /* 1: loadupdb */ + var40 = ptr6[i>>1]; + /* 2: loadb */ + var41 = ptr4[i]; + /* 4: mergebw */ + var42.i = ((orc_uint8)var37 & 0x00ff) | ((orc_uint8)var41 << 8); + /* 5: mergebw */ + var43.i = ((orc_uint8)var39 & 0x00ff) | ((orc_uint8)var40 << 8); + /* 6: mergewl */ + var38.i = ((orc_uint16)var42.i & 0x0000ffff) | ((orc_uint16)var43.i << 16); + /* 7: storel */ + ptr0[i] = var38; + } + +} + +/* test_4x */ +static void +_backup_test_4x (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +/* test_4x_2 */ +static void +_backup_test_4x_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 1: loadpb */ + var33.x4[0] = ex->params[24]; + var33.x4[1] = ex->params[24]; + var33.x4[2] = ex->params[24]; + var33.x4[3] = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +/* orc_splat_u16 */ +static void +_backup_orc_splat_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +/* orc_splat_u32 */ +static void +_backup_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +/* orc_splat_u16_2d */ +static void +_backup_orc_splat_u16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +/* orc_splat_u32_2d */ +static void +_backup_orc_splat_u32_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpl */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +/* orc_copy_u16_2d */ +static void +_backup_orc_copy_u16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +/* orc_copy_u32_2d */ +static void +_backup_orc_copy_u32_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +/* orc_composite_add_8888_8888_2d */ +static void +_backup_orc_composite_add_8888_8888_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + } + +} + +/* orc_composite_add_8_8_line */ +static void +_backup_orc_composite_add_8_8_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr0[i]; + /* 1: loadb */ + var33 = ptr4[i]; + /* 2: addusb */ + var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +/* orc_composite_add_n_8_8_line */ +static void +_backup_orc_composite_add_n_8_8_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_int8 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_int8 var41; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var38.i = (orc_uint8)var34; + /* 3: mullw */ + var39.i = (var38.i * var35.i) & 0xffff; + /* 4: div255w */ + var40.i = ((uint16_t)(((orc_uint16)(var39.i+128)) + (((orc_uint16)(var39.i+128))>>8)))>>8; + /* 5: convwb */ + var41 = var40.i; + /* 6: loadb */ + var36 = ptr0[i]; + /* 7: addusb */ + var37 = ORC_CLAMP_UB((orc_uint8)var36 + (orc_uint8)var41); + /* 8: storeb */ + ptr0[i] = var37; + } + +} + +/* orc_code_combine_add_u */ +static void +_backup_orc_code_combine_add_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union32 var44; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: splatw3q */ + var41.i = ((((orc_uint64)var40.i)>>48) << 48) | ((((orc_uint64)var40.i)>>48)<<32) | ((((orc_uint64)var40.i)>>48) << 16) | ((((orc_uint64)var40.i)>>48)); + /* 5: mullw */ + var42.x4[0] = (var39.x4[0] * var41.x4[0]) & 0xffff; + var42.x4[1] = (var39.x4[1] * var41.x4[1]) & 0xffff; + var42.x4[2] = (var39.x4[2] * var41.x4[2]) & 0xffff; + var42.x4[3] = (var39.x4[3] * var41.x4[3]) & 0xffff; + /* 6: div255w */ + var43.x4[0] = ((uint16_t)(((orc_uint16)(var42.x4[0]+128)) + (((orc_uint16)(var42.x4[0]+128))>>8)))>>8; + var43.x4[1] = ((uint16_t)(((orc_uint16)(var42.x4[1]+128)) + (((orc_uint16)(var42.x4[1]+128))>>8)))>>8; + var43.x4[2] = ((uint16_t)(((orc_uint16)(var42.x4[2]+128)) + (((orc_uint16)(var42.x4[2]+128))>>8)))>>8; + var43.x4[3] = ((uint16_t)(((orc_uint16)(var42.x4[3]+128)) + (((orc_uint16)(var42.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var44.x4[0] = var43.x4[0]; + var44.x4[1] = var43.x4[1]; + var44.x4[2] = var43.x4[2]; + var44.x4[3] = var43.x4[3]; + /* 8: loadl */ + var37 = ptr0[i]; + /* 9: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var44.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var44.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var44.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var44.x4[3]); + /* 10: storel */ + ptr0[i] = var38; + } + +} + +/* orc_code_combine_add_u_n */ +static void +_backup_orc_code_combine_add_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +/* orc_code_combine_over_u */ +static void +_backup_orc_code_combine_over_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union32 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union32 var53; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var46.x4[0] = var45.x4[0]; + var46.x4[1] = var45.x4[1]; + var46.x4[2] = var45.x4[2]; + var46.x4[3] = var45.x4[3]; + /* 8: loadl */ + var47 = ptr0[i]; + /* 9: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 11: xorw */ + var49.x4[0] = var45.x4[0] ^ var39.x4[0]; + var49.x4[1] = var45.x4[1] ^ var39.x4[1]; + var49.x4[2] = var45.x4[2] ^ var39.x4[2]; + var49.x4[3] = var45.x4[3] ^ var39.x4[3]; + /* 12: splatw3q */ + var50.i = ((((orc_uint64)var49.i)>>48) << 48) | ((((orc_uint64)var49.i)>>48)<<32) | ((((orc_uint64)var49.i)>>48) << 16) | ((((orc_uint64)var49.i)>>48)); + /* 13: mullw */ + var51.x4[0] = (var48.x4[0] * var50.x4[0]) & 0xffff; + var51.x4[1] = (var48.x4[1] * var50.x4[1]) & 0xffff; + var51.x4[2] = (var48.x4[2] * var50.x4[2]) & 0xffff; + var51.x4[3] = (var48.x4[3] * var50.x4[3]) & 0xffff; + /* 14: div255w */ + var52.x4[0] = ((uint16_t)(((orc_uint16)(var51.x4[0]+128)) + (((orc_uint16)(var51.x4[0]+128))>>8)))>>8; + var52.x4[1] = ((uint16_t)(((orc_uint16)(var51.x4[1]+128)) + (((orc_uint16)(var51.x4[1]+128))>>8)))>>8; + var52.x4[2] = ((uint16_t)(((orc_uint16)(var51.x4[2]+128)) + (((orc_uint16)(var51.x4[2]+128))>>8)))>>8; + var52.x4[3] = ((uint16_t)(((orc_uint16)(var51.x4[3]+128)) + (((orc_uint16)(var51.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var53.x4[0] = var52.x4[0]; + var53.x4[1] = var52.x4[1]; + var53.x4[2] = var52.x4[2]; + var53.x4[3] = var52.x4[3]; + /* 16: addusb */ + var40.x4[0] = ORC_CLAMP_UB((orc_uint8)var53.x4[0] + (orc_uint8)var46.x4[0]); + var40.x4[1] = ORC_CLAMP_UB((orc_uint8)var53.x4[1] + (orc_uint8)var46.x4[1]); + var40.x4[2] = ORC_CLAMP_UB((orc_uint8)var53.x4[2] + (orc_uint8)var46.x4[2]); + var40.x4[3] = ORC_CLAMP_UB((orc_uint8)var53.x4[3] + (orc_uint8)var46.x4[3]); + /* 17: storel */ + ptr0[i] = var40; + } + +} + +/* orc_code_combine_over_u_n */ +static void +_backup_orc_code_combine_over_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union64 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 4: loadpw */ + var37.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var39 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var39.x4[0]; + var40.x4[1] = (orc_uint8)var39.x4[1]; + var40.x4[2] = (orc_uint8)var39.x4[2]; + var40.x4[3] = (orc_uint8)var39.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var41.x4[0]; + var42.x4[1] = (orc_uint8)var41.x4[1]; + var42.x4[2] = (orc_uint8)var41.x4[2]; + var42.x4[3] = (orc_uint8)var41.x4[3]; + /* 5: xorw */ + var43.x4[0] = var40.x4[0] ^ var37.x4[0]; + var43.x4[1] = var40.x4[1] ^ var37.x4[1]; + var43.x4[2] = var40.x4[2] ^ var37.x4[2]; + var43.x4[3] = var40.x4[3] ^ var37.x4[3]; + /* 6: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 7: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 10: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var47.x4[0] + (orc_uint8)var39.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var47.x4[1] + (orc_uint8)var39.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var47.x4[2] + (orc_uint8)var39.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var47.x4[3] + (orc_uint8)var39.x4[3]); + /* 11: storel */ + ptr0[i] = var38; + } + +} + +/* orc_code_combine_in_u */ +static void +_backup_orc_code_combine_in_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var46.x4[0] = (orc_uint8)var39.x4[0]; + var46.x4[1] = (orc_uint8)var39.x4[1]; + var46.x4[2] = (orc_uint8)var39.x4[2]; + var46.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 10: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 11: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var40.x4[0] = var49.x4[0]; + var40.x4[1] = var49.x4[1]; + var40.x4[2] = var49.x4[2]; + var40.x4[3] = var49.x4[3]; + /* 13: storel */ + ptr0[i] = var40; + } + +} + +/* orc_code_combine_in_u_n */ +static void +_backup_orc_code_combine_in_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var37.x4[0]; + var40.x4[1] = (orc_uint8)var37.x4[1]; + var40.x4[2] = (orc_uint8)var37.x4[2]; + var40.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var41.x4[0] = (orc_uint8)var38.x4[0]; + var41.x4[1] = (orc_uint8)var38.x4[1]; + var41.x4[2] = (orc_uint8)var38.x4[2]; + var41.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var42.i = ((((orc_uint64)var41.i)>>48) << 48) | ((((orc_uint64)var41.i)>>48)<<32) | ((((orc_uint64)var41.i)>>48) << 16) | ((((orc_uint64)var41.i)>>48)); + /* 5: mullw */ + var43.x4[0] = (var40.x4[0] * var42.x4[0]) & 0xffff; + var43.x4[1] = (var40.x4[1] * var42.x4[1]) & 0xffff; + var43.x4[2] = (var40.x4[2] * var42.x4[2]) & 0xffff; + var43.x4[3] = (var40.x4[3] * var42.x4[3]) & 0xffff; + /* 6: div255w */ + var44.x4[0] = ((uint16_t)(((orc_uint16)(var43.x4[0]+128)) + (((orc_uint16)(var43.x4[0]+128))>>8)))>>8; + var44.x4[1] = ((uint16_t)(((orc_uint16)(var43.x4[1]+128)) + (((orc_uint16)(var43.x4[1]+128))>>8)))>>8; + var44.x4[2] = ((uint16_t)(((orc_uint16)(var43.x4[2]+128)) + (((orc_uint16)(var43.x4[2]+128))>>8)))>>8; + var44.x4[3] = ((uint16_t)(((orc_uint16)(var43.x4[3]+128)) + (((orc_uint16)(var43.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var39.x4[0] = var44.x4[0]; + var39.x4[1] = var44.x4[1]; + var39.x4[2] = var44.x4[2]; + var39.x4[3] = var44.x4[3]; + /* 8: storel */ + ptr0[i] = var39; + } + +} + +/* orc_code_combine_out_u */ +static void +_backup_orc_code_combine_out_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var37.x4[0]; + var42.x4[1] = (orc_uint8)var37.x4[1]; + var42.x4[2] = (orc_uint8)var37.x4[2]; + var42.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var43.x4[0] = (orc_uint8)var38.x4[0]; + var43.x4[1] = (orc_uint8)var38.x4[1]; + var43.x4[2] = (orc_uint8)var38.x4[2]; + var43.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var47.x4[0] = (orc_uint8)var39.x4[0]; + var47.x4[1] = (orc_uint8)var39.x4[1]; + var47.x4[2] = (orc_uint8)var39.x4[2]; + var47.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 11: xorw */ + var49.x4[0] = var48.x4[0] ^ var40.x4[0]; + var49.x4[1] = var48.x4[1] ^ var40.x4[1]; + var49.x4[2] = var48.x4[2] ^ var40.x4[2]; + var49.x4[3] = var48.x4[3] ^ var40.x4[3]; + /* 12: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 13: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var41.x4[0] = var51.x4[0]; + var41.x4[1] = var51.x4[1]; + var41.x4[2] = var51.x4[2]; + var41.x4[3] = var51.x4[3]; + /* 15: storel */ + ptr0[i] = var41; + } + +} + +/* orc_code_combine_out_u_n */ +static void +_backup_orc_code_combine_out_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 6: xorw */ + var44.x4[0] = var43.x4[0] ^ var39.x4[0]; + var44.x4[1] = var43.x4[1] ^ var39.x4[1]; + var44.x4[2] = var43.x4[2] ^ var39.x4[2]; + var44.x4[3] = var43.x4[3] ^ var39.x4[3]; + /* 7: mullw */ + var45.x4[0] = (var41.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var41.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var41.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var41.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var40.x4[0] = var46.x4[0]; + var40.x4[1] = var46.x4[1]; + var40.x4[2] = var46.x4[2]; + var40.x4[3] = var46.x4[3]; + /* 10: storel */ + ptr0[i] = var40; + } + +} + +/* orc_code_combine_atop_u */ +static void +_backup_orc_code_combine_atop_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union32 var55; + orc_union64 var56; + orc_union64 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union32 var61; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 16: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 5: mullw */ + var49.x4[0] = (var46.x4[0] * var48.x4[0]) & 0xffff; + var49.x4[1] = (var46.x4[1] * var48.x4[1]) & 0xffff; + var49.x4[2] = (var46.x4[2] * var48.x4[2]) & 0xffff; + var49.x4[3] = (var46.x4[3] * var48.x4[3]) & 0xffff; + /* 6: div255w */ + var50.x4[0] = ((uint16_t)(((orc_uint16)(var49.x4[0]+128)) + (((orc_uint16)(var49.x4[0]+128))>>8)))>>8; + var50.x4[1] = ((uint16_t)(((orc_uint16)(var49.x4[1]+128)) + (((orc_uint16)(var49.x4[1]+128))>>8)))>>8; + var50.x4[2] = ((uint16_t)(((orc_uint16)(var49.x4[2]+128)) + (((orc_uint16)(var49.x4[2]+128))>>8)))>>8; + var50.x4[3] = ((uint16_t)(((orc_uint16)(var49.x4[3]+128)) + (((orc_uint16)(var49.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var52.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 10: mullw */ + var53.x4[0] = (var50.x4[0] * var52.x4[0]) & 0xffff; + var53.x4[1] = (var50.x4[1] * var52.x4[1]) & 0xffff; + var53.x4[2] = (var50.x4[2] * var52.x4[2]) & 0xffff; + var53.x4[3] = (var50.x4[3] * var52.x4[3]) & 0xffff; + /* 11: div255w */ + var54.x4[0] = ((uint16_t)(((orc_uint16)(var53.x4[0]+128)) + (((orc_uint16)(var53.x4[0]+128))>>8)))>>8; + var54.x4[1] = ((uint16_t)(((orc_uint16)(var53.x4[1]+128)) + (((orc_uint16)(var53.x4[1]+128))>>8)))>>8; + var54.x4[2] = ((uint16_t)(((orc_uint16)(var53.x4[2]+128)) + (((orc_uint16)(var53.x4[2]+128))>>8)))>>8; + var54.x4[3] = ((uint16_t)(((orc_uint16)(var53.x4[3]+128)) + (((orc_uint16)(var53.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var55.x4[0] = var54.x4[0]; + var55.x4[1] = var54.x4[1]; + var55.x4[2] = var54.x4[2]; + var55.x4[3] = var54.x4[3]; + /* 13: loadl */ + var43 = ptr0[i]; + /* 14: convubw */ + var56.x4[0] = (orc_uint8)var43.x4[0]; + var56.x4[1] = (orc_uint8)var43.x4[1]; + var56.x4[2] = (orc_uint8)var43.x4[2]; + var56.x4[3] = (orc_uint8)var43.x4[3]; + /* 15: splatw3q */ + var57.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 17: xorw */ + var58.x4[0] = var57.x4[0] ^ var44.x4[0]; + var58.x4[1] = var57.x4[1] ^ var44.x4[1]; + var58.x4[2] = var57.x4[2] ^ var44.x4[2]; + var58.x4[3] = var57.x4[3] ^ var44.x4[3]; + /* 18: mullw */ + var59.x4[0] = (var56.x4[0] * var58.x4[0]) & 0xffff; + var59.x4[1] = (var56.x4[1] * var58.x4[1]) & 0xffff; + var59.x4[2] = (var56.x4[2] * var58.x4[2]) & 0xffff; + var59.x4[3] = (var56.x4[3] * var58.x4[3]) & 0xffff; + /* 19: div255w */ + var60.x4[0] = ((uint16_t)(((orc_uint16)(var59.x4[0]+128)) + (((orc_uint16)(var59.x4[0]+128))>>8)))>>8; + var60.x4[1] = ((uint16_t)(((orc_uint16)(var59.x4[1]+128)) + (((orc_uint16)(var59.x4[1]+128))>>8)))>>8; + var60.x4[2] = ((uint16_t)(((orc_uint16)(var59.x4[2]+128)) + (((orc_uint16)(var59.x4[2]+128))>>8)))>>8; + var60.x4[3] = ((uint16_t)(((orc_uint16)(var59.x4[3]+128)) + (((orc_uint16)(var59.x4[3]+128))>>8)))>>8; + /* 20: convwb */ + var61.x4[0] = var60.x4[0]; + var61.x4[1] = var60.x4[1]; + var61.x4[2] = var60.x4[2]; + var61.x4[3] = var60.x4[3]; + /* 21: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var55.x4[0] + (orc_uint8)var61.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var55.x4[1] + (orc_uint8)var61.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var55.x4[2] + (orc_uint8)var61.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var55.x4[3] + (orc_uint8)var61.x4[3]); + /* 22: storel */ + ptr0[i] = var45; + } + +} + +/* orc_code_combine_atop_u_n */ +static void +_backup_orc_code_combine_atop_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union32 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union32 var56; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 11: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var45.x4[0] = (orc_uint8)var40.x4[0]; + var45.x4[1] = (orc_uint8)var40.x4[1]; + var45.x4[2] = (orc_uint8)var40.x4[2]; + var45.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var46.x4[0] = (orc_uint8)var41.x4[0]; + var46.x4[1] = (orc_uint8)var41.x4[1]; + var46.x4[2] = (orc_uint8)var41.x4[2]; + var46.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 5: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 6: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var50.x4[0] = var49.x4[0]; + var50.x4[1] = var49.x4[1]; + var50.x4[2] = var49.x4[2]; + var50.x4[3] = var49.x4[3]; + /* 8: loadl */ + var42 = ptr0[i]; + /* 9: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 10: splatw3q */ + var52.i = ((((orc_uint64)var45.i)>>48) << 48) | ((((orc_uint64)var45.i)>>48)<<32) | ((((orc_uint64)var45.i)>>48) << 16) | ((((orc_uint64)var45.i)>>48)); + /* 12: xorw */ + var53.x4[0] = var52.x4[0] ^ var43.x4[0]; + var53.x4[1] = var52.x4[1] ^ var43.x4[1]; + var53.x4[2] = var52.x4[2] ^ var43.x4[2]; + var53.x4[3] = var52.x4[3] ^ var43.x4[3]; + /* 13: mullw */ + var54.x4[0] = (var51.x4[0] * var53.x4[0]) & 0xffff; + var54.x4[1] = (var51.x4[1] * var53.x4[1]) & 0xffff; + var54.x4[2] = (var51.x4[2] * var53.x4[2]) & 0xffff; + var54.x4[3] = (var51.x4[3] * var53.x4[3]) & 0xffff; + /* 14: div255w */ + var55.x4[0] = ((uint16_t)(((orc_uint16)(var54.x4[0]+128)) + (((orc_uint16)(var54.x4[0]+128))>>8)))>>8; + var55.x4[1] = ((uint16_t)(((orc_uint16)(var54.x4[1]+128)) + (((orc_uint16)(var54.x4[1]+128))>>8)))>>8; + var55.x4[2] = ((uint16_t)(((orc_uint16)(var54.x4[2]+128)) + (((orc_uint16)(var54.x4[2]+128))>>8)))>>8; + var55.x4[3] = ((uint16_t)(((orc_uint16)(var54.x4[3]+128)) + (((orc_uint16)(var54.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var56.x4[0] = var55.x4[0]; + var56.x4[1] = var55.x4[1]; + var56.x4[2] = var55.x4[2]; + var56.x4[3] = var55.x4[3]; + /* 16: addusb */ + var44.x4[0] = ORC_CLAMP_UB((orc_uint8)var50.x4[0] + (orc_uint8)var56.x4[0]); + var44.x4[1] = ORC_CLAMP_UB((orc_uint8)var50.x4[1] + (orc_uint8)var56.x4[1]); + var44.x4[2] = ORC_CLAMP_UB((orc_uint8)var50.x4[2] + (orc_uint8)var56.x4[2]); + var44.x4[3] = ORC_CLAMP_UB((orc_uint8)var50.x4[3] + (orc_uint8)var56.x4[3]); + /* 17: storel */ + ptr0[i] = var44; + } + +} + +/* orc_code_combine_xor_u */ +static void +_backup_orc_code_combine_xor_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union32 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union64 var61; + orc_union64 var62; + orc_union32 var63; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 18: loadpw */ + var45.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var47.x4[0] = (orc_uint8)var40.x4[0]; + var47.x4[1] = (orc_uint8)var40.x4[1]; + var47.x4[2] = (orc_uint8)var40.x4[2]; + var47.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var48.x4[0] = (orc_uint8)var41.x4[0]; + var48.x4[1] = (orc_uint8)var41.x4[1]; + var48.x4[2] = (orc_uint8)var41.x4[2]; + var48.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var49.i = ((((orc_uint64)var48.i)>>48) << 48) | ((((orc_uint64)var48.i)>>48)<<32) | ((((orc_uint64)var48.i)>>48) << 16) | ((((orc_uint64)var48.i)>>48)); + /* 5: mullw */ + var50.x4[0] = (var47.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var47.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var47.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var47.x4[3] * var49.x4[3]) & 0xffff; + /* 6: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var52.x4[0] = (orc_uint8)var42.x4[0]; + var52.x4[1] = (orc_uint8)var42.x4[1]; + var52.x4[2] = (orc_uint8)var42.x4[2]; + var52.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var53.i = ((((orc_uint64)var52.i)>>48) << 48) | ((((orc_uint64)var52.i)>>48)<<32) | ((((orc_uint64)var52.i)>>48) << 16) | ((((orc_uint64)var52.i)>>48)); + /* 11: xorw */ + var54.x4[0] = var53.x4[0] ^ var43.x4[0]; + var54.x4[1] = var53.x4[1] ^ var43.x4[1]; + var54.x4[2] = var53.x4[2] ^ var43.x4[2]; + var54.x4[3] = var53.x4[3] ^ var43.x4[3]; + /* 12: mullw */ + var55.x4[0] = (var51.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var51.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var51.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var51.x4[3] * var54.x4[3]) & 0xffff; + /* 13: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 15: loadl */ + var44 = ptr0[i]; + /* 16: convubw */ + var58.x4[0] = (orc_uint8)var44.x4[0]; + var58.x4[1] = (orc_uint8)var44.x4[1]; + var58.x4[2] = (orc_uint8)var44.x4[2]; + var58.x4[3] = (orc_uint8)var44.x4[3]; + /* 17: splatw3q */ + var59.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 19: xorw */ + var60.x4[0] = var59.x4[0] ^ var45.x4[0]; + var60.x4[1] = var59.x4[1] ^ var45.x4[1]; + var60.x4[2] = var59.x4[2] ^ var45.x4[2]; + var60.x4[3] = var59.x4[3] ^ var45.x4[3]; + /* 20: mullw */ + var61.x4[0] = (var58.x4[0] * var60.x4[0]) & 0xffff; + var61.x4[1] = (var58.x4[1] * var60.x4[1]) & 0xffff; + var61.x4[2] = (var58.x4[2] * var60.x4[2]) & 0xffff; + var61.x4[3] = (var58.x4[3] * var60.x4[3]) & 0xffff; + /* 21: div255w */ + var62.x4[0] = ((uint16_t)(((orc_uint16)(var61.x4[0]+128)) + (((orc_uint16)(var61.x4[0]+128))>>8)))>>8; + var62.x4[1] = ((uint16_t)(((orc_uint16)(var61.x4[1]+128)) + (((orc_uint16)(var61.x4[1]+128))>>8)))>>8; + var62.x4[2] = ((uint16_t)(((orc_uint16)(var61.x4[2]+128)) + (((orc_uint16)(var61.x4[2]+128))>>8)))>>8; + var62.x4[3] = ((uint16_t)(((orc_uint16)(var61.x4[3]+128)) + (((orc_uint16)(var61.x4[3]+128))>>8)))>>8; + /* 22: convwb */ + var63.x4[0] = var62.x4[0]; + var63.x4[1] = var62.x4[1]; + var63.x4[2] = var62.x4[2]; + var63.x4[3] = var62.x4[3]; + /* 23: addusb */ + var46.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var63.x4[0]); + var46.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var63.x4[1]); + var46.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var63.x4[2]); + var46.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var63.x4[3]); + /* 24: storel */ + ptr0[i] = var46; + } + +} + +/* orc_code_combine_xor_u_n */ +static void +_backup_orc_code_combine_xor_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union64 var57; + orc_union32 var58; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 13: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 6: xorw */ + var49.x4[0] = var48.x4[0] ^ var42.x4[0]; + var49.x4[1] = var48.x4[1] ^ var42.x4[1]; + var49.x4[2] = var48.x4[2] ^ var42.x4[2]; + var49.x4[3] = var48.x4[3] ^ var42.x4[3]; + /* 7: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 8: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 10: loadl */ + var43 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var43.x4[0]; + var53.x4[1] = (orc_uint8)var43.x4[1]; + var53.x4[2] = (orc_uint8)var43.x4[2]; + var53.x4[3] = (orc_uint8)var43.x4[3]; + /* 12: splatw3q */ + var54.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 14: xorw */ + var55.x4[0] = var54.x4[0] ^ var44.x4[0]; + var55.x4[1] = var54.x4[1] ^ var44.x4[1]; + var55.x4[2] = var54.x4[2] ^ var44.x4[2]; + var55.x4[3] = var54.x4[3] ^ var44.x4[3]; + /* 15: mullw */ + var56.x4[0] = (var53.x4[0] * var55.x4[0]) & 0xffff; + var56.x4[1] = (var53.x4[1] * var55.x4[1]) & 0xffff; + var56.x4[2] = (var53.x4[2] * var55.x4[2]) & 0xffff; + var56.x4[3] = (var53.x4[3] * var55.x4[3]) & 0xffff; + /* 16: div255w */ + var57.x4[0] = ((uint16_t)(((orc_uint16)(var56.x4[0]+128)) + (((orc_uint16)(var56.x4[0]+128))>>8)))>>8; + var57.x4[1] = ((uint16_t)(((orc_uint16)(var56.x4[1]+128)) + (((orc_uint16)(var56.x4[1]+128))>>8)))>>8; + var57.x4[2] = ((uint16_t)(((orc_uint16)(var56.x4[2]+128)) + (((orc_uint16)(var56.x4[2]+128))>>8)))>>8; + var57.x4[3] = ((uint16_t)(((orc_uint16)(var56.x4[3]+128)) + (((orc_uint16)(var56.x4[3]+128))>>8)))>>8; + /* 17: convwb */ + var58.x4[0] = var57.x4[0]; + var58.x4[1] = var57.x4[1]; + var58.x4[2] = var57.x4[2]; + var58.x4[3] = var57.x4[3]; + /* 18: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var58.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var58.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var58.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var58.x4[3]); + /* 19: storel */ + ptr0[i] = var45; + } + +} + +/* orc_code_combine_add_ca */ +static void +_backup_orc_code_combine_add_ca (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union32 var43; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: mullw */ + var41.x4[0] = (var39.x4[0] * var40.x4[0]) & 0xffff; + var41.x4[1] = (var39.x4[1] * var40.x4[1]) & 0xffff; + var41.x4[2] = (var39.x4[2] * var40.x4[2]) & 0xffff; + var41.x4[3] = (var39.x4[3] * var40.x4[3]) & 0xffff; + /* 5: div255w */ + var42.x4[0] = ((uint16_t)(((orc_uint16)(var41.x4[0]+128)) + (((orc_uint16)(var41.x4[0]+128))>>8)))>>8; + var42.x4[1] = ((uint16_t)(((orc_uint16)(var41.x4[1]+128)) + (((orc_uint16)(var41.x4[1]+128))>>8)))>>8; + var42.x4[2] = ((uint16_t)(((orc_uint16)(var41.x4[2]+128)) + (((orc_uint16)(var41.x4[2]+128))>>8)))>>8; + var42.x4[3] = ((uint16_t)(((orc_uint16)(var41.x4[3]+128)) + (((orc_uint16)(var41.x4[3]+128))>>8)))>>8; + /* 6: convwb */ + var43.x4[0] = var42.x4[0]; + var43.x4[1] = var42.x4[1]; + var43.x4[2] = var42.x4[2]; + var43.x4[3] = var42.x4[3]; + /* 7: loadl */ + var37 = ptr0[i]; + /* 8: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var43.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var43.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var43.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var43.x4[3]); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +/* orc_code_combine_add_ca_n */ +static void +_backup_orc_code_combine_add_ca_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +/* orc_code_combine_over_ca */ +static void +_backup_orc_code_combine_over_ca (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +/* orc_code_combine_over_ca_n */ +static void +_backup_orc_code_combine_over_ca_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union64 var41; + orc_union32 var42; + orc_union64 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 7: loadpw */ + var41.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var43.x4[0] = (orc_uint8)var40.x4[0]; + var43.x4[1] = (orc_uint8)var40.x4[1]; + var43.x4[2] = (orc_uint8)var40.x4[2]; + var43.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 3: convwb */ + var45.x4[0] = var43.x4[0]; + var45.x4[1] = var43.x4[1]; + var45.x4[2] = var43.x4[2]; + var45.x4[3] = var43.x4[3]; + /* 4: copyw */ + var46.x4[0] = var44.x4[0]; + var46.x4[1] = var44.x4[1]; + var46.x4[2] = var44.x4[2]; + var46.x4[3] = var44.x4[3]; + /* 5: loadl */ + var47 = ptr0[i]; + /* 6: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 8: xorw */ + var49.x4[0] = var46.x4[0] ^ var41.x4[0]; + var49.x4[1] = var46.x4[1] ^ var41.x4[1]; + var49.x4[2] = var46.x4[2] ^ var41.x4[2]; + var49.x4[3] = var46.x4[3] ^ var41.x4[3]; + /* 9: mullw */ + var50.x4[0] = (var48.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var48.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var48.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var48.x4[3] * var49.x4[3]) & 0xffff; + /* 10: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 11: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 12: addusb */ + var42.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var45.x4[0]); + var42.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var45.x4[1]); + var42.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var45.x4[2]); + var42.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var45.x4[3]); + /* 13: storel */ + ptr0[i] = var42; + } + +} + +/* orc_composite_over_8888_8_8888_line */ +static void +_backup_orc_composite_over_8888_8_8888_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var38; + orc_int8 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + orc_union32 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union32 var54; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var38 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 2: loadb */ + var39 = ptr5[i]; + /* 3: splatbl */ + var43.i = ((var39&0xff) << 24) | ((var39&0xff)<<16) | ((var39&0xff) << 8) | (var39&0xff); + /* 4: convubw */ + var44.x4[0] = (orc_uint8)var43.x4[0]; + var44.x4[1] = (orc_uint8)var43.x4[1]; + var44.x4[2] = (orc_uint8)var43.x4[2]; + var44.x4[3] = (orc_uint8)var43.x4[3]; + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 8: loadl */ + var48 = ptr0[i]; + /* 9: convubw */ + var49.x4[0] = (orc_uint8)var48.x4[0]; + var49.x4[1] = (orc_uint8)var48.x4[1]; + var49.x4[2] = (orc_uint8)var48.x4[2]; + var49.x4[3] = (orc_uint8)var48.x4[3]; + /* 11: xorw */ + var50.x4[0] = var46.x4[0] ^ var40.x4[0]; + var50.x4[1] = var46.x4[1] ^ var40.x4[1]; + var50.x4[2] = var46.x4[2] ^ var40.x4[2]; + var50.x4[3] = var46.x4[3] ^ var40.x4[3]; + /* 12: splatw3q */ + var51.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 13: mullw */ + var52.x4[0] = (var49.x4[0] * var51.x4[0]) & 0xffff; + var52.x4[1] = (var49.x4[1] * var51.x4[1]) & 0xffff; + var52.x4[2] = (var49.x4[2] * var51.x4[2]) & 0xffff; + var52.x4[3] = (var49.x4[3] * var51.x4[3]) & 0xffff; + /* 14: div255w */ + var53.x4[0] = ((uint16_t)(((orc_uint16)(var52.x4[0]+128)) + (((orc_uint16)(var52.x4[0]+128))>>8)))>>8; + var53.x4[1] = ((uint16_t)(((orc_uint16)(var52.x4[1]+128)) + (((orc_uint16)(var52.x4[1]+128))>>8)))>>8; + var53.x4[2] = ((uint16_t)(((orc_uint16)(var52.x4[2]+128)) + (((orc_uint16)(var52.x4[2]+128))>>8)))>>8; + var53.x4[3] = ((uint16_t)(((orc_uint16)(var52.x4[3]+128)) + (((orc_uint16)(var52.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var54.x4[0] = var53.x4[0]; + var54.x4[1] = var53.x4[1]; + var54.x4[2] = var53.x4[2]; + var54.x4[3] = var53.x4[3]; + /* 16: addusb */ + var41.x4[0] = ORC_CLAMP_UB((orc_uint8)var54.x4[0] + (orc_uint8)var47.x4[0]); + var41.x4[1] = ORC_CLAMP_UB((orc_uint8)var54.x4[1] + (orc_uint8)var47.x4[1]); + var41.x4[2] = ORC_CLAMP_UB((orc_uint8)var54.x4[2] + (orc_uint8)var47.x4[2]); + var41.x4[3] = ORC_CLAMP_UB((orc_uint8)var54.x4[3] + (orc_uint8)var47.x4[3]); + /* 17: storel */ + ptr0[i] = var41; + } + +} + +/* orc_composite_over_n_8888_8888_ca_2d */ +static void +_backup_orc_composite_over_n_8888_8888_ca_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 0: loadpb */ + var40.x4[0] = ex->params[24]; + var40.x4[1] = ex->params[24]; + var40.x4[2] = ex->params[24]; + var40.x4[3] = ex->params[24]; + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr4[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +/* cogorc_resample_horiz_1tap */ +static void +_backup_cogorc_resample_horiz_1tap (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: ldresnearb */ + var32 = ptr4[(ex->params[24] + i*ex->params[25])>>16]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +/* cogorc_resample_horiz_2tap */ +static void +_backup_cogorc_resample_horiz_2tap (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: ldreslinb */ + { + int tmp = ex->params[24] + i * ex->params[25]; + var32 = ((orc_uint8)ptr4[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr4[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8; + } + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +/* test_float_constant_1 */ +static void +_backup_test_float_constant_1 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +/* test_float_constant_2 */ +static void +_backup_test_float_constant_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +/* convert_fc32_to_int32 */ +static void +_backup_convert_fc32_to_int32 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var34; + orc_union64 var35; + orc_union32 var36; + orc_union64 var37; + orc_union64 var38; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union64 *)ex->arrays[4]; + + /* 1: loadpl */ + var35.x2[0] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + var35.x2[1] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var34 = ptr4[i]; + /* 2: mulf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[0]); + _src2.i = ORC_DENORMAL(var35.x2[0]); + _dest1.f = _src1.f * _src2.f; + var37.x2[0] = ORC_DENORMAL(_dest1.i); + } + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[1]); + _src2.i = ORC_DENORMAL(var35.x2[1]); + _dest1.f = _src1.f * _src2.f; + var37.x2[1] = ORC_DENORMAL(_dest1.i); + } + /* 3: convfl */ + { + int tmp; + tmp = (int)var37.x2f[0]; + if (tmp == 0x80000000 && !(var37.x2[0]&0x80000000)) tmp = 0x7fffffff; + var38.x2[0] = tmp; + } + { + int tmp; + tmp = (int)var37.x2f[1]; + if (tmp == 0x80000000 && !(var37.x2[1]&0x80000000)) tmp = 0x7fffffff; + var38.x2[1] = tmp; + } + /* 4: convlw */ + var36.x2[0] = var38.x2[0]; + var36.x2[1] = var38.x2[1]; + /* 5: storel */ + ptr0[i] = var36; + } + +} + +/* param64 */ +static void +_backup_param64 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var32.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +/* const64 */ +static void +_backup_const64 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var32.i = ORC_UINT64_C(0x0123456789abcdef); /* 3.5127e-303f */ + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +/* param64_2 */ +static void +_backup_param64_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var34.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var34.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +/* pa_volume_s16ne_orc_2ch */ +static void +_backup_pa_volume_s16ne_orc_2ch (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpq */ + var41.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + /* 5: loadpw */ + var39.x4[0] = 0x00000000; /* 0 or 0f */ + var39.x4[1] = 0x00000000; /* 0 or 0f */ + var39.x4[2] = 0x00000000; /* 0 or 0f */ + var39.x4[3] = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 1: loadl */ + var37 = ptr0[i]; + /* 2: convuwl */ + var42.x2[0] = (orc_uint16)var37.x2[0]; + var42.x2[1] = (orc_uint16)var37.x2[1]; + /* 3: loadl */ + var38 = ptr0[i]; + /* 4: convswl */ + var43.x2[0] = var38.x2[0]; + var43.x2[1] = var38.x2[1]; + /* 6: cmpgtsw */ + var44.x4[0] = (var39.x4[0] > var42.x4[0]) ? (~0) : 0; + var44.x4[1] = (var39.x4[1] > var42.x4[1]) ? (~0) : 0; + var44.x4[2] = (var39.x4[2] > var42.x4[2]) ? (~0) : 0; + var44.x4[3] = (var39.x4[3] > var42.x4[3]) ? (~0) : 0; + /* 7: andw */ + var45.x4[0] = var44.x4[0] & var41.x4[0]; + var45.x4[1] = var44.x4[1] & var41.x4[1]; + var45.x4[2] = var44.x4[2] & var41.x4[2]; + var45.x4[3] = var44.x4[3] & var41.x4[3]; + /* 8: mulhuw */ + var46.x4[0] = ((orc_uint32)((orc_uint16)var42.x4[0]) * (orc_uint32)((orc_uint16)var41.x4[0])) >> 16; + var46.x4[1] = ((orc_uint32)((orc_uint16)var42.x4[1]) * (orc_uint32)((orc_uint16)var41.x4[1])) >> 16; + var46.x4[2] = ((orc_uint32)((orc_uint16)var42.x4[2]) * (orc_uint32)((orc_uint16)var41.x4[2])) >> 16; + var46.x4[3] = ((orc_uint32)((orc_uint16)var42.x4[3]) * (orc_uint32)((orc_uint16)var41.x4[3])) >> 16; + /* 9: subl */ + var47.x2[0] = var46.x2[0] - var45.x2[0]; + var47.x2[1] = var46.x2[1] - var45.x2[1]; + /* 10: shrul */ + var48.x2[0] = ((orc_uint32)var41.x2[0]) >> 16; + var48.x2[1] = ((orc_uint32)var41.x2[1]) >> 16; + /* 11: mulll */ + var49.x2[0] = (var43.x2[0] * var48.x2[0]) & 0xffffffff; + var49.x2[1] = (var43.x2[1] * var48.x2[1]) & 0xffffffff; + /* 12: addl */ + var50.x2[0] = var47.x2[0] + var49.x2[0]; + var50.x2[1] = var47.x2[1] + var49.x2[1]; + /* 13: convssslw */ + var40.x2[0] = ORC_CLAMP_SW(var50.x2[0]); + var40.x2[1] = ORC_CLAMP_SW(var50.x2[1]); + /* 14: storel */ + ptr0[i] = var40; + } + +} + + +static int quiet = 0; +static int benchmark = 0; + +static void help (const char *argv0) +{ + printf("Usage:\n"); + printf(" %s [OPTION]\n", argv0); + printf("Help Options:\n"); + printf(" -h, --help Show help options\n"); + printf("Application Options:\n"); + printf(" -b, --benchmark Run benchmark and show results\n"); + printf(" -q, --quiet Don't output anything except on failures\n"); + + exit(0); +} + +int +main (int argc, char *argv[]) +{ + int error = FALSE; + int i; + + orc_test_init (); + + for(i=1;i + +int +main (int argc, char *argv[]) +{ + + /* This is mostly just to test that compilation works */ + + return 0; +} + diff --git a/testsuite/orcc/test3.c b/testsuite/orcc/test3.c new file mode 100644 index 0000000..eee43c8 --- /dev/null +++ b/testsuite/orcc/test3.c @@ -0,0 +1,12 @@ + +#include + +int +main (int argc, char *argv[]) +{ + + /* This is mostly just to test that compilation works */ + + return 0; +} + diff --git a/testsuite/orcc/testorc.c b/testsuite/orcc/testorc.c new file mode 100644 index 0000000..a4b3c0b --- /dev/null +++ b/testsuite/orcc/testorc.c @@ -0,0 +1,22743 @@ + +/* autogenerated from test.orc */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifndef DISABLE_ORC +#include +#endif +#include + +#ifndef _ORC_INTEGER_TYPEDEFS_ +#define _ORC_INTEGER_TYPEDEFS_ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +typedef int8_t orc_int8; +typedef int16_t orc_int16; +typedef int32_t orc_int32; +typedef int64_t orc_int64; +typedef uint8_t orc_uint8; +typedef uint16_t orc_uint16; +typedef uint32_t orc_uint32; +typedef uint64_t orc_uint64; +#define ORC_UINT64_C(x) UINT64_C(x) +#elif defined(_MSC_VER) +typedef signed __int8 orc_int8; +typedef signed __int16 orc_int16; +typedef signed __int32 orc_int32; +typedef signed __int64 orc_int64; +typedef unsigned __int8 orc_uint8; +typedef unsigned __int16 orc_uint16; +typedef unsigned __int32 orc_uint32; +typedef unsigned __int64 orc_uint64; +#define ORC_UINT64_C(x) (x##Ui64) +#else +#include +typedef signed char orc_int8; +typedef short orc_int16; +typedef int orc_int32; +typedef unsigned char orc_uint8; +typedef unsigned short orc_uint16; +typedef unsigned int orc_uint32; +#if INT_MAX == LONG_MAX +typedef long long orc_int64; +typedef unsigned long long orc_uint64; +#define ORC_UINT64_C(x) (x##ULL) +#else +typedef long orc_int64; +typedef unsigned long orc_uint64; +#define ORC_UINT64_C(x) (x##UL) +#endif +#endif +typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; +typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; +typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; +#endif + +void orc_add2_rshift_add_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); +void orc_add2_rshift_add_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add2_rshift_sub_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); +void orc_add2_rshift_sub_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add2_rshift_add_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); +void orc_add2_rshift_add_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add2_rshift_sub_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); +void orc_add2_rshift_sub_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add_const_rshift_s16_11 (int16_t * d1, const int16_t * s1, int n); +void orc_add_const_rshift_s16 (int16_t * d1, int p1, int p2, int n); +void orc_add_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add_s16_2d (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int n, int m); +void orc_addc_rshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int n); +void orc_lshift1_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_lshift2_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_lshift_s16_ip (int16_t * d1, int p1, int n); +void orc_mas2_add_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n); +void orc_mas2_add_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n); +void orc_mas2_sub_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n); +void orc_mas2_sub_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n); +void orc_mas4_across_add_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n); +void orc_mas4_across_add_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n); +void orc_mas4_across_sub_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n); +void orc_mas4_across_sub_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n); +void orc_subtract_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n); +void orc_add_s16_u8_2d (int16_t * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, int n, int m); +void orc_convert_s16_u8 (orc_uint16 * d1, const orc_uint8 * s1, int n); +void orc_convert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n); +void orc_offsetconvert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n); +void orc_offsetconvert_s16_u8 (int16_t * d1, const orc_uint8 * s1, int n); +void orc_subtract_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n); +void orc_multiply_and_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n); +void orc_splat_s16_ns (int16_t * d1, int p1, int n); +void orc_splat_s16_2d_4xn (int16_t * d1, int d1_stride, int p1, int m); +void orc_splat_s16_2d_8xn (int16_t * d1, int d1_stride, int p1, int m); +void orc_splat_s16_2d (int16_t * d1, int d1_stride, int p1, int n, int m); +void orc_splat_u8_ns (orc_uint8 * d1, int p1, int n); +void orc_splat_u8_2d (orc_uint8 * d1, int d1_stride, int p1, int n, int m); +void orc_average_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n); +void orc_rrshift6_add_s16_2d (uint8_t * d1, int d1_stride, const int16_t * s1, int s1_stride, const int16_t * s2, int s2_stride, int n, int m); +void orc_rrshift6_sub_s16_2d (int16_t * d1, int d1_stride, int16_t * d2, int d2_stride, int n, int m); +void orc_rrshift6_s16_ip_2d (int16_t * d1, int d1_stride, int n, int m); +void orc_rrshift6_s16_ip (int16_t * d1, int n); +void orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n); +void orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n); +void orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n); +void orc_packyuyv (orc_uint32 * d1, const uint8_t * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n); +void orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n); +void orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n); +void orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n); +void orc_interleave2_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_interleave2_rrshift1_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_deinterleave2_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n); +void orc_deinterleave2_lshift1_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n); +void orc_haar_deint_lshift1_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n); +void orc_haar_deint_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n); +void orc_haar_split_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_split_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_split_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_split_s16 (int16_t * d1, int16_t * d2, int n); +void orc_haar_synth_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_synth_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_synth_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_synth_s16 (int16_t * d1, int16_t * d2, int n); +void orc_haar_synth_rrshift1_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_synth_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_haar_sub_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_haar_add_half_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_haar_add_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_haar_sub_half_s16 (int16_t * d1, const int16_t * s1, int n); +void orc_sum_u8 (int32_t * a1, const orc_uint8 * s1, int n); +void orc_sum_s16 (int32_t * a1, const int16_t * s1, int n); +void orc_sum_square_diff_u8 (int32_t * a1, const orc_uint8 * s1, const orc_uint8 * s2, int n); +void orc_dequantise_s16_2d_4xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m); +void orc_dequantise_s16_2d_8xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m); +void orc_dequantise_s16_ip_2d_8xn (int16_t * d1, int d1_stride, int p1, int p2, int m); +void orc_dequantise_s16_ip_2d (int16_t * d1, int d1_stride, int p1, int p2, int n, int m); +void orc_dequantise_s16_ip (int16_t * d1, int p1, int p2, int n); +void orc_dequantise_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n); +void orc_dequantise_var_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int n); +void orc_quantise1_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int p3, int n); +void orc_quantise2_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n); +void orc_quantdequant1_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int n); +void orc_quantdequant3_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int p6, int n); +void orc_quantdequant2_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int n); +void orc_downsample_vert_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n); +void orc_downsample_horiz_u8 (orc_uint8 * d1, const uint8_t * s1, const uint8_t * s2, int n); +void orc_stats_moment_s16 (int32_t * a1, const int16_t * s1, int n); +void orc_stats_above_s16 (int32_t * a1, const int16_t * s1, int n); +void orc_accw (int * a1, const int16_t * s1, int n); +void orc_avg2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void orc_avg2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void orc_avg2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void orc_avg2_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void orc_avg2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m); +void orc_combine4_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine4_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine4_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine4_24xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine4_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine4_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int n, int m); +void orc_combine2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m); +void orc_combine2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int n, int m); +void orc_sad_nxm_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m); +void orc_sad_8x8_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride); +void orc_sad_12x12_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride); +void orc_sad_16xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void orc_sad_32xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m); +void convert_rgb_to_gray (orc_uint8 * d1, const orc_uint32 * s1, int n); +void canny_calc_delta_x (int32_t * d1, const uint8_t * s1, const uint8_t * s2, int n); +void i420_to_ayuv (orc_uint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int p1, int n); +void test_4x (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void test_4x_2 (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n); +void orc_splat_u16 (uint16_t * d1, int p1, int n); +void orc_splat_u32 (uint32_t * d1, int p1, int n); +void orc_splat_u16_2d (uint16_t * d1, int d1_stride, int p1, int n, int m); +void orc_splat_u32_2d (uint32_t * d1, int d1_stride, int p1, int n, int m); +void orc_copy_u16_2d (orc_uint16 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, int n, int m); +void orc_copy_u32_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m); +void orc_composite_add_8888_8888_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m); +void orc_composite_add_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int n); +void orc_composite_add_n_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int p1, int n); +void orc_code_combine_add_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_add_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_over_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_over_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_in_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_in_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_out_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_out_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_atop_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_atop_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_xor_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_xor_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_add_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_add_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_code_combine_over_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n); +void orc_code_combine_over_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n); +void orc_composite_over_8888_8_8888_line (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint8 * s2, int n); +void orc_composite_over_n_8888_8888_ca_2d (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n); +void cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n); +void cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n); +void test_float_constant_1 (orc_uint32 * d1, int n); +void test_float_constant_2 (orc_uint32 * d1, int n); +void convert_fc32_to_int32 (orc_uint32 * d1, const orc_uint64 * s1, int n); +void param64 (orc_uint64 * d1, int p1, int n); +void const64 (orc_uint64 * d1, int n); +void param64_2 (orc_uint64 * d1, orc_int64 p1, int n); +void pa_volume_s16ne_orc_2ch (int16_t * d1, orc_int64 p1, int n); + + +/* begin Orc C target preamble */ +#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) +#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) +#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) +#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b)) +#define ORC_SB_MAX 127 +#define ORC_SB_MIN (-1-ORC_SB_MAX) +#define ORC_UB_MAX 255 +#define ORC_UB_MIN 0 +#define ORC_SW_MAX 32767 +#define ORC_SW_MIN (-1-ORC_SW_MAX) +#define ORC_UW_MAX 65535 +#define ORC_UW_MIN 0 +#define ORC_SL_MAX 2147483647 +#define ORC_SL_MIN (-1-ORC_SL_MAX) +#define ORC_UL_MAX 4294967295U +#define ORC_UL_MIN 0 +#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX) +#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX) +#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX) +#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX) +#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX) +#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX) +#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8)) +#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24)) +#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56)) +#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) +#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff)) +#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0)) +#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff))) +#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0)) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define ORC_RESTRICT restrict +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define ORC_RESTRICT __restrict__ +#else +#define ORC_RESTRICT +#endif +/* end Orc C target preamble */ + + + +/* orc_add2_rshift_add_s16_22_op */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_add_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_add2_rshift_add_s16_22_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +void +orc_add2_rshift_add_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_add_s16_22_op"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_22_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_add_s16_22 */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_add_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_add2_rshift_add_s16_22 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: addw */ + var37.i = var36.i + var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +void +orc_add2_rshift_add_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_add_s16_22"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_22); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_sub_s16_22_op */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_sub_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_add2_rshift_sub_s16_22_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr4[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +void +orc_add2_rshift_sub_s16_22_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_sub_s16_22_op"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_22_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_sub_s16_22 */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_sub_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_add2_rshift_sub_s16_22 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var38.i = var33.i + var34.i; + /* 4: addw */ + var39.i = var38.i + var35.i; + /* 5: shrsw */ + var40.i = var39.i >> 2; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var40.i; + /* 8: storew */ + ptr0[i] = var37; + } + +} + +void +orc_add2_rshift_sub_s16_22 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_sub_s16_22"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_22); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_add_s16_11_op */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_add_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_add2_rshift_add_s16_11_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_add2_rshift_add_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_add_s16_11_op"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_11_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_add_s16_11 */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_add_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_add2_rshift_add_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_add2_rshift_add_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_add_s16_11"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_11); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_sub_s16_11_op */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_sub_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_add2_rshift_sub_s16_11_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 1: loadw */ + var34 = ptr6[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_add2_rshift_sub_s16_11_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_sub_s16_11_op"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_11_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add2_rshift_sub_s16_11 */ +#ifdef DISABLE_ORC +void +orc_add2_rshift_sub_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_add2_rshift_sub_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_add2_rshift_sub_s16_11 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add2_rshift_sub_s16_11"); + orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_11); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_const_rshift_s16_11 */ +#ifdef DISABLE_ORC +void +orc_add_const_rshift_s16_11 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 1: loadpw */ + var34.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 1; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_add_const_rshift_s16_11 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 1; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_add_const_rshift_s16_11 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add_const_rshift_s16_11"); + orc_program_set_backup_function (p, _backup_orc_add_const_rshift_s16_11); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_const_rshift_s16 */ +#ifdef DISABLE_ORC +void +orc_add_const_rshift_s16 (int16_t * d1, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + + /* 1: loadpw */ + var34.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> p2; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_add_const_rshift_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 1: loadpw */ + var34.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> ex->params[25]; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_add_const_rshift_s16 (int16_t * d1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add_const_rshift_s16"); + orc_program_set_backup_function (p, _backup_orc_add_const_rshift_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_s16 */ +#ifdef DISABLE_ORC +void +orc_add_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_add_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +orc_add_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add_s16"); + orc_program_set_backup_function (p, _backup_orc_add_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_s16_2d */ +#ifdef DISABLE_ORC +void +orc_add_s16_2d (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_add_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + } + +} + +void +orc_add_s16_2d (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_add_s16_2d"); + orc_program_set_backup_function (p, _backup_orc_add_s16_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_addc_rshift_s16 */ +#ifdef DISABLE_ORC +void +orc_addc_rshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> p1; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_addc_rshift_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: loadw */ + var34 = ptr5[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: shrsw */ + var35.i = var36.i >> ex->params[24]; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_addc_rshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_addc_rshift_s16"); + orc_program_set_backup_function (p, _backup_orc_addc_rshift_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_lshift1_s16 */ +#ifdef DISABLE_ORC +void +orc_lshift1_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 1; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 1; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_lshift1_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_lshift1_s16"); + orc_program_set_backup_function (p, _backup_orc_lshift1_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + + orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_lshift2_s16 */ +#ifdef DISABLE_ORC +void +orc_lshift2_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 2; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_lshift2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: shlw */ + var33.i = var32.i << 2; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_lshift2_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_lshift2_s16"); + orc_program_set_backup_function (p, _backup_orc_lshift2_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + + orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_lshift_s16_ip */ +#ifdef DISABLE_ORC +void +orc_lshift_s16_ip (int16_t * d1, int p1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: shlw */ + var33.i = var32.i << p1; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_lshift_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: shlw */ + var33.i = var32.i << ex->params[24]; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_lshift_s16_ip (int16_t * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_lshift_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_lshift_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas2_add_s16_op */ +#ifdef DISABLE_ORC +void +orc_mas2_add_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + /* 3: loadpw */ + var36.i = p1; + /* 5: loadpl */ + var37.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> p3; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_mas2_add_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +void +orc_mas2_add_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas2_add_s16_op"); + orc_program_set_backup_function (p, _backup_orc_mas2_add_s16_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_parameter (p, 4, "p3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas2_add_s16_ip */ +#ifdef DISABLE_ORC +void +orc_mas2_add_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 3: loadpw */ + var36.i = p1; + /* 5: loadpl */ + var37.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> p3; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_mas2_add_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: addw */ + var39.i = var38.i + var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +void +orc_mas2_add_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas2_add_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_mas2_add_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_parameter (p, 4, "p3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas2_sub_s16_op */ +#ifdef DISABLE_ORC +void +orc_mas2_sub_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + + /* 3: loadpw */ + var36.i = p1; + /* 5: loadpl */ + var37.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> p3; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_mas2_sub_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: loadw */ + var35 = ptr6[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr4[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +void +orc_mas2_sub_s16_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, int p1, int p2, int p3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas2_sub_s16_op"); + orc_program_set_backup_function (p, _backup_orc_mas2_sub_s16_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_parameter (p, 4, "p3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas2_sub_s16_ip */ +#ifdef DISABLE_ORC +void +orc_mas2_sub_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 3: loadpw */ + var36.i = p1; + /* 5: loadpl */ + var37.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> p3; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_mas2_sub_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 3: loadpw */ + var36.i = ex->params[24]; + /* 5: loadpl */ + var37.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: loadw */ + var35 = ptr5[i]; + /* 2: addw */ + var40.i = var34.i + var35.i; + /* 4: mulswl */ + var41.i = var40.i * var36.i; + /* 6: addl */ + var42.i = var41.i + var37.i; + /* 7: shrsl */ + var43.i = var42.i >> ex->params[26]; + /* 8: convlw */ + var44.i = var43.i; + /* 9: loadw */ + var38 = ptr0[i]; + /* 10: subw */ + var39.i = var38.i - var44.i; + /* 11: storew */ + ptr0[i] = var39; + } + +} + +void +orc_mas2_sub_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int p1, int p2, int p3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas2_sub_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_mas2_sub_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_parameter (p, 4, "p3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas4_across_add_s16_1991_op */ +#ifdef DISABLE_ORC +void +orc_mas4_across_add_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + ptr7 = (orc_union16 *)s4; + ptr8 = (orc_union16 *)s5; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> p2; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_mas4_across_add_s16_1991_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + ptr8 = (orc_union16 *)ex->arrays[8]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +void +orc_mas4_across_add_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas4_across_add_s16_1991_op"); + orc_program_set_backup_function (p, _backup_orc_mas4_across_add_s16_1991_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_source (p, 2, "s4"); + orc_program_add_source (p, 2, "s5"); + orc_program_add_constant (p, 4, 0x00000009, "c1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S5, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->arrays[ORC_VAR_S5] = (void *)s5; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas4_across_add_s16_1991_ip */ +#ifdef DISABLE_ORC +void +orc_mas4_across_add_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + ptr7 = (orc_union16 *)s4; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> p2; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_mas4_across_add_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: addw */ + var43.i = var42.i + var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +void +orc_mas4_across_add_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas4_across_add_s16_1991_ip"); + orc_program_set_backup_function (p, _backup_orc_mas4_across_add_s16_1991_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_source (p, 2, "s4"); + orc_program_add_constant (p, 4, 0x00000009, "c1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_S4, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas4_across_sub_s16_1991_op */ +#ifdef DISABLE_ORC +void +orc_mas4_across_sub_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + ptr7 = (orc_union16 *)s4; + ptr8 = (orc_union16 *)s5; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> p2; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_mas4_across_sub_s16_1991_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + const orc_union16 * ORC_RESTRICT ptr8; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + ptr8 = (orc_union16 *)ex->arrays[8]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr6[i]; + /* 1: loadw */ + var37 = ptr7[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr5[i]; + /* 6: loadw */ + var40 = ptr8[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr4[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +void +orc_mas4_across_sub_s16_1991_op (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas4_across_sub_s16_1991_op"); + orc_program_set_backup_function (p, _backup_orc_mas4_across_sub_s16_1991_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_source (p, 2, "s4"); + orc_program_add_source (p, 2, "s5"); + orc_program_add_constant (p, 4, 0x00000009, "c1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S5, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->arrays[ORC_VAR_S5] = (void *)s5; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_mas4_across_sub_s16_1991_ip */ +#ifdef DISABLE_ORC +void +orc_mas4_across_sub_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + ptr6 = (orc_union16 *)s3; + ptr7 = (orc_union16 *)s4; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> p2; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_mas4_across_sub_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + const orc_union16 * ORC_RESTRICT ptr6; + const orc_union16 * ORC_RESTRICT ptr7; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union32 var45; + orc_union16 var46; + orc_union32 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + ptr6 = (orc_union16 *)ex->arrays[6]; + ptr7 = (orc_union16 *)ex->arrays[7]; + + /* 3: loadpw */ + var38.i = 0x00000009; /* 9 or 4.44659e-323f */ + /* 10: loadpl */ + var41.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var36 = ptr5[i]; + /* 1: loadw */ + var37 = ptr6[i]; + /* 2: addw */ + var44.i = var36.i + var37.i; + /* 4: mulswl */ + var45.i = var44.i * var38.i; + /* 5: loadw */ + var39 = ptr4[i]; + /* 6: loadw */ + var40 = ptr7[i]; + /* 7: addw */ + var46.i = var39.i + var40.i; + /* 8: convswl */ + var47.i = var46.i; + /* 9: subl */ + var48.i = var45.i - var47.i; + /* 11: addl */ + var49.i = var48.i + var41.i; + /* 12: shrsl */ + var50.i = var49.i >> ex->params[25]; + /* 13: convlw */ + var51.i = var50.i; + /* 14: loadw */ + var42 = ptr0[i]; + /* 15: subw */ + var43.i = var42.i - var51.i; + /* 16: storew */ + ptr0[i] = var43; + } + +} + +void +orc_mas4_across_sub_s16_1991_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_mas4_across_sub_s16_1991_ip"); + orc_program_set_backup_function (p, _backup_orc_mas4_across_sub_s16_1991_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_source (p, 2, "s3"); + orc_program_add_source (p, 2, "s4"); + orc_program_add_constant (p, 4, 0x00000009, "c1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_S4, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_subtract_s16 */ +#ifdef DISABLE_ORC +void +orc_subtract_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_subtract_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +orc_subtract_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_subtract_s16"); + orc_program_set_backup_function (p, _backup_orc_subtract_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_s16_u8 */ +#ifdef DISABLE_ORC +void +orc_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_int8 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: addw */ + var35.i = var36.i + var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: addw */ + var35.i = var36.i + var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_add_s16_u8"); + orc_program_set_backup_function (p, _backup_orc_add_s16_u8); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_add_s16_u8_2d */ +#ifdef DISABLE_ORC +void +orc_add_s16_u8_2d (int16_t * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr0[i]; + /* 3: addw */ + var35.i = var34.i + var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +#else +static void +_backup_orc_add_s16_u8_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr0[i]; + /* 3: addw */ + var35.i = var34.i + var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +void +orc_add_s16_u8_2d (int16_t * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_add_s16_u8_2d"); + orc_program_set_backup_function (p, _backup_orc_add_s16_u8_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_convert_s16_u8 */ +#ifdef DISABLE_ORC +void +orc_convert_s16_u8 (orc_uint16 * d1, const orc_uint8 * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: convubw */ + var33.i = (orc_uint8)var32; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_convert_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: convubw */ + var33.i = (orc_uint8)var32; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_convert_s16_u8 (orc_uint16 * d1, const orc_uint8 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_convert_s16_u8"); + orc_program_set_backup_function (p, _backup_orc_convert_s16_u8); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 1, "s1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_convert_u8_s16 */ +#ifdef DISABLE_ORC +void +orc_convert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convsuswb */ + var33 = ORC_CLAMP_UB(var32.i); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_convert_u8_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: convsuswb */ + var33 = ORC_CLAMP_UB(var32.i); + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_convert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_convert_u8_s16"); + orc_program_set_backup_function (p, _backup_orc_convert_u8_s16); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_offsetconvert_u8_s16 */ +#ifdef DISABLE_ORC +void +orc_offsetconvert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_int8 var35; + orc_union16 var36; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 1: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: convsuswb */ + var35 = ORC_CLAMP_UB(var36.i); + /* 4: storeb */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_offsetconvert_u8_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_int8 var35; + orc_union16 var36; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var36.i = var33.i + var34.i; + /* 3: convsuswb */ + var35 = ORC_CLAMP_UB(var36.i); + /* 4: storeb */ + ptr0[i] = var35; + } + +} + +void +orc_offsetconvert_u8_s16 (orc_uint8 * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_offsetconvert_u8_s16"); + orc_program_set_backup_function (p, _backup_orc_offsetconvert_u8_s16); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000080, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_offsetconvert_s16_u8 */ +#ifdef DISABLE_ORC +void +orc_offsetconvert_s16_u8 (int16_t * d1, const orc_uint8 * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_int8 *)s1; + + /* 2: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 3: subw */ + var35.i = var36.i - var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_offsetconvert_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + /* 2: loadpw */ + var34.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr4[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 3: subw */ + var35.i = var36.i - var34.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_offsetconvert_s16_u8 (int16_t * d1, const orc_uint8 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_offsetconvert_s16_u8"); + orc_program_set_backup_function (p, _backup_orc_offsetconvert_s16_u8); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_constant (p, 4, 0x00000080, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_subtract_s16_u8 */ +#ifdef DISABLE_ORC +void +orc_subtract_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_int8 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: subw */ + var35.i = var34.i - var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_subtract_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var36.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: subw */ + var35.i = var34.i - var36.i; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_subtract_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_subtract_s16_u8"); + orc_program_set_backup_function (p, _backup_orc_subtract_s16_u8); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_multiply_and_add_s16_u8 */ +#ifdef DISABLE_ORC +void +orc_multiply_and_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_int8 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: mullw */ + var38.i = (var37.i * var34.i) & 0xffff; + /* 4: loadw */ + var35 = ptr0[i]; + /* 5: addw */ + var36.i = var35.i + var38.i; + /* 6: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_multiply_and_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var33 = ptr5[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var33; + /* 2: loadw */ + var34 = ptr4[i]; + /* 3: mullw */ + var38.i = (var37.i * var34.i) & 0xffff; + /* 4: loadw */ + var35 = ptr0[i]; + /* 5: addw */ + var36.i = var35.i + var38.i; + /* 6: storew */ + ptr0[i] = var36; + } + +} + +void +orc_multiply_and_add_s16_u8 (int16_t * d1, const int16_t * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_multiply_and_add_s16_u8"); + orc_program_set_backup_function (p, _backup_orc_multiply_and_add_s16_u8); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_s16_ns */ +#ifdef DISABLE_ORC +void +orc_splat_s16_ns (int16_t * d1, int p1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_splat_s16_ns (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_splat_s16_ns (int16_t * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_splat_s16_ns"); + orc_program_set_backup_function (p, _backup_orc_splat_s16_ns); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_s16_2d_4xn */ +#ifdef DISABLE_ORC +void +orc_splat_s16_2d_4xn (int16_t * d1, int d1_stride, int p1, int m){ + int i; + int j; + int n = 4; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 4; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_s16_2d_4xn (int16_t * d1, int d1_stride, int p1, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 4); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_s16_2d_4xn"); + orc_program_set_backup_function (p, _backup_orc_splat_s16_2d_4xn); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 4; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_s16_2d_8xn */ +#ifdef DISABLE_ORC +void +orc_splat_s16_2d_8xn (int16_t * d1, int d1_stride, int p1, int m){ + int i; + int j; + int n = 8; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_s16_2d_8xn (int16_t * d1, int d1_stride, int p1, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_s16_2d_8xn"); + orc_program_set_backup_function (p, _backup_orc_splat_s16_2d_8xn); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_s16_2d */ +#ifdef DISABLE_ORC +void +orc_splat_s16_2d (int16_t * d1, int d1_stride, int p1, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_s16_2d (int16_t * d1, int d1_stride, int p1, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_s16_2d"); + orc_program_set_backup_function (p, _backup_orc_splat_s16_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u8_ns */ +#ifdef DISABLE_ORC +void +orc_splat_u8_ns (orc_uint8 * d1, int p1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + + /* 0: loadpb */ + var32 = p1; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_splat_u8_ns (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + + /* 0: loadpb */ + var32 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_splat_u8_ns (orc_uint8 * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_splat_u8_ns"); + orc_program_set_backup_function (p, _backup_orc_splat_u8_ns); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_parameter (p, 1, "p1"); + + orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u8_2d */ +#ifdef DISABLE_ORC +void +orc_splat_u8_2d (orc_uint8 * d1, int d1_stride, int p1, int n, int m){ + int i; + int j; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpb */ + var32 = p1; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_u8_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpb */ + var32 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyb */ + var33 = var32; + /* 2: storeb */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_u8_2d (orc_uint8 * d1, int d1_stride, int p1, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_u8_2d"); + orc_program_set_backup_function (p, _backup_orc_splat_u8_2d); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_parameter (p, 1, "p1"); + + orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_average_u8 */ +#ifdef DISABLE_ORC +void +orc_average_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + ptr5 = (orc_int8 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_average_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_average_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_average_u8"); + orc_program_set_backup_function (p, _backup_orc_average_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_rrshift6_add_s16_2d */ +#ifdef DISABLE_ORC +void +orc_rrshift6_add_s16_2d (uint8_t * d1, int d1_stride, const int16_t * s1, int s1_stride, const int16_t * s2, int s2_stride, int n, int m){ + int i; + int j; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + /* 1: loadpw */ + var34.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var37.i = var33.i + var34.i; + /* 3: shrsw */ + var38.i = var37.i >> 6; + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: addw */ + var39.i = var35.i + var38.i; + /* 6: convsuswb */ + var36 = ORC_CLAMP_UB(var39.i); + /* 7: storeb */ + ptr0[i] = var36; + } + } + +} + +#else +static void +_backup_orc_rrshift6_add_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 1: loadpw */ + var34.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: addw */ + var37.i = var33.i + var34.i; + /* 3: shrsw */ + var38.i = var37.i >> 6; + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: addw */ + var39.i = var35.i + var38.i; + /* 6: convsuswb */ + var36 = ORC_CLAMP_UB(var39.i); + /* 7: storeb */ + ptr0[i] = var36; + } + } + +} + +void +orc_rrshift6_add_s16_2d (uint8_t * d1, int d1_stride, const int16_t * s1, int s1_stride, const int16_t * s2, int s2_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_rrshift6_add_s16_2d"); + orc_program_set_backup_function (p, _backup_orc_rrshift6_add_s16_2d); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000020, "c1"); + orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_rrshift6_sub_s16_2d */ +#ifdef DISABLE_ORC +void +orc_rrshift6_sub_s16_2d (int16_t * d1, int d1_stride, int16_t * d2, int d2_stride, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr1 = ORC_PTR_OFFSET(d2, d2_stride * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr1[i]; + /* 2: subw */ + var38.i = var33.i - var34.i; + /* 3: shrsw */ + var39.i = var38.i >> 6; + /* 4: copyw */ + var35.i = var39.i; + /* 5: storew */ + ptr1[i] = var35; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var39.i; + /* 8: storew */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_orc_rrshift6_sub_s16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr1 = ORC_PTR_OFFSET(ex->arrays[1], ex->params[1] * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr1[i]; + /* 2: subw */ + var38.i = var33.i - var34.i; + /* 3: shrsw */ + var39.i = var38.i >> 6; + /* 4: copyw */ + var35.i = var39.i; + /* 5: storew */ + ptr1[i] = var35; + /* 6: loadw */ + var36 = ptr0[i]; + /* 7: subw */ + var37.i = var36.i - var39.i; + /* 8: storew */ + ptr0[i] = var37; + } + } + +} + +void +orc_rrshift6_sub_s16_2d (int16_t * d1, int d1_stride, int16_t * d2, int d2_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_rrshift6_sub_s16_2d"); + orc_program_set_backup_function (p, _backup_orc_rrshift6_sub_s16_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00001fe0, "c1"); + orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_D2] = d2; + ex->params[ORC_VAR_D2] = d2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_rrshift6_s16_ip_2d */ +#ifdef DISABLE_ORC +void +orc_rrshift6_s16_ip_2d (int16_t * d1, int d1_stride, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +#else +static void +_backup_orc_rrshift6_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + } + +} + +void +orc_rrshift6_s16_ip_2d (int16_t * d1, int d1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_rrshift6_s16_ip_2d"); + orc_program_set_backup_function (p, _backup_orc_rrshift6_s16_ip_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_constant (p, 4, 0x00001fe0, "c1"); + orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_rrshift6_s16_ip */ +#ifdef DISABLE_ORC +void +orc_rrshift6_s16_ip (int16_t * d1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)d1; + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +#else +static void +_backup_orc_rrshift6_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 1: loadpw */ + var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr0[i]; + /* 2: subw */ + var36.i = var33.i - var34.i; + /* 3: shrsw */ + var35.i = var36.i >> 6; + /* 4: storew */ + ptr0[i] = var35; + } + +} + +void +orc_rrshift6_s16_ip (int16_t * d1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_rrshift6_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_rrshift6_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_constant (p, 4, 0x00001fe0, "c1"); + orc_program_add_constant (p, 4, 0x00000006, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_yuyv_y */ +#ifdef DISABLE_ORC +void +orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select0wb */ + var33 = (orc_uint16)var32.i & 0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_unpack_yuyv_y (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select0wb */ + var33 = (orc_uint16)var32.i & 0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_yuyv_y"); + orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_y); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_yuyv_u */ +#ifdef DISABLE_ORC +void +orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_unpack_yuyv_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_yuyv_u"); + orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_u); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_yuyv_v */ +#ifdef DISABLE_ORC +void +orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_unpack_yuyv_v (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select1wb */ + var34 = ((orc_uint16)var35.i >> 8)&0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_yuyv_v"); + orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_v); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_packyuyv */ +#ifdef DISABLE_ORC +void +orc_packyuyv (orc_uint32 * d1, const uint8_t * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union32 var40; + orc_union16 var41; + orc_int8 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_int8 *)s2; + ptr6 = (orc_int8 *)s3; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var37 = ptr4[i]; + /* 1: copyw */ + var41.i = var37.i; + /* 2: select0wb */ + var42 = (orc_uint16)var41.i & 0xff; + /* 3: select1wb */ + var43 = ((orc_uint16)var41.i >> 8)&0xff; + /* 4: loadb */ + var38 = ptr5[i]; + /* 5: mergebw */ + var44.i = ((orc_uint8)var42 & 0x00ff) | ((orc_uint8)var38 << 8); + /* 6: loadb */ + var39 = ptr6[i]; + /* 7: mergebw */ + var45.i = ((orc_uint8)var43 & 0x00ff) | ((orc_uint8)var39 << 8); + /* 8: mergewl */ + var40.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 9: storel */ + ptr0[i] = var40; + } + +} + +#else +static void +_backup_orc_packyuyv (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union32 var40; + orc_union16 var41; + orc_int8 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var37 = ptr4[i]; + /* 1: copyw */ + var41.i = var37.i; + /* 2: select0wb */ + var42 = (orc_uint16)var41.i & 0xff; + /* 3: select1wb */ + var43 = ((orc_uint16)var41.i >> 8)&0xff; + /* 4: loadb */ + var38 = ptr5[i]; + /* 5: mergebw */ + var44.i = ((orc_uint8)var42 & 0x00ff) | ((orc_uint8)var38 << 8); + /* 6: loadb */ + var39 = ptr6[i]; + /* 7: mergebw */ + var45.i = ((orc_uint8)var43 & 0x00ff) | ((orc_uint8)var39 << 8); + /* 8: mergewl */ + var40.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 9: storel */ + ptr0[i] = var40; + } + +} + +void +orc_packyuyv (orc_uint32 * d1, const uint8_t * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_packyuyv"); + orc_program_set_backup_function (p, _backup_orc_packyuyv); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_temporary (p, 1, "t1"); + orc_program_add_temporary (p, 1, "t2"); + orc_program_add_temporary (p, 2, "t3"); + orc_program_add_temporary (p, 2, "t4"); + orc_program_add_temporary (p, 2, "t5"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_uyvy_y */ +#ifdef DISABLE_ORC +void +orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select1wb */ + var33 = ((orc_uint16)var32.i >> 8)&0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_unpack_uyvy_y (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_int8 var33; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: select1wb */ + var33 = ((orc_uint16)var32.i >> 8)&0xff; + /* 2: storeb */ + ptr0[i] = var33; + } + +} + +void +orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_uyvy_y"); + orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_y); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_uyvy_u */ +#ifdef DISABLE_ORC +void +orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_unpack_uyvy_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select0lw */ + var35.i = (orc_uint32)var33.i & 0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_uyvy_u"); + orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_u); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_unpack_uyvy_v */ +#ifdef DISABLE_ORC +void +orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_unpack_uyvy_v (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_int8 var34; + orc_union16 var35; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: select1lw */ + var35.i = ((orc_uint32)var33.i >> 16)&0xffff; + /* 2: select0wb */ + var34 = (orc_uint16)var35.i & 0xff; + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_unpack_uyvy_v"); + orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_v); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_interleave2_s16 */ +#ifdef DISABLE_ORC +void +orc_interleave2_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mergewl */ + var34.i = ((orc_uint16)var32.i & 0x0000ffff) | ((orc_uint16)var33.i << 16); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_interleave2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: loadw */ + var33 = ptr5[i]; + /* 2: mergewl */ + var34.i = ((orc_uint16)var32.i & 0x0000ffff) | ((orc_uint16)var33.i << 16); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +orc_interleave2_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_interleave2_s16"); + orc_program_set_backup_function (p, _backup_orc_interleave2_s16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_interleave2_rrshift1_s16 */ +#ifdef DISABLE_ORC +void +orc_interleave2_rrshift1_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 1: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 5: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 2: addw */ + var39.i = var34.i + var35.i; + /* 3: shrsw */ + var40.i = var39.i >> 1; + /* 4: loadw */ + var36 = ptr5[i]; + /* 6: addw */ + var41.i = var36.i + var37.i; + /* 7: shrsw */ + var42.i = var41.i >> 1; + /* 8: mergewl */ + var38.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var42.i << 16); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_interleave2_rrshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 1: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 5: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 2: addw */ + var39.i = var34.i + var35.i; + /* 3: shrsw */ + var40.i = var39.i >> 1; + /* 4: loadw */ + var36 = ptr5[i]; + /* 6: addw */ + var41.i = var36.i + var37.i; + /* 7: shrsw */ + var42.i = var41.i >> 1; + /* 8: mergewl */ + var38.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var42.i << 16); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +void +orc_interleave2_rrshift1_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_interleave2_rrshift1_s16"); + orc_program_set_backup_function (p, _backup_orc_interleave2_rrshift1_s16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_deinterleave2_s16 */ +#ifdef DISABLE_ORC +void +orc_deinterleave2_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: copyl */ + var36.i = var33.i; + /* 2: select0lw */ + var34.i = (orc_uint32)var36.i & 0xffff; + /* 3: storew */ + ptr0[i] = var34; + /* 4: select1lw */ + var35.i = ((orc_uint32)var36.i >> 16)&0xffff; + /* 5: storew */ + ptr1[i] = var35; + } + +} + +#else +static void +_backup_orc_deinterleave2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var33; + orc_union16 var34; + orc_union16 var35; + orc_union32 var36; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var33 = ptr4[i]; + /* 1: copyl */ + var36.i = var33.i; + /* 2: select0lw */ + var34.i = (orc_uint32)var36.i & 0xffff; + /* 3: storew */ + ptr0[i] = var34; + /* 4: select1lw */ + var35.i = ((orc_uint32)var36.i >> 16)&0xffff; + /* 5: storew */ + ptr1[i] = var35; + } + +} + +void +orc_deinterleave2_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_deinterleave2_s16"); + orc_program_set_backup_function (p, _backup_orc_deinterleave2_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 4, "t1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_deinterleave2_lshift1_s16 */ +#ifdef DISABLE_ORC +void +orc_deinterleave2_lshift1_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var38.i = var35.i; + /* 2: select0lw */ + var39.i = (orc_uint32)var38.i & 0xffff; + /* 3: shlw */ + var36.i = var39.i << 1; + /* 4: storew */ + ptr0[i] = var36; + /* 5: select1lw */ + var40.i = ((orc_uint32)var38.i >> 16)&0xffff; + /* 6: shlw */ + var37.i = var40.i << 1; + /* 7: storew */ + ptr1[i] = var37; + } + +} + +#else +static void +_backup_orc_deinterleave2_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var38.i = var35.i; + /* 2: select0lw */ + var39.i = (orc_uint32)var38.i & 0xffff; + /* 3: shlw */ + var36.i = var39.i << 1; + /* 4: storew */ + ptr0[i] = var36; + /* 5: select1lw */ + var40.i = ((orc_uint32)var38.i >> 16)&0xffff; + /* 6: shlw */ + var37.i = var40.i << 1; + /* 7: storew */ + ptr1[i] = var37; + } + +} + +void +orc_deinterleave2_lshift1_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_deinterleave2_lshift1_s16"); + orc_program_set_backup_function (p, _backup_orc_deinterleave2_lshift1_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_temporary (p, 4, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_deint_lshift1_split_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_deint_lshift1_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union32 *)s1; + + /* 9: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: shlw */ + var42.i = var40.i << 1; + /* 5: shlw */ + var43.i = var41.i << 1; + /* 6: subw */ + var44.i = var43.i - var42.i; + /* 7: copyw */ + var36.i = var44.i; + /* 8: storew */ + ptr1[i] = var36; + /* 10: avgsw */ + var45.i = (var44.i + var37.i + 1)>>1; + /* 11: addw */ + var38.i = var42.i + var45.i; + /* 12: storew */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_haar_deint_lshift1_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 9: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: shlw */ + var42.i = var40.i << 1; + /* 5: shlw */ + var43.i = var41.i << 1; + /* 6: subw */ + var44.i = var43.i - var42.i; + /* 7: copyw */ + var36.i = var44.i; + /* 8: storew */ + ptr1[i] = var36; + /* 10: avgsw */ + var45.i = (var44.i + var37.i + 1)>>1; + /* 11: addw */ + var38.i = var42.i + var45.i; + /* 12: storew */ + ptr0[i] = var38; + } + +} + +void +orc_haar_deint_lshift1_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_deint_lshift1_split_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_deint_lshift1_split_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_constant (p, 4, 0x00000000, "c2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_deint_split_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_deint_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union32 *)s1; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: subw */ + var42.i = var41.i - var40.i; + /* 5: copyw */ + var36.i = var42.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var43.i = (var42.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var40.i + var43.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_haar_deint_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: copyl */ + var39.i = var35.i; + /* 2: select0lw */ + var40.i = (orc_uint32)var39.i & 0xffff; + /* 3: select1lw */ + var41.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 4: subw */ + var42.i = var41.i - var40.i; + /* 5: copyw */ + var36.i = var42.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var43.i = (var42.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var40.i + var43.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +void +orc_haar_deint_split_s16 (int16_t * d1, int16_t * d2, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_deint_split_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_deint_split_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_split_s16_lo */ +#ifdef DISABLE_ORC +void +orc_haar_split_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var39.i = var35.i - var38.i; + /* 5: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 6: addw */ + var37.i = var38.i + var40.i; + /* 7: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_haar_split_s16_lo (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var39.i = var35.i - var38.i; + /* 5: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 6: addw */ + var37.i = var38.i + var40.i; + /* 7: storew */ + ptr0[i] = var37; + } + +} + +void +orc_haar_split_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_split_s16_lo"); + orc_program_set_backup_function (p, _backup_orc_haar_split_s16_lo); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_split_s16_hi */ +#ifdef DISABLE_ORC +void +orc_haar_split_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr5[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_haar_split_s16_hi (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr5[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +orc_haar_split_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_split_s16_hi"); + orc_program_set_backup_function (p, _backup_orc_haar_split_s16_hi); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S2, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_split_s16_op */ +#ifdef DISABLE_ORC +void +orc_haar_split_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 6: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var40.i = var35.i - var39.i; + /* 4: copyw */ + var36.i = var40.i; + /* 5: storew */ + ptr1[i] = var36; + /* 7: avgsw */ + var41.i = (var40.i + var37.i + 1)>>1; + /* 8: addw */ + var38.i = var39.i + var41.i; + /* 9: storew */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_haar_split_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 6: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr5[i]; + /* 3: subw */ + var40.i = var35.i - var39.i; + /* 4: copyw */ + var36.i = var40.i; + /* 5: storew */ + ptr1[i] = var36; + /* 7: avgsw */ + var41.i = (var40.i + var37.i + 1)>>1; + /* 8: addw */ + var38.i = var39.i + var41.i; + /* 9: storew */ + ptr0[i] = var38; + } + +} + +void +orc_haar_split_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_split_s16_op"); + orc_program_set_backup_function (p, _backup_orc_haar_split_s16_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_split_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_split_s16 (int16_t * d1, int16_t * d2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr1[i]; + /* 3: copyw */ + var40.i = var35.i; + /* 4: subw */ + var41.i = var40.i - var39.i; + /* 5: copyw */ + var36.i = var41.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var39.i + var42.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_haar_split_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var39.i = var34.i; + /* 2: loadw */ + var35 = ptr1[i]; + /* 3: copyw */ + var40.i = var35.i; + /* 4: subw */ + var41.i = var40.i - var39.i; + /* 5: copyw */ + var36.i = var41.i; + /* 6: storew */ + ptr1[i] = var36; + /* 8: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 9: addw */ + var38.i = var39.i + var42.i; + /* 10: storew */ + ptr0[i] = var38; + } + +} + +void +orc_haar_split_s16 (int16_t * d1, int16_t * d2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_split_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_split_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_s16_lo */ +#ifdef DISABLE_ORC +void +orc_haar_synth_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_haar_synth_s16_lo (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr5[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr4[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_haar_synth_s16_lo (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_s16_lo"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_lo); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_s16_hi */ +#ifdef DISABLE_ORC +void +orc_haar_synth_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var39.i = var35.i; + /* 3: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var41.i = var37.i - var40.i; + /* 6: addw */ + var38.i = var39.i + var41.i; + /* 7: storew */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_haar_synth_s16_hi (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var39.i = var35.i; + /* 3: avgsw */ + var40.i = (var39.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var41.i = var37.i - var40.i; + /* 6: addw */ + var38.i = var39.i + var41.i; + /* 7: storew */ + ptr0[i] = var38; + } + +} + +void +orc_haar_synth_s16_hi (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_s16_hi"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_hi); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_s16_op */ +#ifdef DISABLE_ORC +void +orc_haar_synth_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 3: avgsw */ + var41.i = (var40.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var42.i = var37.i - var41.i; + /* 6: copyw */ + var38.i = var42.i; + /* 7: storew */ + ptr0[i] = var38; + /* 8: addw */ + var39.i = var40.i + var42.i; + /* 9: storew */ + ptr1[i] = var39; + } + +} + +#else +static void +_backup_orc_haar_synth_s16_op (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr5[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 3: avgsw */ + var41.i = (var40.i + var36.i + 1)>>1; + /* 4: loadw */ + var37 = ptr4[i]; + /* 5: subw */ + var42.i = var37.i - var41.i; + /* 6: copyw */ + var38.i = var42.i; + /* 7: storew */ + ptr0[i] = var38; + /* 8: addw */ + var39.i = var40.i + var42.i; + /* 9: storew */ + ptr1[i] = var39; + } + +} + +void +orc_haar_synth_s16_op (int16_t * d1, int16_t * d2, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_s16_op"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_op); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_synth_s16 (int16_t * d1, int16_t * d2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + + /* 4: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr0[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 2: loadw */ + var36 = ptr1[i]; + /* 3: copyw */ + var41.i = var36.i; + /* 5: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 6: subw */ + var43.i = var40.i - var42.i; + /* 7: copyw */ + var38.i = var43.i; + /* 8: storew */ + ptr0[i] = var38; + /* 9: addw */ + var39.i = var41.i + var43.i; + /* 10: storew */ + ptr1[i] = var39; + } + +} + +#else +static void +_backup_orc_haar_synth_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 4: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr0[i]; + /* 1: copyw */ + var40.i = var35.i; + /* 2: loadw */ + var36 = ptr1[i]; + /* 3: copyw */ + var41.i = var36.i; + /* 5: avgsw */ + var42.i = (var41.i + var37.i + 1)>>1; + /* 6: subw */ + var43.i = var40.i - var42.i; + /* 7: copyw */ + var38.i = var43.i; + /* 8: storew */ + ptr0[i] = var38; + /* 9: addw */ + var39.i = var41.i + var43.i; + /* 10: storew */ + ptr1[i] = var39; + } + +} + +void +orc_haar_synth_s16 (int16_t * d1, int16_t * d2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_rrshift1_int_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_synth_rrshift1_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + /* 9: loadpw */ + var38.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 3: avgsw */ + var41.i = (var40.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var42.i = var36.i - var41.i; + /* 6: addw */ + var43.i = var40.i + var42.i; + /* 8: avgsw */ + var44.i = (var42.i + var37.i + 1)>>1; + /* 10: avgsw */ + var45.i = (var43.i + var38.i + 1)>>1; + /* 11: mergewl */ + var39.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 12: storel */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_haar_synth_rrshift1_int_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + /* 7: loadpw */ + var37.i = 0x00000000; /* 0 or 0f */ + /* 9: loadpw */ + var38.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 3: avgsw */ + var41.i = (var40.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var42.i = var36.i - var41.i; + /* 6: addw */ + var43.i = var40.i + var42.i; + /* 8: avgsw */ + var44.i = (var42.i + var37.i + 1)>>1; + /* 10: avgsw */ + var45.i = (var43.i + var38.i + 1)>>1; + /* 11: mergewl */ + var39.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16); + /* 12: storel */ + ptr0[i] = var39; + } + +} + +void +orc_haar_synth_rrshift1_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_rrshift1_int_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_rrshift1_int_s16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_synth_int_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_synth_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 3: avgsw */ + var39.i = (var38.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var40.i = var36.i - var39.i; + /* 6: addw */ + var41.i = var38.i + var40.i; + /* 7: mergewl */ + var37.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var41.i << 16); + /* 8: storel */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_haar_synth_int_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 2: loadpw */ + var35.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr5[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 3: avgsw */ + var39.i = (var38.i + var35.i + 1)>>1; + /* 4: loadw */ + var36 = ptr4[i]; + /* 5: subw */ + var40.i = var36.i - var39.i; + /* 6: addw */ + var41.i = var38.i + var40.i; + /* 7: mergewl */ + var37.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var41.i << 16); + /* 8: storel */ + ptr0[i] = var37; + } + +} + +void +orc_haar_synth_int_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_synth_int_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_synth_int_s16); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_sub_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_sub_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_haar_sub_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: subw */ + var34.i = var32.i - var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +orc_haar_sub_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_sub_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_sub_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_add_half_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_add_half_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_haar_add_half_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: addw */ + var36.i = var35.i + var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_haar_add_half_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_add_half_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_add_half_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_add_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_add_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_haar_add_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + orc_union16 var34; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr0[i]; + /* 1: loadw */ + var33 = ptr4[i]; + /* 2: addw */ + var34.i = var32.i + var33.i; + /* 3: storew */ + ptr0[i] = var34; + } + +} + +void +orc_haar_add_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_add_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_add_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_haar_sub_half_s16 */ +#ifdef DISABLE_ORC +void +orc_haar_sub_half_s16 (int16_t * d1, const int16_t * s1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_haar_sub_half_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var33; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 1: loadpw */ + var34.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 2: avgsw */ + var37.i = (var33.i + var34.i + 1)>>1; + /* 3: loadw */ + var35 = ptr0[i]; + /* 4: subw */ + var36.i = var35.i - var37.i; + /* 5: storew */ + ptr0[i] = var36; + } + +} + +void +orc_haar_sub_half_s16 (int16_t * d1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_haar_sub_half_s16"); + orc_program_set_backup_function (p, _backup_orc_haar_sub_half_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_sum_u8 */ +#ifdef DISABLE_ORC +void +orc_sum_u8 (int32_t * a1, const orc_uint8 * s1, int n){ + int i; + const orc_int8 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_int8 var34; + orc_union16 var35; + orc_union32 var36; + + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var35.i = (orc_uint8)var34; + /* 2: convuwl */ + var36.i = (orc_uint16)var35.i; + /* 3: accl */ + var12.i = var12.i + var36.i; + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sum_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_int8 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_int8 var34; + orc_union16 var35; + orc_union32 var36; + + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var35.i = (orc_uint8)var34; + /* 2: convuwl */ + var36.i = (orc_uint16)var35.i; + /* 3: accl */ + var12.i = var12.i + var36.i; + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sum_u8 (int32_t * a1, const orc_uint8 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_sum_u8"); + orc_program_set_backup_function (p, _backup_orc_sum_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sum_s16 */ +#ifdef DISABLE_ORC +void +orc_sum_s16 (int32_t * a1, const int16_t * s1, int n){ + int i; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var33; + orc_union32 var34; + + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: convswl */ + var34.i = var33.i; + /* 2: accl */ + var12.i = var12.i + var34.i; + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sum_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var33; + orc_union32 var34; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: convswl */ + var34.i = var33.i; + /* 2: accl */ + var12.i = var12.i + var34.i; + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sum_s16 (int32_t * a1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_sum_s16"); + orc_program_set_backup_function (p, _backup_orc_sum_s16); + orc_program_add_source (p, 2, "s1"); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_temporary (p, 4, "t1"); + + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sum_square_diff_u8 */ +#ifdef DISABLE_ORC +void +orc_sum_square_diff_u8 (int32_t * a1, const orc_uint8 * s1, const orc_uint8 * s2, int n){ + int i; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + + ptr4 = (orc_int8 *)s1; + ptr5 = (orc_int8 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr5[i]; + /* 3: convubw */ + var38.i = (orc_uint8)var36; + /* 4: subw */ + var39.i = var37.i - var38.i; + /* 5: mullw */ + var40.i = (var39.i * var39.i) & 0xffff; + /* 6: convuwl */ + var41.i = (orc_uint16)var40.i; + /* 7: accl */ + var12.i = var12.i + var41.i; + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sum_square_diff_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union32 var41; + + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var37.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr5[i]; + /* 3: convubw */ + var38.i = (orc_uint8)var36; + /* 4: subw */ + var39.i = var37.i - var38.i; + /* 5: mullw */ + var40.i = (var39.i * var39.i) & 0xffff; + /* 6: convuwl */ + var41.i = (orc_uint16)var40.i; + /* 7: accl */ + var12.i = var12.i + var41.i; + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sum_square_diff_u8 (int32_t * a1, const orc_uint8 * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_sum_square_diff_u8"); + orc_program_set_backup_function (p, _backup_orc_sum_square_diff_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_dequantise_s16_2d_4xn */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16_2d_4xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m){ + int i; + int j; + int n = 4; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_orc_dequantise_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 4; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +void +orc_dequantise_s16_2d_4xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 4); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_dequantise_s16_2d_4xn"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16_2d_4xn); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 4; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_s16_2d_8xn */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16_2d_8xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m){ + int i; + int j; + int n = 8; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_orc_dequantise_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +void +orc_dequantise_s16_2d_8xn (int16_t * d1, int d1_stride, const int16_t * s1, int s1_stride, int p1, int p2, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_dequantise_s16_2d_8xn"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16_2d_8xn); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_s16_ip_2d_8xn */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16_ip_2d_8xn (int16_t * d1, int d1_stride, int p1, int p2, int m){ + int i; + int j; + int n = 8; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_orc_dequantise_s16_ip_2d_8xn (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +void +orc_dequantise_s16_ip_2d_8xn (int16_t * d1, int d1_stride, int p1, int p2, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_dequantise_s16_ip_2d_8xn"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip_2d_8xn); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_s16_ip_2d */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16_ip_2d (int16_t * d1, int d1_stride, int p1, int p2, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +#else +static void +_backup_orc_dequantise_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + } + +} + +void +orc_dequantise_s16_ip_2d (int16_t * d1, int d1_stride, int p1, int p2, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_dequantise_s16_ip_2d"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_s16_ip */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16_ip (int16_t * d1, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)d1; + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_dequantise_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +void +orc_dequantise_s16_ip (int16_t * d1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_dequantise_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_s16 */ +#ifdef DISABLE_ORC +void +orc_dequantise_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 4: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var36.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_dequantise_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 4: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var36.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +void +orc_dequantise_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_dequantise_s16"); + orc_program_set_backup_function (p, _backup_orc_dequantise_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_dequantise_var_s16_ip */ +#ifdef DISABLE_ORC +void +orc_dequantise_var_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 6: loadw */ + var36 = ptr5[i]; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_dequantise_var_s16_ip (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr0[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: loadw */ + var35 = ptr4[i]; + /* 5: mullw */ + var41.i = (var40.i * var35.i) & 0xffff; + /* 6: loadw */ + var36 = ptr5[i]; + /* 7: addw */ + var42.i = var41.i + var36.i; + /* 8: shrsw */ + var43.i = var42.i >> 2; + /* 9: mullw */ + var37.i = (var43.i * var39.i) & 0xffff; + /* 10: storew */ + ptr0[i] = var37; + } + +} + +void +orc_dequantise_var_s16_ip (int16_t * d1, const int16_t * s1, const int16_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_dequantise_var_s16_ip"); + orc_program_set_backup_function (p, _backup_orc_dequantise_var_s16_ip); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_quantise1_s16 */ +#ifdef DISABLE_ORC +void +orc_quantise1_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int p3, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 5: loadpw */ + var35.i = p2; + /* 7: loadpw */ + var36.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: shlw */ + var41.i = var40.i << 2; + /* 6: subw */ + var42.i = var41.i - var35.i; + /* 8: mulhuw */ + var43.i = ((orc_uint32)((orc_uint16)var42.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var44.i = ((orc_uint16)var43.i) >> p3; + /* 10: mullw */ + var37.i = (var44.i * var39.i) & 0xffff; + /* 11: storew */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_quantise1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 7: loadpw */ + var36.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var38.i = var34.i; + /* 2: signw */ + var39.i = ORC_CLAMP(var38.i,-1,1); + /* 3: absw */ + var40.i = ORC_ABS(var38.i); + /* 4: shlw */ + var41.i = var40.i << 2; + /* 6: subw */ + var42.i = var41.i - var35.i; + /* 8: mulhuw */ + var43.i = ((orc_uint32)((orc_uint16)var42.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var44.i = ((orc_uint16)var43.i) >> ex->params[26]; + /* 10: mullw */ + var37.i = (var44.i * var39.i) & 0xffff; + /* 11: storew */ + ptr0[i] = var37; + } + +} + +void +orc_quantise1_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int p3, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_quantise1_s16"); + orc_program_set_backup_function (p, _backup_orc_quantise1_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_quantise2_s16 */ +#ifdef DISABLE_ORC +void +orc_quantise2_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)d1; + ptr4 = (orc_union16 *)s1; + + /* 5: loadpw */ + var35.i = p2; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var37.i = var34.i; + /* 2: signw */ + var38.i = ORC_CLAMP(var37.i,-1,1); + /* 3: absw */ + var39.i = ORC_ABS(var37.i); + /* 4: shlw */ + var40.i = var39.i << 2; + /* 6: subw */ + var41.i = var40.i - var35.i; + /* 7: shruw */ + var42.i = ((orc_uint16)var41.i) >> p1; + /* 8: mullw */ + var36.i = (var42.i * var38.i) & 0xffff; + /* 9: storew */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_orc_quantise2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: copyw */ + var37.i = var34.i; + /* 2: signw */ + var38.i = ORC_CLAMP(var37.i,-1,1); + /* 3: absw */ + var39.i = ORC_ABS(var37.i); + /* 4: shlw */ + var40.i = var39.i << 2; + /* 6: subw */ + var41.i = var40.i - var35.i; + /* 7: shruw */ + var42.i = ((orc_uint16)var41.i) >> ex->params[24]; + /* 8: mullw */ + var36.i = (var42.i * var38.i) & 0xffff; + /* 9: storew */ + ptr0[i] = var36; + } + +} + +void +orc_quantise2_s16 (int16_t * d1, const int16_t * s1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_quantise2_s16"); + orc_program_set_backup_function (p, _backup_orc_quantise2_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_quantdequant1_s16 */ +#ifdef DISABLE_ORC +void +orc_quantdequant1_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + + /* 5: loadpw */ + var35.i = p2; + /* 7: loadpw */ + var36.i = p1; + /* 14: loadpw */ + var38.i = p4; + /* 16: loadpw */ + var39.i = p5; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var41.i = var34.i; + /* 2: signw */ + var42.i = ORC_CLAMP(var41.i,-1,1); + /* 3: absw */ + var43.i = ORC_ABS(var41.i); + /* 4: shlw */ + var44.i = var43.i << 2; + /* 6: subw */ + var45.i = var44.i - var35.i; + /* 8: mulhuw */ + var46.i = ((orc_uint32)((orc_uint16)var45.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var47.i = ((orc_uint16)var46.i) >> p3; + /* 10: mullw */ + var48.i = (var47.i * var42.i) & 0xffff; + /* 11: copyw */ + var37.i = var48.i; + /* 12: storew */ + ptr0[i] = var37; + /* 13: signw */ + var49.i = ORC_CLAMP(var48.i,-1,1); + /* 15: mullw */ + var50.i = (var47.i * var38.i) & 0xffff; + /* 17: addw */ + var51.i = var50.i + var39.i; + /* 18: shrsw */ + var52.i = var51.i >> 2; + /* 19: mullw */ + var40.i = (var52.i * var49.i) & 0xffff; + /* 20: storew */ + ptr1[i] = var40; + } + +} + +#else +static void +_backup_orc_quantdequant1_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 7: loadpw */ + var36.i = ex->params[24]; + /* 14: loadpw */ + var38.i = ex->params[27]; + /* 16: loadpw */ + var39.i = ex->params[28]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var41.i = var34.i; + /* 2: signw */ + var42.i = ORC_CLAMP(var41.i,-1,1); + /* 3: absw */ + var43.i = ORC_ABS(var41.i); + /* 4: shlw */ + var44.i = var43.i << 2; + /* 6: subw */ + var45.i = var44.i - var35.i; + /* 8: mulhuw */ + var46.i = ((orc_uint32)((orc_uint16)var45.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 9: shruw */ + var47.i = ((orc_uint16)var46.i) >> ex->params[26]; + /* 10: mullw */ + var48.i = (var47.i * var42.i) & 0xffff; + /* 11: copyw */ + var37.i = var48.i; + /* 12: storew */ + ptr0[i] = var37; + /* 13: signw */ + var49.i = ORC_CLAMP(var48.i,-1,1); + /* 15: mullw */ + var50.i = (var47.i * var38.i) & 0xffff; + /* 17: addw */ + var51.i = var50.i + var39.i; + /* 18: shrsw */ + var52.i = var51.i >> 2; + /* 19: mullw */ + var40.i = (var52.i * var49.i) & 0xffff; + /* 20: storew */ + ptr1[i] = var40; + } + +} + +void +orc_quantdequant1_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_quantdequant1_s16"); + orc_program_set_backup_function (p, _backup_orc_quantdequant1_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_parameter (p, 2, "p5"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + ex->params[ORC_VAR_P5] = p5; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_quantdequant3_s16 */ +#ifdef DISABLE_ORC +void +orc_quantdequant3_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int p6, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + + /* 5: loadpw */ + var36.i = p2; + /* 7: loadpw */ + var37.i = p1; + /* 9: loadpl */ + var38.i = p6; + /* 17: loadpw */ + var40.i = p4; + /* 19: loadpw */ + var41.i = p5; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr1[i]; + /* 1: copyw */ + var43.i = var35.i; + /* 2: signw */ + var44.i = ORC_CLAMP(var43.i,-1,1); + /* 3: absw */ + var45.i = ORC_ABS(var43.i); + /* 4: shlw */ + var46.i = var45.i << 2; + /* 6: subw */ + var47.i = var46.i - var36.i; + /* 8: muluwl */ + var48.i = ((orc_uint16)var47.i) * ((orc_uint16)var37.i); + /* 10: addl */ + var49.i = var48.i + var38.i; + /* 11: shrul */ + var50.i = ((orc_uint32)var49.i) >> p3; + /* 12: convlw */ + var51.i = var50.i; + /* 13: mullw */ + var52.i = (var51.i * var44.i) & 0xffff; + /* 14: copyw */ + var39.i = var52.i; + /* 15: storew */ + ptr0[i] = var39; + /* 16: signw */ + var53.i = ORC_CLAMP(var52.i,-1,1); + /* 18: mullw */ + var54.i = (var51.i * var40.i) & 0xffff; + /* 20: addw */ + var55.i = var54.i + var41.i; + /* 21: shrsw */ + var56.i = var55.i >> 2; + /* 22: mullw */ + var42.i = (var56.i * var53.i) & 0xffff; + /* 23: storew */ + ptr1[i] = var42; + } + +} + +#else +static void +_backup_orc_quantdequant3_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union32 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union32 var48; + orc_union32 var49; + orc_union32 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var36.i = ex->params[25]; + /* 7: loadpw */ + var37.i = ex->params[24]; + /* 9: loadpl */ + var38.i = ex->params[29]; + /* 17: loadpw */ + var40.i = ex->params[27]; + /* 19: loadpw */ + var41.i = ex->params[28]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var35 = ptr1[i]; + /* 1: copyw */ + var43.i = var35.i; + /* 2: signw */ + var44.i = ORC_CLAMP(var43.i,-1,1); + /* 3: absw */ + var45.i = ORC_ABS(var43.i); + /* 4: shlw */ + var46.i = var45.i << 2; + /* 6: subw */ + var47.i = var46.i - var36.i; + /* 8: muluwl */ + var48.i = ((orc_uint16)var47.i) * ((orc_uint16)var37.i); + /* 10: addl */ + var49.i = var48.i + var38.i; + /* 11: shrul */ + var50.i = ((orc_uint32)var49.i) >> ex->params[26]; + /* 12: convlw */ + var51.i = var50.i; + /* 13: mullw */ + var52.i = (var51.i * var44.i) & 0xffff; + /* 14: copyw */ + var39.i = var52.i; + /* 15: storew */ + ptr0[i] = var39; + /* 16: signw */ + var53.i = ORC_CLAMP(var52.i,-1,1); + /* 18: mullw */ + var54.i = (var51.i * var40.i) & 0xffff; + /* 20: addw */ + var55.i = var54.i + var41.i; + /* 21: shrsw */ + var56.i = var55.i >> 2; + /* 22: mullw */ + var42.i = (var56.i * var53.i) & 0xffff; + /* 23: storew */ + ptr1[i] = var42; + } + +} + +void +orc_quantdequant3_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int p5, int p6, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_quantdequant3_s16"); + orc_program_set_backup_function (p, _backup_orc_quantdequant3_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_parameter (p, 2, "p5"); + orc_program_add_parameter (p, 4, "p6"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "muluwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P6, ORC_VAR_D1); + orc_program_append_2 (p, "shrul", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + ex->params[ORC_VAR_P5] = p5; + ex->params[ORC_VAR_P6] = p6; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_quantdequant2_s16 */ +#ifdef DISABLE_ORC +void +orc_quantdequant2_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + + ptr0 = (orc_union16 *)d1; + ptr1 = (orc_union16 *)d2; + + /* 5: loadpw */ + var35.i = p2; + /* 12: loadpw */ + var37.i = p3; + /* 14: loadpw */ + var38.i = p4; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 2: signw */ + var41.i = ORC_CLAMP(var40.i,-1,1); + /* 3: absw */ + var42.i = ORC_ABS(var40.i); + /* 4: shlw */ + var43.i = var42.i << 2; + /* 6: subw */ + var44.i = var43.i - var35.i; + /* 7: shruw */ + var45.i = ((orc_uint16)var44.i) >> p1; + /* 8: mullw */ + var46.i = (var45.i * var41.i) & 0xffff; + /* 9: copyw */ + var36.i = var46.i; + /* 10: storew */ + ptr0[i] = var36; + /* 11: signw */ + var47.i = ORC_CLAMP(var46.i,-1,1); + /* 13: mullw */ + var48.i = (var45.i * var37.i) & 0xffff; + /* 15: addw */ + var49.i = var48.i + var38.i; + /* 16: shrsw */ + var50.i = var49.i >> 2; + /* 17: mullw */ + var39.i = (var50.i * var47.i) & 0xffff; + /* 18: storew */ + ptr1[i] = var39; + } + +} + +#else +static void +_backup_orc_quantdequant2_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 * ORC_RESTRICT ptr1; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + + ptr0 = (orc_union16 *)ex->arrays[0]; + ptr1 = (orc_union16 *)ex->arrays[1]; + + /* 5: loadpw */ + var35.i = ex->params[25]; + /* 12: loadpw */ + var37.i = ex->params[26]; + /* 14: loadpw */ + var38.i = ex->params[27]; + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr1[i]; + /* 1: copyw */ + var40.i = var34.i; + /* 2: signw */ + var41.i = ORC_CLAMP(var40.i,-1,1); + /* 3: absw */ + var42.i = ORC_ABS(var40.i); + /* 4: shlw */ + var43.i = var42.i << 2; + /* 6: subw */ + var44.i = var43.i - var35.i; + /* 7: shruw */ + var45.i = ((orc_uint16)var44.i) >> ex->params[24]; + /* 8: mullw */ + var46.i = (var45.i * var41.i) & 0xffff; + /* 9: copyw */ + var36.i = var46.i; + /* 10: storew */ + ptr0[i] = var36; + /* 11: signw */ + var47.i = ORC_CLAMP(var46.i,-1,1); + /* 13: mullw */ + var48.i = (var45.i * var37.i) & 0xffff; + /* 15: addw */ + var49.i = var48.i + var38.i; + /* 16: shrsw */ + var50.i = var49.i >> 2; + /* 17: mullw */ + var39.i = (var50.i * var47.i) & 0xffff; + /* 18: storew */ + ptr1[i] = var39; + } + +} + +void +orc_quantdequant2_s16 (int16_t * d1, int16_t * d2, int p1, int p2, int p3, int p4, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_quantdequant2_s16"); + orc_program_set_backup_function (p, _backup_orc_quantdequant2_s16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_destination (p, 2, "d2"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_D2] = d2; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_downsample_vert_u8 */ +#ifdef DISABLE_ORC +void +orc_downsample_vert_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + ptr5 = (orc_int8 *)s2; + ptr6 = (orc_int8 *)s3; + ptr7 = (orc_int8 *)s4; + + /* 5: loadpw */ + var37.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 12: loadpw */ + var40.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 15: loadpw */ + var41.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var43.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr7[i]; + /* 3: convubw */ + var44.i = (orc_uint8)var36; + /* 4: addw */ + var45.i = var43.i + var44.i; + /* 6: mullw */ + var46.i = (var45.i * var37.i) & 0xffff; + /* 7: loadb */ + var38 = ptr5[i]; + /* 8: convubw */ + var47.i = (orc_uint8)var38; + /* 9: loadb */ + var39 = ptr6[i]; + /* 10: convubw */ + var48.i = (orc_uint8)var39; + /* 11: addw */ + var49.i = var47.i + var48.i; + /* 13: mullw */ + var50.i = (var49.i * var40.i) & 0xffff; + /* 14: addw */ + var51.i = var50.i + var46.i; + /* 16: addw */ + var52.i = var51.i + var41.i; + /* 17: shruw */ + var53.i = ((orc_uint16)var52.i) >> 6; + /* 18: convwb */ + var42 = var53.i; + /* 19: storeb */ + ptr0[i] = var42; + } + +} + +#else +static void +_backup_orc_downsample_vert_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + ptr7 = (orc_int8 *)ex->arrays[7]; + + /* 5: loadpw */ + var37.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 12: loadpw */ + var40.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 15: loadpw */ + var41.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var35 = ptr4[i]; + /* 1: convubw */ + var43.i = (orc_uint8)var35; + /* 2: loadb */ + var36 = ptr7[i]; + /* 3: convubw */ + var44.i = (orc_uint8)var36; + /* 4: addw */ + var45.i = var43.i + var44.i; + /* 6: mullw */ + var46.i = (var45.i * var37.i) & 0xffff; + /* 7: loadb */ + var38 = ptr5[i]; + /* 8: convubw */ + var47.i = (orc_uint8)var38; + /* 9: loadb */ + var39 = ptr6[i]; + /* 10: convubw */ + var48.i = (orc_uint8)var39; + /* 11: addw */ + var49.i = var47.i + var48.i; + /* 13: mullw */ + var50.i = (var49.i * var40.i) & 0xffff; + /* 14: addw */ + var51.i = var50.i + var46.i; + /* 16: addw */ + var52.i = var51.i + var41.i; + /* 17: shruw */ + var53.i = ((orc_uint16)var52.i) >> 6; + /* 18: convwb */ + var42 = var53.i; + /* 19: storeb */ + ptr0[i] = var42; + } + +} + +void +orc_downsample_vert_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_downsample_vert_u8"); + orc_program_set_backup_function (p, _backup_orc_downsample_vert_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000006, "c1"); + orc_program_add_constant (p, 4, 0x0000001a, "c2"); + orc_program_add_constant (p, 4, 0x00000020, "c3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->arrays[ORC_VAR_S4] = (void *)s4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_downsample_horiz_u8 */ +#ifdef DISABLE_ORC +void +orc_downsample_horiz_u8 (orc_uint8 * d1, const uint8_t * s1, const uint8_t * s2, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_int8 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_int8 var52; + orc_union16 var53; + orc_int8 var54; + orc_union16 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union16 *)s1; + ptr5 = (orc_union16 *)s2; + + /* 9: loadpw */ + var40.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 16: loadpw */ + var41.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 19: loadpw */ + var42.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var38 = ptr4[i]; + /* 1: copyw */ + var44.i = var38.i; + /* 2: loadw */ + var39 = ptr5[i]; + /* 3: copyw */ + var45.i = var39.i; + /* 4: select0wb */ + var46 = (orc_uint16)var44.i & 0xff; + /* 5: convubw */ + var47.i = (orc_uint8)var46; + /* 6: select1wb */ + var48 = ((orc_uint16)var45.i >> 8)&0xff; + /* 7: convubw */ + var49.i = (orc_uint8)var48; + /* 8: addw */ + var50.i = var47.i + var49.i; + /* 10: mullw */ + var51.i = (var50.i * var40.i) & 0xffff; + /* 11: select1wb */ + var52 = ((orc_uint16)var44.i >> 8)&0xff; + /* 12: convubw */ + var53.i = (orc_uint8)var52; + /* 13: select0wb */ + var54 = (orc_uint16)var45.i & 0xff; + /* 14: convubw */ + var55.i = (orc_uint8)var54; + /* 15: addw */ + var56.i = var53.i + var55.i; + /* 17: mullw */ + var57.i = (var56.i * var41.i) & 0xffff; + /* 18: addw */ + var58.i = var51.i + var57.i; + /* 20: addw */ + var59.i = var58.i + var42.i; + /* 21: shruw */ + var60.i = ((orc_uint16)var59.i) >> 6; + /* 22: convwb */ + var43 = var60.i; + /* 23: storeb */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_downsample_horiz_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + const orc_union16 * ORC_RESTRICT ptr5; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_int8 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_int8 var52; + orc_union16 var53; + orc_int8 var54; + orc_union16 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union16 *)ex->arrays[4]; + ptr5 = (orc_union16 *)ex->arrays[5]; + + /* 9: loadpw */ + var40.i = 0x00000006; /* 6 or 2.96439e-323f */ + /* 16: loadpw */ + var41.i = 0x0000001a; /* 26 or 1.28457e-322f */ + /* 19: loadpw */ + var42.i = 0x00000020; /* 32 or 1.58101e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var38 = ptr4[i]; + /* 1: copyw */ + var44.i = var38.i; + /* 2: loadw */ + var39 = ptr5[i]; + /* 3: copyw */ + var45.i = var39.i; + /* 4: select0wb */ + var46 = (orc_uint16)var44.i & 0xff; + /* 5: convubw */ + var47.i = (orc_uint8)var46; + /* 6: select1wb */ + var48 = ((orc_uint16)var45.i >> 8)&0xff; + /* 7: convubw */ + var49.i = (orc_uint8)var48; + /* 8: addw */ + var50.i = var47.i + var49.i; + /* 10: mullw */ + var51.i = (var50.i * var40.i) & 0xffff; + /* 11: select1wb */ + var52 = ((orc_uint16)var44.i >> 8)&0xff; + /* 12: convubw */ + var53.i = (orc_uint8)var52; + /* 13: select0wb */ + var54 = (orc_uint16)var45.i & 0xff; + /* 14: convubw */ + var55.i = (orc_uint8)var54; + /* 15: addw */ + var56.i = var53.i + var55.i; + /* 17: mullw */ + var57.i = (var56.i * var41.i) & 0xffff; + /* 18: addw */ + var58.i = var51.i + var57.i; + /* 20: addw */ + var59.i = var58.i + var42.i; + /* 21: shruw */ + var60.i = ((orc_uint16)var59.i) >> 6; + /* 22: convwb */ + var43 = var60.i; + /* 23: storeb */ + ptr0[i] = var43; + } + +} + +void +orc_downsample_horiz_u8 (orc_uint8 * d1, const uint8_t * s1, const uint8_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_downsample_horiz_u8"); + orc_program_set_backup_function (p, _backup_orc_downsample_horiz_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 4, 0x00000006, "c1"); + orc_program_add_constant (p, 4, 0x0000001a, "c2"); + orc_program_add_constant (p, 4, 0x00000020, "c3"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 1, "t3"); + orc_program_add_temporary (p, 2, "t4"); + orc_program_add_temporary (p, 2, "t5"); + orc_program_add_temporary (p, 2, "t6"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T6, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C3, ORC_VAR_D1); + orc_program_append_2 (p, "shruw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 0, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_stats_moment_s16 */ +#ifdef DISABLE_ORC +void +orc_stats_moment_s16 (int32_t * a1, const int16_t * s1, int n){ + int i; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union32 var40; + + ptr4 = (orc_union16 *)s1; + + /* 2: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var37.i = ORC_ABS(var34.i); + /* 3: subw */ + var38.i = var37.i - var35.i; + /* 5: maxsw */ + var39.i = ORC_MAX(var38.i, var36.i); + /* 6: convuwl */ + var40.i = (orc_uint16)var39.i; + /* 7: accl */ + var12.i = var12.i + var40.i; + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_stats_moment_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union32 var40; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = 0x00000002; /* 2 or 9.88131e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var37.i = ORC_ABS(var34.i); + /* 3: subw */ + var38.i = var37.i - var35.i; + /* 5: maxsw */ + var39.i = ORC_MAX(var38.i, var36.i); + /* 6: convuwl */ + var40.i = (orc_uint16)var39.i; + /* 7: accl */ + var12.i = var12.i + var40.i; + } + ex->accumulators[0] = var12.i; + +} + +void +orc_stats_moment_s16 (int32_t * a1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_stats_moment_s16"); + orc_program_set_backup_function (p, _backup_orc_stats_moment_s16); + orc_program_add_source (p, 2, "s1"); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_constant (p, 4, 0x00000002, "c1"); + orc_program_add_constant (p, 4, 0x00000000, "c2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "maxsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_stats_above_s16 */ +#ifdef DISABLE_ORC +void +orc_stats_above_s16 (int32_t * a1, const int16_t * s1, int n){ + int i; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union32 var42; + + ptr4 = (orc_union16 *)s1; + + /* 2: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + /* 6: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var38.i = ORC_ABS(var34.i); + /* 3: subw */ + var39.i = var38.i - var35.i; + /* 5: maxsw */ + var40.i = ORC_MAX(var39.i, var36.i); + /* 7: minsw */ + var41.i = ORC_MIN(var40.i, var37.i); + /* 8: convuwl */ + var42.i = (orc_uint16)var41.i; + /* 9: accl */ + var12.i = var12.i + var42.i; + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_stats_above_s16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union32 var12 = { 0 }; + orc_union16 var34; + orc_union16 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_union16 var41; + orc_union32 var42; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = 0x00000001; /* 1 or 4.94066e-324f */ + /* 4: loadpw */ + var36.i = 0x00000000; /* 0 or 0f */ + /* 6: loadpw */ + var37.i = 0x00000001; /* 1 or 4.94066e-324f */ + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var34 = ptr4[i]; + /* 1: absw */ + var38.i = ORC_ABS(var34.i); + /* 3: subw */ + var39.i = var38.i - var35.i; + /* 5: maxsw */ + var40.i = ORC_MAX(var39.i, var36.i); + /* 7: minsw */ + var41.i = ORC_MIN(var40.i, var37.i); + /* 8: convuwl */ + var42.i = (orc_uint16)var41.i; + /* 9: accl */ + var12.i = var12.i + var42.i; + } + ex->accumulators[0] = var12.i; + +} + +void +orc_stats_above_s16 (int32_t * a1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_stats_above_s16"); + orc_program_set_backup_function (p, _backup_orc_stats_above_s16); + orc_program_add_source (p, 2, "s1"); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_constant (p, 4, 0x00000001, "c1"); + orc_program_add_constant (p, 4, 0x00000000, "c2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "maxsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "minsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_accw */ +#ifdef DISABLE_ORC +void +orc_accw (int * a1, const int16_t * s1, int n){ + int i; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var12 = { 0 }; + orc_union16 var33; + orc_union16 var34; + + ptr4 = (orc_union16 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: absw */ + var34.i = ORC_ABS(var33.i); + /* 2: accw */ + var12.i = var12.i + var34.i; + } + *a1 = (var12.i & 0xffff); + +} + +#else +static void +_backup_orc_accw (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var12 = { 0 }; + orc_union16 var33; + orc_union16 var34; + + ptr4 = (orc_union16 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var33 = ptr4[i]; + /* 1: absw */ + var34.i = ORC_ABS(var33.i); + /* 2: accw */ + var12.i = var12.i + var34.i; + } + ex->accumulators[0] = (var12.i & 0xffff); + +} + +void +orc_accw (int * a1, const int16_t * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_accw"); + orc_program_set_backup_function (p, _backup_orc_accw); + orc_program_add_source (p, 2, "s1"); + orc_program_add_accumulator (p, 2, "a1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "accw", 0, ORC_VAR_A1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_avg2_8xn_u8 */ +#ifdef DISABLE_ORC +void +orc_avg2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 8; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_avg2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +void +orc_avg2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_avg2_8xn_u8"); + orc_program_set_backup_function (p, _backup_orc_avg2_8xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_avg2_12xn_u8 */ +#ifdef DISABLE_ORC +void +orc_avg2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 12; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_avg2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +void +orc_avg2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 12); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_avg2_12xn_u8"); + orc_program_set_backup_function (p, _backup_orc_avg2_12xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 12; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_avg2_16xn_u8 */ +#ifdef DISABLE_ORC +void +orc_avg2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 16; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_avg2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +void +orc_avg2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 16); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_avg2_16xn_u8"); + orc_program_set_backup_function (p, _backup_orc_avg2_16xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 16; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_avg2_32xn_u8 */ +#ifdef DISABLE_ORC +void +orc_avg2_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 32; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_avg2_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +void +orc_avg2_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 32); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_avg2_32xn_u8"); + orc_program_set_backup_function (p, _backup_orc_avg2_32xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 32; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_avg2_nxm_u8 */ +#ifdef DISABLE_ORC +void +orc_avg2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m){ + int i; + int j; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_avg2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: avgub */ + var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1; + /* 3: storeb */ + ptr0[i] = var34; + } + } + +} + +void +orc_avg2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_avg2_nxm_u8"); + orc_program_set_backup_function (p, _backup_orc_avg2_nxm_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_8xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 8; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_8xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_8xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_12xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 12; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 12); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_12xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_12xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 12; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_16xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 16; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 16); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_16xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_16xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 16; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_24xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_24xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 24; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_24xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 24; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_24xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 24); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_24xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_24xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 24; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_32xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 32; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: convsuswb */ + var43 = ORC_CLAMP_UB(var55.i); + /* 22: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_32xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 32); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_32xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_32xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 32; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine4_nxm_u8 */ +#ifdef DISABLE_ORC +void +orc_combine4_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int n, int m){ + int i; + int j; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + ptr6 = ORC_PTR_OFFSET(s3, s3_stride * j); + ptr7 = ORC_PTR_OFFSET(s4, s4_stride * j); + + /* 2: loadpw */ + var35.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 11: loadpw */ + var39.i = p3; + /* 16: loadpw */ + var41.i = p4; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: shrsw */ + var56.i = var55.i >> 4; + /* 22: convsuswb */ + var43 = ORC_CLAMP_UB(var56.i); + /* 23: storeb */ + ptr0[i] = var43; + } + } + +} + +#else +static void +_backup_orc_combine4_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + const orc_int8 * ORC_RESTRICT ptr7; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_union16 var37; + orc_int8 var38; + orc_union16 var39; + orc_int8 var40; + orc_union16 var41; + orc_union16 var42; + orc_int8 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_union16 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_union16 var55; + orc_union16 var56; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j); + ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j); + + /* 2: loadpw */ + var35.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 11: loadpw */ + var39.i = ex->params[26]; + /* 16: loadpw */ + var41.i = ex->params[27]; + /* 19: loadpw */ + var42.i = 0x00000008; /* 8 or 3.95253e-323f */ + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var44.i = (orc_uint8)var34; + /* 3: mullw */ + var45.i = (var44.i * var35.i) & 0xffff; + /* 4: loadb */ + var36 = ptr5[i]; + /* 5: convubw */ + var46.i = (orc_uint8)var36; + /* 7: mullw */ + var47.i = (var46.i * var37.i) & 0xffff; + /* 8: addw */ + var48.i = var45.i + var47.i; + /* 9: loadb */ + var38 = ptr6[i]; + /* 10: convubw */ + var49.i = (orc_uint8)var38; + /* 12: mullw */ + var50.i = (var49.i * var39.i) & 0xffff; + /* 13: addw */ + var51.i = var48.i + var50.i; + /* 14: loadb */ + var40 = ptr7[i]; + /* 15: convubw */ + var52.i = (orc_uint8)var40; + /* 17: mullw */ + var53.i = (var52.i * var41.i) & 0xffff; + /* 18: addw */ + var54.i = var51.i + var53.i; + /* 20: addw */ + var55.i = var54.i + var42.i; + /* 21: shrsw */ + var56.i = var55.i >> 4; + /* 22: convsuswb */ + var43 = ORC_CLAMP_UB(var56.i); + /* 23: storeb */ + ptr0[i] = var43; + } + } + +} + +void +orc_combine4_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, const uint8_t * s3, int s3_stride, const uint8_t * s4, int s4_stride, int p1, int p2, int p3, int p4, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine4_nxm_u8"); + orc_program_set_backup_function (p, _backup_orc_combine4_nxm_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_source (p, 1, "s4"); + orc_program_add_constant (p, 4, 0x00000008, "c1"); + orc_program_add_constant (p, 4, 0x00000004, "c2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_S3] = s3_stride; + ex->arrays[ORC_VAR_S4] = (void *)s4; + ex->params[ORC_VAR_S4] = s4_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine2_8xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 8; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + /* 4: loadpw */ + var36.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 9: loadpw */ + var38.i = p3; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> p4; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +#else +static void +_backup_orc_combine2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +void +orc_combine2_8xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine2_8xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine2_8xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine2_12xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 12; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + /* 4: loadpw */ + var36.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 9: loadpw */ + var38.i = p3; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> p4; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +#else +static void +_backup_orc_combine2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +void +orc_combine2_12xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 12); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine2_12xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine2_12xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 12; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine2_16xn_u8 */ +#ifdef DISABLE_ORC +void +orc_combine2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m){ + int i; + int j; + int n = 16; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + /* 4: loadpw */ + var36.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 9: loadpw */ + var38.i = p3; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> p4; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +#else +static void +_backup_orc_combine2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +void +orc_combine2_16xn_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 16); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine2_16xn_u8"); + orc_program_set_backup_function (p, _backup_orc_combine2_16xn_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 16; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_combine2_nxm_u8 */ +#ifdef DISABLE_ORC +void +orc_combine2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int n, int m){ + int i; + int j; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + /* 4: loadpw */ + var36.i = p1; + /* 6: loadpw */ + var37.i = p2; + /* 9: loadpw */ + var38.i = p3; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> p4; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +#else +static void +_backup_orc_combine2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_int8 var34; + orc_int8 var35; + orc_union16 var36; + orc_union16 var37; + orc_union16 var38; + orc_int8 var39; + orc_union16 var40; + orc_union16 var41; + orc_union16 var42; + orc_union16 var43; + orc_union16 var44; + orc_union16 var45; + orc_union16 var46; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + /* 4: loadpw */ + var36.i = ex->params[24]; + /* 6: loadpw */ + var37.i = ex->params[25]; + /* 9: loadpw */ + var38.i = ex->params[26]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var40.i = (orc_uint8)var34; + /* 2: loadb */ + var35 = ptr5[i]; + /* 3: convubw */ + var41.i = (orc_uint8)var35; + /* 5: mullw */ + var42.i = (var40.i * var36.i) & 0xffff; + /* 7: mullw */ + var43.i = (var41.i * var37.i) & 0xffff; + /* 8: addw */ + var44.i = var42.i + var43.i; + /* 10: addw */ + var45.i = var44.i + var38.i; + /* 11: shrsw */ + var46.i = var45.i >> ex->params[27]; + /* 12: convsuswb */ + var39 = ORC_CLAMP_UB(var46.i); + /* 13: storeb */ + ptr0[i] = var39; + } + } + +} + +void +orc_combine2_nxm_u8 (uint8_t * d1, int d1_stride, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int p1, int p2, int p3, int p4, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_combine2_nxm_u8"); + orc_program_set_backup_function (p, _backup_orc_combine2_nxm_u8); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_parameter (p, 2, "p3"); + orc_program_add_parameter (p, 2, "p4"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1); + orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1); + orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + ex->params[ORC_VAR_P3] = p3; + ex->params[ORC_VAR_P4] = p4; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_sad_nxm_u8 */ +#ifdef DISABLE_ORC +void +orc_sad_nxm_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m){ + int i; + int j; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sad_nxm_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sad_nxm_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_sad_nxm_u8"); + orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + + orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sad_8x8_u8 */ +#ifdef DISABLE_ORC +void +orc_sad_8x8_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride){ + int i; + int j; + int n = 8; + int m = 8; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sad_8x8_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 8; + int m = 8; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sad_8x8_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 8); + orc_program_set_2d (p); + orc_program_set_constant_m (p, 8); + orc_program_set_name (p, "orc_sad_8x8_u8"); + orc_program_set_backup_function (p, _backup_orc_sad_8x8_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + + orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 8; + ORC_EXECUTOR_M(ex) = 8; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sad_12x12_u8 */ +#ifdef DISABLE_ORC +void +orc_sad_12x12_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride){ + int i; + int j; + int n = 12; + int m = 12; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sad_12x12_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 12; + int m = 12; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sad_12x12_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 12); + orc_program_set_2d (p); + orc_program_set_constant_m (p, 12); + orc_program_set_name (p, "orc_sad_12x12_u8"); + orc_program_set_backup_function (p, _backup_orc_sad_12x12_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + + orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 12; + ORC_EXECUTOR_M(ex) = 12; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sad_16xn_u8 */ +#ifdef DISABLE_ORC +void +orc_sad_16xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 16; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sad_16xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 16; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sad_16xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 16); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_sad_16xn_u8"); + orc_program_set_backup_function (p, _backup_orc_sad_16xn_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + + orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 16; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* orc_sad_32xn_u8 */ +#ifdef DISABLE_ORC +void +orc_sad_32xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m){ + int i; + int j; + int n = 32; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + ptr5 = ORC_PTR_OFFSET(s2, s2_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + *a1 = var12.i; + +} + +#else +static void +_backup_orc_sad_32xn_u8 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = 32; + int m = ex->params[ORC_VAR_A1]; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var12 = { 0 }; + orc_int8 var32; + orc_int8 var33; + + for (j = 0; j < m; j++) { + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr4[i]; + /* 1: loadb */ + var33 = ptr5[i]; + /* 2: accsadubl */ + var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33); + } + } + ex->accumulators[0] = var12.i; + +} + +void +orc_sad_32xn_u8 (uint32_t * a1, const uint8_t * s1, int s1_stride, const uint8_t * s2, int s2_stride, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_constant_n (p, 32); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_sad_32xn_u8"); + orc_program_set_backup_function (p, _backup_orc_sad_32xn_u8); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_accumulator (p, 4, "a1"); + + orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = 32; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->params[ORC_VAR_S2] = s2_stride; + + func = p->code_exec; + func (ex); + *a1 = orc_executor_get_accumulator (ex, ORC_VAR_A1); +} +#endif + + +/* convert_rgb_to_gray */ +#ifdef DISABLE_ORC +void +convert_rgb_to_gray (orc_uint8 * d1, const orc_uint32 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_int8 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_int8 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_int8 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 5: loadpw */ + var36.i = 0x00004c8b; /* 19595 or 9.68122e-320f */ + /* 12: loadpw */ + var38.i = 0x00009646; /* 38470 or 1.90067e-319f */ + /* 20: loadpw */ + var40.i = 0x00001d2f; /* 7471 or 3.69116e-320f */ + /* 23: loadpw */ + var41.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: select0lw */ + var43.i = (orc_uint32)var35.i & 0xffff; + /* 2: select0wb */ + var44 = (orc_uint16)var43.i & 0xff; + /* 3: convubw */ + var45.i = (orc_uint8)var44; + /* 4: swapw */ + var46.i = ORC_SWAP_W(var45.i); + /* 6: mulhuw */ + var47.i = ((orc_uint32)((orc_uint16)var46.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 7: loadl */ + var37 = ptr4[i]; + /* 8: select0lw */ + var48.i = (orc_uint32)var37.i & 0xffff; + /* 9: select1wb */ + var49 = ((orc_uint16)var48.i >> 8)&0xff; + /* 10: convubw */ + var50.i = (orc_uint8)var49; + /* 11: swapw */ + var51.i = ORC_SWAP_W(var50.i); + /* 13: mulhuw */ + var52.i = ((orc_uint32)((orc_uint16)var51.i) * (orc_uint32)((orc_uint16)var38.i)) >> 16; + /* 14: addusw */ + var53.i = ORC_CLAMP_UW((orc_uint16)var47.i + (orc_uint16)var52.i); + /* 15: loadl */ + var39 = ptr4[i]; + /* 16: select1lw */ + var54.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 17: select0wb */ + var55 = (orc_uint16)var54.i & 0xff; + /* 18: convubw */ + var56.i = (orc_uint8)var55; + /* 19: swapw */ + var57.i = ORC_SWAP_W(var56.i); + /* 21: mulhuw */ + var58.i = ((orc_uint32)((orc_uint16)var57.i) * (orc_uint32)((orc_uint16)var40.i)) >> 16; + /* 22: addusw */ + var59.i = ORC_CLAMP_UW((orc_uint16)var53.i + (orc_uint16)var58.i); + /* 24: addusw */ + var60.i = ORC_CLAMP_UW((orc_uint16)var59.i + (orc_uint16)var41.i); + /* 25: select1wb */ + var42 = ((orc_uint16)var60.i >> 8)&0xff; + /* 26: storeb */ + ptr0[i] = var42; + } + +} + +#else +static void +_backup_convert_rgb_to_gray (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var35; + orc_union16 var36; + orc_union32 var37; + orc_union16 var38; + orc_union32 var39; + orc_union16 var40; + orc_union16 var41; + orc_int8 var42; + orc_union16 var43; + orc_int8 var44; + orc_union16 var45; + orc_union16 var46; + orc_union16 var47; + orc_union16 var48; + orc_int8 var49; + orc_union16 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union16 var54; + orc_int8 var55; + orc_union16 var56; + orc_union16 var57; + orc_union16 var58; + orc_union16 var59; + orc_union16 var60; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var36.i = 0x00004c8b; /* 19595 or 9.68122e-320f */ + /* 12: loadpw */ + var38.i = 0x00009646; /* 38470 or 1.90067e-319f */ + /* 20: loadpw */ + var40.i = 0x00001d2f; /* 7471 or 3.69116e-320f */ + /* 23: loadpw */ + var41.i = 0x00000080; /* 128 or 6.32404e-322f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: select0lw */ + var43.i = (orc_uint32)var35.i & 0xffff; + /* 2: select0wb */ + var44 = (orc_uint16)var43.i & 0xff; + /* 3: convubw */ + var45.i = (orc_uint8)var44; + /* 4: swapw */ + var46.i = ORC_SWAP_W(var45.i); + /* 6: mulhuw */ + var47.i = ((orc_uint32)((orc_uint16)var46.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16; + /* 7: loadl */ + var37 = ptr4[i]; + /* 8: select0lw */ + var48.i = (orc_uint32)var37.i & 0xffff; + /* 9: select1wb */ + var49 = ((orc_uint16)var48.i >> 8)&0xff; + /* 10: convubw */ + var50.i = (orc_uint8)var49; + /* 11: swapw */ + var51.i = ORC_SWAP_W(var50.i); + /* 13: mulhuw */ + var52.i = ((orc_uint32)((orc_uint16)var51.i) * (orc_uint32)((orc_uint16)var38.i)) >> 16; + /* 14: addusw */ + var53.i = ORC_CLAMP_UW((orc_uint16)var47.i + (orc_uint16)var52.i); + /* 15: loadl */ + var39 = ptr4[i]; + /* 16: select1lw */ + var54.i = ((orc_uint32)var39.i >> 16)&0xffff; + /* 17: select0wb */ + var55 = (orc_uint16)var54.i & 0xff; + /* 18: convubw */ + var56.i = (orc_uint8)var55; + /* 19: swapw */ + var57.i = ORC_SWAP_W(var56.i); + /* 21: mulhuw */ + var58.i = ((orc_uint32)((orc_uint16)var57.i) * (orc_uint32)((orc_uint16)var40.i)) >> 16; + /* 22: addusw */ + var59.i = ORC_CLAMP_UW((orc_uint16)var53.i + (orc_uint16)var58.i); + /* 24: addusw */ + var60.i = ORC_CLAMP_UW((orc_uint16)var59.i + (orc_uint16)var41.i); + /* 25: select1wb */ + var42 = ((orc_uint16)var60.i >> 8)&0xff; + /* 26: storeb */ + ptr0[i] = var42; + } + +} + +void +convert_rgb_to_gray (orc_uint8 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "convert_rgb_to_gray"); + orc_program_set_backup_function (p, _backup_convert_rgb_to_gray); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x00004c8b, "c1"); + orc_program_add_constant (p, 4, 0x00009646, "c2"); + orc_program_add_constant (p, 4, 0x00001d2f, "c3"); + orc_program_add_constant (p, 4, 0x00000080, "c4"); + orc_program_add_temporary (p, 1, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 2, "t3"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "swapw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "swapw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "swapw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, ORC_VAR_D1); + orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C4, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* canny_calc_delta_x */ +#ifdef DISABLE_ORC +void +canny_calc_delta_x (int32_t * d1, const uint8_t * s1, const uint8_t * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union32 var44; + orc_union32 var45; + orc_union32 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_int8 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union32 var54; + orc_union32 var55; + orc_union16 var56; + orc_int8 var57; + orc_union16 var58; + orc_int8 var59; + orc_union16 var60; + orc_union16 var61; + orc_union16 var62; + orc_union32 var63; + orc_union32 var64; + orc_union32 var65; + orc_union16 var66; + orc_int8 var67; + orc_union16 var68; + orc_int8 var69; + orc_union16 var70; + orc_union16 var71; + orc_union16 var72; + orc_union32 var73; + orc_union32 var74; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: select0lw */ + var47.i = (orc_uint32)var40.i & 0xffff; + /* 2: select1wb */ + var48 = ((orc_uint16)var47.i >> 8)&0xff; + /* 3: loadl */ + var41 = ptr5[i]; + /* 4: select0lw */ + var49.i = (orc_uint32)var41.i & 0xffff; + /* 5: select1wb */ + var50 = ((orc_uint16)var49.i >> 8)&0xff; + /* 6: convubw */ + var51.i = (orc_uint8)var48; + /* 7: convubw */ + var52.i = (orc_uint8)var50; + /* 8: subw */ + var53.i = var51.i - var52.i; + /* 9: convswl */ + var54.i = var53.i; + /* 10: mulll */ + var55.i = (var54.i * var54.i) & 0xffffffff; + /* 11: loadl */ + var42 = ptr4[i]; + /* 12: select1lw */ + var56.i = ((orc_uint32)var42.i >> 16)&0xffff; + /* 13: select0wb */ + var57 = (orc_uint16)var56.i & 0xff; + /* 14: loadl */ + var43 = ptr5[i]; + /* 15: select1lw */ + var58.i = ((orc_uint32)var43.i >> 16)&0xffff; + /* 16: select0wb */ + var59 = (orc_uint16)var58.i & 0xff; + /* 17: convubw */ + var60.i = (orc_uint8)var57; + /* 18: convubw */ + var61.i = (orc_uint8)var59; + /* 19: subw */ + var62.i = var60.i - var61.i; + /* 20: convswl */ + var63.i = var62.i; + /* 21: mulll */ + var64.i = (var63.i * var63.i) & 0xffffffff; + /* 22: addl */ + var65.i = var55.i + var64.i; + /* 23: loadl */ + var44 = ptr4[i]; + /* 24: select1lw */ + var66.i = ((orc_uint32)var44.i >> 16)&0xffff; + /* 25: select1wb */ + var67 = ((orc_uint16)var66.i >> 8)&0xff; + /* 26: loadl */ + var45 = ptr5[i]; + /* 27: select1lw */ + var68.i = ((orc_uint32)var45.i >> 16)&0xffff; + /* 28: select1wb */ + var69 = ((orc_uint16)var68.i >> 8)&0xff; + /* 29: convubw */ + var70.i = (orc_uint8)var67; + /* 30: convubw */ + var71.i = (orc_uint8)var69; + /* 31: subw */ + var72.i = var70.i - var71.i; + /* 32: convswl */ + var73.i = var72.i; + /* 33: mulll */ + var74.i = (var73.i * var73.i) & 0xffffffff; + /* 34: addl */ + var46.i = var65.i + var74.i; + /* 35: storel */ + ptr0[i] = var46; + } + +} + +#else +static void +_backup_canny_calc_delta_x (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union32 var44; + orc_union32 var45; + orc_union32 var46; + orc_union16 var47; + orc_int8 var48; + orc_union16 var49; + orc_int8 var50; + orc_union16 var51; + orc_union16 var52; + orc_union16 var53; + orc_union32 var54; + orc_union32 var55; + orc_union16 var56; + orc_int8 var57; + orc_union16 var58; + orc_int8 var59; + orc_union16 var60; + orc_union16 var61; + orc_union16 var62; + orc_union32 var63; + orc_union32 var64; + orc_union32 var65; + orc_union16 var66; + orc_int8 var67; + orc_union16 var68; + orc_int8 var69; + orc_union16 var70; + orc_union16 var71; + orc_union16 var72; + orc_union32 var73; + orc_union32 var74; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: select0lw */ + var47.i = (orc_uint32)var40.i & 0xffff; + /* 2: select1wb */ + var48 = ((orc_uint16)var47.i >> 8)&0xff; + /* 3: loadl */ + var41 = ptr5[i]; + /* 4: select0lw */ + var49.i = (orc_uint32)var41.i & 0xffff; + /* 5: select1wb */ + var50 = ((orc_uint16)var49.i >> 8)&0xff; + /* 6: convubw */ + var51.i = (orc_uint8)var48; + /* 7: convubw */ + var52.i = (orc_uint8)var50; + /* 8: subw */ + var53.i = var51.i - var52.i; + /* 9: convswl */ + var54.i = var53.i; + /* 10: mulll */ + var55.i = (var54.i * var54.i) & 0xffffffff; + /* 11: loadl */ + var42 = ptr4[i]; + /* 12: select1lw */ + var56.i = ((orc_uint32)var42.i >> 16)&0xffff; + /* 13: select0wb */ + var57 = (orc_uint16)var56.i & 0xff; + /* 14: loadl */ + var43 = ptr5[i]; + /* 15: select1lw */ + var58.i = ((orc_uint32)var43.i >> 16)&0xffff; + /* 16: select0wb */ + var59 = (orc_uint16)var58.i & 0xff; + /* 17: convubw */ + var60.i = (orc_uint8)var57; + /* 18: convubw */ + var61.i = (orc_uint8)var59; + /* 19: subw */ + var62.i = var60.i - var61.i; + /* 20: convswl */ + var63.i = var62.i; + /* 21: mulll */ + var64.i = (var63.i * var63.i) & 0xffffffff; + /* 22: addl */ + var65.i = var55.i + var64.i; + /* 23: loadl */ + var44 = ptr4[i]; + /* 24: select1lw */ + var66.i = ((orc_uint32)var44.i >> 16)&0xffff; + /* 25: select1wb */ + var67 = ((orc_uint16)var66.i >> 8)&0xff; + /* 26: loadl */ + var45 = ptr5[i]; + /* 27: select1lw */ + var68.i = ((orc_uint32)var45.i >> 16)&0xffff; + /* 28: select1wb */ + var69 = ((orc_uint16)var68.i >> 8)&0xff; + /* 29: convubw */ + var70.i = (orc_uint8)var67; + /* 30: convubw */ + var71.i = (orc_uint8)var69; + /* 31: subw */ + var72.i = var70.i - var71.i; + /* 32: convswl */ + var73.i = var72.i; + /* 33: mulll */ + var74.i = (var73.i * var73.i) & 0xffffffff; + /* 34: addl */ + var46.i = var65.i + var74.i; + /* 35: storel */ + ptr0[i] = var46; + } + +} + +void +canny_calc_delta_x (int32_t * d1, const uint8_t * s1, const uint8_t * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "canny_calc_delta_x"); + orc_program_set_backup_function (p, _backup_canny_calc_delta_x); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + orc_program_add_temporary (p, 1, "t3"); + orc_program_add_temporary (p, 2, "t4"); + orc_program_add_temporary (p, 1, "t5"); + orc_program_add_temporary (p, 2, "t6"); + orc_program_add_temporary (p, 4, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 0, ORC_VAR_D1, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* i420_to_ayuv */ +#ifdef DISABLE_ORC +void +i420_to_ayuv (orc_uint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int p1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_int8 var37; + orc_union32 var38; + orc_int8 var39; + orc_int8 var40; + orc_int8 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_int8 *)s1; + ptr5 = (orc_int8 *)s2; + ptr6 = (orc_int8 *)s3; + + /* 3: loadpb */ + var37 = p1; + + for (i = 0; i < n; i++) { + /* 0: loadupdb */ + var39 = ptr5[i>>1]; + /* 1: loadupdb */ + var40 = ptr6[i>>1]; + /* 2: loadb */ + var41 = ptr4[i]; + /* 4: mergebw */ + var42.i = ((orc_uint8)var37 & 0x00ff) | ((orc_uint8)var41 << 8); + /* 5: mergebw */ + var43.i = ((orc_uint8)var39 & 0x00ff) | ((orc_uint8)var40 << 8); + /* 6: mergewl */ + var38.i = ((orc_uint16)var42.i & 0x0000ffff) | ((orc_uint16)var43.i << 16); + /* 7: storel */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_i420_to_ayuv (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + const orc_int8 * ORC_RESTRICT ptr6; + orc_int8 var37; + orc_union32 var38; + orc_int8 var39; + orc_int8 var40; + orc_int8 var41; + orc_union16 var42; + orc_union16 var43; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + ptr6 = (orc_int8 *)ex->arrays[6]; + + /* 3: loadpb */ + var37 = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadupdb */ + var39 = ptr5[i>>1]; + /* 1: loadupdb */ + var40 = ptr6[i>>1]; + /* 2: loadb */ + var41 = ptr4[i]; + /* 4: mergebw */ + var42.i = ((orc_uint8)var37 & 0x00ff) | ((orc_uint8)var41 << 8); + /* 5: mergebw */ + var43.i = ((orc_uint8)var39 & 0x00ff) | ((orc_uint8)var40 << 8); + /* 6: mergewl */ + var38.i = ((orc_uint16)var42.i & 0x0000ffff) | ((orc_uint16)var43.i << 16); + /* 7: storel */ + ptr0[i] = var38; + } + +} + +void +i420_to_ayuv (orc_uint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "i420_to_ayuv"); + orc_program_set_backup_function (p, _backup_i420_to_ayuv); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_source (p, 1, "s3"); + orc_program_add_parameter (p, 1, "p1"); + orc_program_add_temporary (p, 1, "t1"); + orc_program_add_temporary (p, 1, "t2"); + orc_program_add_temporary (p, 1, "t3"); + orc_program_add_temporary (p, 2, "t4"); + orc_program_add_temporary (p, 2, "t5"); + + orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadb", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_P1, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + ex->arrays[ORC_VAR_S3] = (void *)s3; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* test_4x */ +#ifdef DISABLE_ORC +void +test_4x (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_test_4x (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: loadl */ + var33 = ptr5[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +test_4x (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "test_4x"); + orc_program_set_backup_function (p, _backup_test_4x); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* test_4x_2 */ +#ifdef DISABLE_ORC +void +test_4x_2 (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 1: loadpb */ + var33.x4[0] = p1; + var33.x4[1] = p1; + var33.x4[2] = p1; + var33.x4[3] = p1; + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_test_4x_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 1: loadpb */ + var33.x4[0] = ex->params[24]; + var33.x4[1] = ex->params[24]; + var33.x4[2] = ex->params[24]; + var33.x4[3] = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +test_4x_2 (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "test_4x_2"); + orc_program_set_backup_function (p, _backup_test_4x_2); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_parameter (p, 4, "p1"); + + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u16 */ +#ifdef DISABLE_ORC +void +orc_splat_u16 (uint16_t * d1, int p1, int n){ + int i; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)d1; + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_splat_u16 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + ptr0 = (orc_union16 *)ex->arrays[0]; + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + +} + +void +orc_splat_u16 (uint16_t * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_splat_u16"); + orc_program_set_backup_function (p, _backup_orc_splat_u16); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u32 */ +#ifdef DISABLE_ORC +void +orc_splat_u32 (uint32_t * d1, int p1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)d1; + + /* 0: loadpl */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +orc_splat_u32 (uint32_t * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_splat_u32"); + orc_program_set_backup_function (p, _backup_orc_splat_u32); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_parameter (p, 4, "p1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u16_2d */ +#ifdef DISABLE_ORC +void +orc_splat_u16_2d (uint16_t * d1, int d1_stride, int p1, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpw */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_u16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpw */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_u16_2d (uint16_t * d1, int d1_stride, int p1, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_u16_2d"); + orc_program_set_backup_function (p, _backup_orc_splat_u16_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_parameter (p, 2, "p1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_splat_u32_2d */ +#ifdef DISABLE_ORC +void +orc_splat_u32_2d (uint32_t * d1, int d1_stride, int p1, int n, int m){ + int i; + int j; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + + /* 0: loadpl */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_splat_u32_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + + /* 0: loadpl */ + var32.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +void +orc_splat_u32_2d (uint32_t * d1, int d1_stride, int p1, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_splat_u32_2d"); + orc_program_set_backup_function (p, _backup_orc_splat_u32_2d); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_parameter (p, 4, "p1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_copy_u16_2d */ +#ifdef DISABLE_ORC +void +orc_copy_u16_2d (orc_uint16 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, int n, int m){ + int i; + int j; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_copy_u16_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union16 * ORC_RESTRICT ptr0; + const orc_union16 * ORC_RESTRICT ptr4; + orc_union16 var32; + orc_union16 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadw */ + var32 = ptr4[i]; + /* 1: copyw */ + var33.i = var32.i; + /* 2: storew */ + ptr0[i] = var33; + } + } + +} + +void +orc_copy_u16_2d (orc_uint16 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_copy_u16_2d"); + orc_program_set_backup_function (p, _backup_orc_copy_u16_2d); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + + orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_copy_u32_2d */ +#ifdef DISABLE_ORC +void +orc_copy_u32_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m){ + int i; + int j; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +#else +static void +_backup_orc_copy_u32_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr4[i]; + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + } + +} + +void +orc_copy_u32_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_copy_u32_2d"); + orc_program_set_backup_function (p, _backup_orc_copy_u32_2d); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_composite_add_8888_8888_2d */ +#ifdef DISABLE_ORC +void +orc_composite_add_8888_8888_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m){ + int i; + int j; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(d1, d1_stride * j); + ptr4 = ORC_PTR_OFFSET(s1, s1_stride * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + } + +} + +#else +static void +_backup_orc_composite_add_8888_8888_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int j; + int n = ex->n; + int m = ex->params[ORC_VAR_A1]; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + for (j = 0; j < m; j++) { + ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j); + ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j); + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + } + +} + +void +orc_composite_add_8888_8888_2d (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_2d (p); + orc_program_set_name (p, "orc_composite_add_8888_8888_2d"); + orc_program_set_backup_function (p, _backup_orc_composite_add_8888_8888_2d); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ORC_EXECUTOR_M(ex) = m; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_D1] = d1_stride; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_S1] = s1_stride; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_composite_add_8_8_line */ +#ifdef DISABLE_ORC +void +orc_composite_add_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr0[i]; + /* 1: loadb */ + var33 = ptr4[i]; + /* 2: addusb */ + var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_composite_add_8_8_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + orc_int8 var33; + orc_int8 var34; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var32 = ptr0[i]; + /* 1: loadb */ + var33 = ptr4[i]; + /* 2: addusb */ + var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33); + /* 3: storeb */ + ptr0[i] = var34; + } + +} + +void +orc_composite_add_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_composite_add_8_8_line"); + orc_program_set_backup_function (p, _backup_orc_composite_add_8_8_line); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + + orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_composite_add_n_8_8_line */ +#ifdef DISABLE_ORC +void +orc_composite_add_n_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int p1, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_int8 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_int8 var41; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + + /* 2: loadpw */ + var35.i = p1; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var38.i = (orc_uint8)var34; + /* 3: mullw */ + var39.i = (var38.i * var35.i) & 0xffff; + /* 4: div255w */ + var40.i = ((uint16_t)(((orc_uint16)(var39.i+128)) + (((orc_uint16)(var39.i+128))>>8)))>>8; + /* 5: convwb */ + var41 = var40.i; + /* 6: loadb */ + var36 = ptr0[i]; + /* 7: addusb */ + var37 = ORC_CLAMP_UB((orc_uint8)var36 + (orc_uint8)var41); + /* 8: storeb */ + ptr0[i] = var37; + } + +} + +#else +static void +_backup_orc_composite_add_n_8_8_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var34; + orc_union16 var35; + orc_int8 var36; + orc_int8 var37; + orc_union16 var38; + orc_union16 var39; + orc_union16 var40; + orc_int8 var41; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + /* 2: loadpw */ + var35.i = ex->params[24]; + + for (i = 0; i < n; i++) { + /* 0: loadb */ + var34 = ptr4[i]; + /* 1: convubw */ + var38.i = (orc_uint8)var34; + /* 3: mullw */ + var39.i = (var38.i * var35.i) & 0xffff; + /* 4: div255w */ + var40.i = ((uint16_t)(((orc_uint16)(var39.i+128)) + (((orc_uint16)(var39.i+128))>>8)))>>8; + /* 5: convwb */ + var41 = var40.i; + /* 6: loadb */ + var36 = ptr0[i]; + /* 7: addusb */ + var37 = ORC_CLAMP_UB((orc_uint8)var36 + (orc_uint8)var41); + /* 8: storeb */ + ptr0[i] = var37; + } + +} + +void +orc_composite_add_n_8_8_line (orc_uint8 * d1, const orc_uint8 * s1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_composite_add_n_8_8_line"); + orc_program_set_backup_function (p, _backup_orc_composite_add_n_8_8_line); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 1, "t2"); + + orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_add_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_add_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union32 var44; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: splatw3q */ + var41.i = ((((orc_uint64)var40.i)>>48) << 48) | ((((orc_uint64)var40.i)>>48)<<32) | ((((orc_uint64)var40.i)>>48) << 16) | ((((orc_uint64)var40.i)>>48)); + /* 5: mullw */ + var42.x4[0] = (var39.x4[0] * var41.x4[0]) & 0xffff; + var42.x4[1] = (var39.x4[1] * var41.x4[1]) & 0xffff; + var42.x4[2] = (var39.x4[2] * var41.x4[2]) & 0xffff; + var42.x4[3] = (var39.x4[3] * var41.x4[3]) & 0xffff; + /* 6: div255w */ + var43.x4[0] = ((uint16_t)(((orc_uint16)(var42.x4[0]+128)) + (((orc_uint16)(var42.x4[0]+128))>>8)))>>8; + var43.x4[1] = ((uint16_t)(((orc_uint16)(var42.x4[1]+128)) + (((orc_uint16)(var42.x4[1]+128))>>8)))>>8; + var43.x4[2] = ((uint16_t)(((orc_uint16)(var42.x4[2]+128)) + (((orc_uint16)(var42.x4[2]+128))>>8)))>>8; + var43.x4[3] = ((uint16_t)(((orc_uint16)(var42.x4[3]+128)) + (((orc_uint16)(var42.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var44.x4[0] = var43.x4[0]; + var44.x4[1] = var43.x4[1]; + var44.x4[2] = var43.x4[2]; + var44.x4[3] = var43.x4[3]; + /* 8: loadl */ + var37 = ptr0[i]; + /* 9: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var44.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var44.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var44.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var44.x4[3]); + /* 10: storel */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_code_combine_add_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union32 var44; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: splatw3q */ + var41.i = ((((orc_uint64)var40.i)>>48) << 48) | ((((orc_uint64)var40.i)>>48)<<32) | ((((orc_uint64)var40.i)>>48) << 16) | ((((orc_uint64)var40.i)>>48)); + /* 5: mullw */ + var42.x4[0] = (var39.x4[0] * var41.x4[0]) & 0xffff; + var42.x4[1] = (var39.x4[1] * var41.x4[1]) & 0xffff; + var42.x4[2] = (var39.x4[2] * var41.x4[2]) & 0xffff; + var42.x4[3] = (var39.x4[3] * var41.x4[3]) & 0xffff; + /* 6: div255w */ + var43.x4[0] = ((uint16_t)(((orc_uint16)(var42.x4[0]+128)) + (((orc_uint16)(var42.x4[0]+128))>>8)))>>8; + var43.x4[1] = ((uint16_t)(((orc_uint16)(var42.x4[1]+128)) + (((orc_uint16)(var42.x4[1]+128))>>8)))>>8; + var43.x4[2] = ((uint16_t)(((orc_uint16)(var42.x4[2]+128)) + (((orc_uint16)(var42.x4[2]+128))>>8)))>>8; + var43.x4[3] = ((uint16_t)(((orc_uint16)(var42.x4[3]+128)) + (((orc_uint16)(var42.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var44.x4[0] = var43.x4[0]; + var44.x4[1] = var43.x4[1]; + var44.x4[2] = var43.x4[2]; + var44.x4[3] = var43.x4[3]; + /* 8: loadl */ + var37 = ptr0[i]; + /* 9: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var44.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var44.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var44.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var44.x4[3]); + /* 10: storel */ + ptr0[i] = var38; + } + +} + +void +orc_code_combine_add_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_add_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_add_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_add_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_add_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_code_combine_add_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +orc_code_combine_add_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_add_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_add_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_over_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_over_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union32 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union32 var53; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + /* 10: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var46.x4[0] = var45.x4[0]; + var46.x4[1] = var45.x4[1]; + var46.x4[2] = var45.x4[2]; + var46.x4[3] = var45.x4[3]; + /* 8: loadl */ + var47 = ptr0[i]; + /* 9: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 11: xorw */ + var49.x4[0] = var45.x4[0] ^ var39.x4[0]; + var49.x4[1] = var45.x4[1] ^ var39.x4[1]; + var49.x4[2] = var45.x4[2] ^ var39.x4[2]; + var49.x4[3] = var45.x4[3] ^ var39.x4[3]; + /* 12: splatw3q */ + var50.i = ((((orc_uint64)var49.i)>>48) << 48) | ((((orc_uint64)var49.i)>>48)<<32) | ((((orc_uint64)var49.i)>>48) << 16) | ((((orc_uint64)var49.i)>>48)); + /* 13: mullw */ + var51.x4[0] = (var48.x4[0] * var50.x4[0]) & 0xffff; + var51.x4[1] = (var48.x4[1] * var50.x4[1]) & 0xffff; + var51.x4[2] = (var48.x4[2] * var50.x4[2]) & 0xffff; + var51.x4[3] = (var48.x4[3] * var50.x4[3]) & 0xffff; + /* 14: div255w */ + var52.x4[0] = ((uint16_t)(((orc_uint16)(var51.x4[0]+128)) + (((orc_uint16)(var51.x4[0]+128))>>8)))>>8; + var52.x4[1] = ((uint16_t)(((orc_uint16)(var51.x4[1]+128)) + (((orc_uint16)(var51.x4[1]+128))>>8)))>>8; + var52.x4[2] = ((uint16_t)(((orc_uint16)(var51.x4[2]+128)) + (((orc_uint16)(var51.x4[2]+128))>>8)))>>8; + var52.x4[3] = ((uint16_t)(((orc_uint16)(var51.x4[3]+128)) + (((orc_uint16)(var51.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var53.x4[0] = var52.x4[0]; + var53.x4[1] = var52.x4[1]; + var53.x4[2] = var52.x4[2]; + var53.x4[3] = var52.x4[3]; + /* 16: addusb */ + var40.x4[0] = ORC_CLAMP_UB((orc_uint8)var53.x4[0] + (orc_uint8)var46.x4[0]); + var40.x4[1] = ORC_CLAMP_UB((orc_uint8)var53.x4[1] + (orc_uint8)var46.x4[1]); + var40.x4[2] = ORC_CLAMP_UB((orc_uint8)var53.x4[2] + (orc_uint8)var46.x4[2]); + var40.x4[3] = ORC_CLAMP_UB((orc_uint8)var53.x4[3] + (orc_uint8)var46.x4[3]); + /* 17: storel */ + ptr0[i] = var40; + } + +} + +#else +static void +_backup_orc_code_combine_over_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union32 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union32 var53; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var46.x4[0] = var45.x4[0]; + var46.x4[1] = var45.x4[1]; + var46.x4[2] = var45.x4[2]; + var46.x4[3] = var45.x4[3]; + /* 8: loadl */ + var47 = ptr0[i]; + /* 9: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 11: xorw */ + var49.x4[0] = var45.x4[0] ^ var39.x4[0]; + var49.x4[1] = var45.x4[1] ^ var39.x4[1]; + var49.x4[2] = var45.x4[2] ^ var39.x4[2]; + var49.x4[3] = var45.x4[3] ^ var39.x4[3]; + /* 12: splatw3q */ + var50.i = ((((orc_uint64)var49.i)>>48) << 48) | ((((orc_uint64)var49.i)>>48)<<32) | ((((orc_uint64)var49.i)>>48) << 16) | ((((orc_uint64)var49.i)>>48)); + /* 13: mullw */ + var51.x4[0] = (var48.x4[0] * var50.x4[0]) & 0xffff; + var51.x4[1] = (var48.x4[1] * var50.x4[1]) & 0xffff; + var51.x4[2] = (var48.x4[2] * var50.x4[2]) & 0xffff; + var51.x4[3] = (var48.x4[3] * var50.x4[3]) & 0xffff; + /* 14: div255w */ + var52.x4[0] = ((uint16_t)(((orc_uint16)(var51.x4[0]+128)) + (((orc_uint16)(var51.x4[0]+128))>>8)))>>8; + var52.x4[1] = ((uint16_t)(((orc_uint16)(var51.x4[1]+128)) + (((orc_uint16)(var51.x4[1]+128))>>8)))>>8; + var52.x4[2] = ((uint16_t)(((orc_uint16)(var51.x4[2]+128)) + (((orc_uint16)(var51.x4[2]+128))>>8)))>>8; + var52.x4[3] = ((uint16_t)(((orc_uint16)(var51.x4[3]+128)) + (((orc_uint16)(var51.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var53.x4[0] = var52.x4[0]; + var53.x4[1] = var52.x4[1]; + var53.x4[2] = var52.x4[2]; + var53.x4[3] = var52.x4[3]; + /* 16: addusb */ + var40.x4[0] = ORC_CLAMP_UB((orc_uint8)var53.x4[0] + (orc_uint8)var46.x4[0]); + var40.x4[1] = ORC_CLAMP_UB((orc_uint8)var53.x4[1] + (orc_uint8)var46.x4[1]); + var40.x4[2] = ORC_CLAMP_UB((orc_uint8)var53.x4[2] + (orc_uint8)var46.x4[2]); + var40.x4[3] = ORC_CLAMP_UB((orc_uint8)var53.x4[3] + (orc_uint8)var46.x4[3]); + /* 17: storel */ + ptr0[i] = var40; + } + +} + +void +orc_code_combine_over_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_over_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_over_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_over_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_over_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union64 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 4: loadpw */ + var37.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var39 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var39.x4[0]; + var40.x4[1] = (orc_uint8)var39.x4[1]; + var40.x4[2] = (orc_uint8)var39.x4[2]; + var40.x4[3] = (orc_uint8)var39.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var41.x4[0]; + var42.x4[1] = (orc_uint8)var41.x4[1]; + var42.x4[2] = (orc_uint8)var41.x4[2]; + var42.x4[3] = (orc_uint8)var41.x4[3]; + /* 5: xorw */ + var43.x4[0] = var40.x4[0] ^ var37.x4[0]; + var43.x4[1] = var40.x4[1] ^ var37.x4[1]; + var43.x4[2] = var40.x4[2] ^ var37.x4[2]; + var43.x4[3] = var40.x4[3] ^ var37.x4[3]; + /* 6: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 7: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 10: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var47.x4[0] + (orc_uint8)var39.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var47.x4[1] + (orc_uint8)var39.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var47.x4[2] + (orc_uint8)var39.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var47.x4[3] + (orc_uint8)var39.x4[3]); + /* 11: storel */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_code_combine_over_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union64 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 4: loadpw */ + var37.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var37.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var39 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var39.x4[0]; + var40.x4[1] = (orc_uint8)var39.x4[1]; + var40.x4[2] = (orc_uint8)var39.x4[2]; + var40.x4[3] = (orc_uint8)var39.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var41.x4[0]; + var42.x4[1] = (orc_uint8)var41.x4[1]; + var42.x4[2] = (orc_uint8)var41.x4[2]; + var42.x4[3] = (orc_uint8)var41.x4[3]; + /* 5: xorw */ + var43.x4[0] = var40.x4[0] ^ var37.x4[0]; + var43.x4[1] = var40.x4[1] ^ var37.x4[1]; + var43.x4[2] = var40.x4[2] ^ var37.x4[2]; + var43.x4[3] = var40.x4[3] ^ var37.x4[3]; + /* 6: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 7: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 10: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var47.x4[0] + (orc_uint8)var39.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var47.x4[1] + (orc_uint8)var39.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var47.x4[2] + (orc_uint8)var39.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var47.x4[3] + (orc_uint8)var39.x4[3]); + /* 11: storel */ + ptr0[i] = var38; + } + +} + +void +orc_code_combine_over_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_over_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_over_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_in_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_in_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var46.x4[0] = (orc_uint8)var39.x4[0]; + var46.x4[1] = (orc_uint8)var39.x4[1]; + var46.x4[2] = (orc_uint8)var39.x4[2]; + var46.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 10: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 11: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var40.x4[0] = var49.x4[0]; + var40.x4[1] = var49.x4[1]; + var40.x4[2] = var49.x4[2]; + var40.x4[3] = var49.x4[3]; + /* 13: storel */ + ptr0[i] = var40; + } + +} + +#else +static void +_backup_orc_code_combine_in_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 5: mullw */ + var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff; + var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff; + var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff; + var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff; + /* 6: div255w */ + var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8; + var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8; + var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8; + var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var46.x4[0] = (orc_uint8)var39.x4[0]; + var46.x4[1] = (orc_uint8)var39.x4[1]; + var46.x4[2] = (orc_uint8)var39.x4[2]; + var46.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 10: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 11: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var40.x4[0] = var49.x4[0]; + var40.x4[1] = var49.x4[1]; + var40.x4[2] = var49.x4[2]; + var40.x4[3] = var49.x4[3]; + /* 13: storel */ + ptr0[i] = var40; + } + +} + +void +orc_code_combine_in_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_in_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_in_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_in_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_in_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var37.x4[0]; + var40.x4[1] = (orc_uint8)var37.x4[1]; + var40.x4[2] = (orc_uint8)var37.x4[2]; + var40.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var41.x4[0] = (orc_uint8)var38.x4[0]; + var41.x4[1] = (orc_uint8)var38.x4[1]; + var41.x4[2] = (orc_uint8)var38.x4[2]; + var41.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var42.i = ((((orc_uint64)var41.i)>>48) << 48) | ((((orc_uint64)var41.i)>>48)<<32) | ((((orc_uint64)var41.i)>>48) << 16) | ((((orc_uint64)var41.i)>>48)); + /* 5: mullw */ + var43.x4[0] = (var40.x4[0] * var42.x4[0]) & 0xffff; + var43.x4[1] = (var40.x4[1] * var42.x4[1]) & 0xffff; + var43.x4[2] = (var40.x4[2] * var42.x4[2]) & 0xffff; + var43.x4[3] = (var40.x4[3] * var42.x4[3]) & 0xffff; + /* 6: div255w */ + var44.x4[0] = ((uint16_t)(((orc_uint16)(var43.x4[0]+128)) + (((orc_uint16)(var43.x4[0]+128))>>8)))>>8; + var44.x4[1] = ((uint16_t)(((orc_uint16)(var43.x4[1]+128)) + (((orc_uint16)(var43.x4[1]+128))>>8)))>>8; + var44.x4[2] = ((uint16_t)(((orc_uint16)(var43.x4[2]+128)) + (((orc_uint16)(var43.x4[2]+128))>>8)))>>8; + var44.x4[3] = ((uint16_t)(((orc_uint16)(var43.x4[3]+128)) + (((orc_uint16)(var43.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var39.x4[0] = var44.x4[0]; + var39.x4[1] = var44.x4[1]; + var39.x4[2] = var44.x4[2]; + var39.x4[3] = var44.x4[3]; + /* 8: storel */ + ptr0[i] = var39; + } + +} + +#else +static void +_backup_orc_code_combine_in_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var40.x4[0] = (orc_uint8)var37.x4[0]; + var40.x4[1] = (orc_uint8)var37.x4[1]; + var40.x4[2] = (orc_uint8)var37.x4[2]; + var40.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var41.x4[0] = (orc_uint8)var38.x4[0]; + var41.x4[1] = (orc_uint8)var38.x4[1]; + var41.x4[2] = (orc_uint8)var38.x4[2]; + var41.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var42.i = ((((orc_uint64)var41.i)>>48) << 48) | ((((orc_uint64)var41.i)>>48)<<32) | ((((orc_uint64)var41.i)>>48) << 16) | ((((orc_uint64)var41.i)>>48)); + /* 5: mullw */ + var43.x4[0] = (var40.x4[0] * var42.x4[0]) & 0xffff; + var43.x4[1] = (var40.x4[1] * var42.x4[1]) & 0xffff; + var43.x4[2] = (var40.x4[2] * var42.x4[2]) & 0xffff; + var43.x4[3] = (var40.x4[3] * var42.x4[3]) & 0xffff; + /* 6: div255w */ + var44.x4[0] = ((uint16_t)(((orc_uint16)(var43.x4[0]+128)) + (((orc_uint16)(var43.x4[0]+128))>>8)))>>8; + var44.x4[1] = ((uint16_t)(((orc_uint16)(var43.x4[1]+128)) + (((orc_uint16)(var43.x4[1]+128))>>8)))>>8; + var44.x4[2] = ((uint16_t)(((orc_uint16)(var43.x4[2]+128)) + (((orc_uint16)(var43.x4[2]+128))>>8)))>>8; + var44.x4[3] = ((uint16_t)(((orc_uint16)(var43.x4[3]+128)) + (((orc_uint16)(var43.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var39.x4[0] = var44.x4[0]; + var39.x4[1] = var44.x4[1]; + var39.x4[2] = var44.x4[2]; + var39.x4[3] = var44.x4[3]; + /* 8: storel */ + ptr0[i] = var39; + } + +} + +void +orc_code_combine_in_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_in_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_in_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_out_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_out_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var37.x4[0]; + var42.x4[1] = (orc_uint8)var37.x4[1]; + var42.x4[2] = (orc_uint8)var37.x4[2]; + var42.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var43.x4[0] = (orc_uint8)var38.x4[0]; + var43.x4[1] = (orc_uint8)var38.x4[1]; + var43.x4[2] = (orc_uint8)var38.x4[2]; + var43.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var47.x4[0] = (orc_uint8)var39.x4[0]; + var47.x4[1] = (orc_uint8)var39.x4[1]; + var47.x4[2] = (orc_uint8)var39.x4[2]; + var47.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 11: xorw */ + var49.x4[0] = var48.x4[0] ^ var40.x4[0]; + var49.x4[1] = var48.x4[1] ^ var40.x4[1]; + var49.x4[2] = var48.x4[2] ^ var40.x4[2]; + var49.x4[3] = var48.x4[3] ^ var40.x4[3]; + /* 12: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 13: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var41.x4[0] = var51.x4[0]; + var41.x4[1] = var51.x4[1]; + var41.x4[2] = var51.x4[2]; + var41.x4[3] = var51.x4[3]; + /* 15: storel */ + ptr0[i] = var41; + } + +} + +#else +static void +_backup_orc_code_combine_out_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var37; + orc_union32 var38; + orc_union32 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var37.x4[0]; + var42.x4[1] = (orc_uint8)var37.x4[1]; + var42.x4[2] = (orc_uint8)var37.x4[2]; + var42.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr5[i]; + /* 3: convubw */ + var43.x4[0] = (orc_uint8)var38.x4[0]; + var43.x4[1] = (orc_uint8)var38.x4[1]; + var43.x4[2] = (orc_uint8)var38.x4[2]; + var43.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var39 = ptr0[i]; + /* 8: convubw */ + var47.x4[0] = (orc_uint8)var39.x4[0]; + var47.x4[1] = (orc_uint8)var39.x4[1]; + var47.x4[2] = (orc_uint8)var39.x4[2]; + var47.x4[3] = (orc_uint8)var39.x4[3]; + /* 9: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 11: xorw */ + var49.x4[0] = var48.x4[0] ^ var40.x4[0]; + var49.x4[1] = var48.x4[1] ^ var40.x4[1]; + var49.x4[2] = var48.x4[2] ^ var40.x4[2]; + var49.x4[3] = var48.x4[3] ^ var40.x4[3]; + /* 12: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 13: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var41.x4[0] = var51.x4[0]; + var41.x4[1] = var51.x4[1]; + var41.x4[2] = var51.x4[2]; + var41.x4[3] = var51.x4[3]; + /* 15: storel */ + ptr0[i] = var41; + } + +} + +void +orc_code_combine_out_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_out_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_out_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_out_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_out_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 5: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 6: xorw */ + var44.x4[0] = var43.x4[0] ^ var39.x4[0]; + var44.x4[1] = var43.x4[1] ^ var39.x4[1]; + var44.x4[2] = var43.x4[2] ^ var39.x4[2]; + var44.x4[3] = var43.x4[3] ^ var39.x4[3]; + /* 7: mullw */ + var45.x4[0] = (var41.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var41.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var41.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var41.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var40.x4[0] = var46.x4[0]; + var40.x4[1] = var46.x4[1]; + var40.x4[2] = var46.x4[2]; + var40.x4[3] = var46.x4[3]; + /* 10: storel */ + ptr0[i] = var40; + } + +} + +#else +static void +_backup_orc_code_combine_out_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var37 = ptr4[i]; + /* 1: convubw */ + var41.x4[0] = (orc_uint8)var37.x4[0]; + var41.x4[1] = (orc_uint8)var37.x4[1]; + var41.x4[2] = (orc_uint8)var37.x4[2]; + var41.x4[3] = (orc_uint8)var37.x4[3]; + /* 2: loadl */ + var38 = ptr0[i]; + /* 3: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 4: splatw3q */ + var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48)); + /* 6: xorw */ + var44.x4[0] = var43.x4[0] ^ var39.x4[0]; + var44.x4[1] = var43.x4[1] ^ var39.x4[1]; + var44.x4[2] = var43.x4[2] ^ var39.x4[2]; + var44.x4[3] = var43.x4[3] ^ var39.x4[3]; + /* 7: mullw */ + var45.x4[0] = (var41.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var41.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var41.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var41.x4[3] * var44.x4[3]) & 0xffff; + /* 8: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var40.x4[0] = var46.x4[0]; + var40.x4[1] = var46.x4[1]; + var40.x4[2] = var46.x4[2]; + var40.x4[3] = var46.x4[3]; + /* 10: storel */ + ptr0[i] = var40; + } + +} + +void +orc_code_combine_out_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_out_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_out_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_atop_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_atop_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union32 var55; + orc_union64 var56; + orc_union64 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union32 var61; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + /* 16: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 5: mullw */ + var49.x4[0] = (var46.x4[0] * var48.x4[0]) & 0xffff; + var49.x4[1] = (var46.x4[1] * var48.x4[1]) & 0xffff; + var49.x4[2] = (var46.x4[2] * var48.x4[2]) & 0xffff; + var49.x4[3] = (var46.x4[3] * var48.x4[3]) & 0xffff; + /* 6: div255w */ + var50.x4[0] = ((uint16_t)(((orc_uint16)(var49.x4[0]+128)) + (((orc_uint16)(var49.x4[0]+128))>>8)))>>8; + var50.x4[1] = ((uint16_t)(((orc_uint16)(var49.x4[1]+128)) + (((orc_uint16)(var49.x4[1]+128))>>8)))>>8; + var50.x4[2] = ((uint16_t)(((orc_uint16)(var49.x4[2]+128)) + (((orc_uint16)(var49.x4[2]+128))>>8)))>>8; + var50.x4[3] = ((uint16_t)(((orc_uint16)(var49.x4[3]+128)) + (((orc_uint16)(var49.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var52.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 10: mullw */ + var53.x4[0] = (var50.x4[0] * var52.x4[0]) & 0xffff; + var53.x4[1] = (var50.x4[1] * var52.x4[1]) & 0xffff; + var53.x4[2] = (var50.x4[2] * var52.x4[2]) & 0xffff; + var53.x4[3] = (var50.x4[3] * var52.x4[3]) & 0xffff; + /* 11: div255w */ + var54.x4[0] = ((uint16_t)(((orc_uint16)(var53.x4[0]+128)) + (((orc_uint16)(var53.x4[0]+128))>>8)))>>8; + var54.x4[1] = ((uint16_t)(((orc_uint16)(var53.x4[1]+128)) + (((orc_uint16)(var53.x4[1]+128))>>8)))>>8; + var54.x4[2] = ((uint16_t)(((orc_uint16)(var53.x4[2]+128)) + (((orc_uint16)(var53.x4[2]+128))>>8)))>>8; + var54.x4[3] = ((uint16_t)(((orc_uint16)(var53.x4[3]+128)) + (((orc_uint16)(var53.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var55.x4[0] = var54.x4[0]; + var55.x4[1] = var54.x4[1]; + var55.x4[2] = var54.x4[2]; + var55.x4[3] = var54.x4[3]; + /* 13: loadl */ + var43 = ptr0[i]; + /* 14: convubw */ + var56.x4[0] = (orc_uint8)var43.x4[0]; + var56.x4[1] = (orc_uint8)var43.x4[1]; + var56.x4[2] = (orc_uint8)var43.x4[2]; + var56.x4[3] = (orc_uint8)var43.x4[3]; + /* 15: splatw3q */ + var57.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 17: xorw */ + var58.x4[0] = var57.x4[0] ^ var44.x4[0]; + var58.x4[1] = var57.x4[1] ^ var44.x4[1]; + var58.x4[2] = var57.x4[2] ^ var44.x4[2]; + var58.x4[3] = var57.x4[3] ^ var44.x4[3]; + /* 18: mullw */ + var59.x4[0] = (var56.x4[0] * var58.x4[0]) & 0xffff; + var59.x4[1] = (var56.x4[1] * var58.x4[1]) & 0xffff; + var59.x4[2] = (var56.x4[2] * var58.x4[2]) & 0xffff; + var59.x4[3] = (var56.x4[3] * var58.x4[3]) & 0xffff; + /* 19: div255w */ + var60.x4[0] = ((uint16_t)(((orc_uint16)(var59.x4[0]+128)) + (((orc_uint16)(var59.x4[0]+128))>>8)))>>8; + var60.x4[1] = ((uint16_t)(((orc_uint16)(var59.x4[1]+128)) + (((orc_uint16)(var59.x4[1]+128))>>8)))>>8; + var60.x4[2] = ((uint16_t)(((orc_uint16)(var59.x4[2]+128)) + (((orc_uint16)(var59.x4[2]+128))>>8)))>>8; + var60.x4[3] = ((uint16_t)(((orc_uint16)(var59.x4[3]+128)) + (((orc_uint16)(var59.x4[3]+128))>>8)))>>8; + /* 20: convwb */ + var61.x4[0] = var60.x4[0]; + var61.x4[1] = var60.x4[1]; + var61.x4[2] = var60.x4[2]; + var61.x4[3] = var60.x4[3]; + /* 21: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var55.x4[0] + (orc_uint8)var61.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var55.x4[1] + (orc_uint8)var61.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var55.x4[2] + (orc_uint8)var61.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var55.x4[3] + (orc_uint8)var61.x4[3]); + /* 22: storel */ + ptr0[i] = var45; + } + +} + +#else +static void +_backup_orc_code_combine_atop_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union32 var55; + orc_union64 var56; + orc_union64 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union32 var61; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 16: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 5: mullw */ + var49.x4[0] = (var46.x4[0] * var48.x4[0]) & 0xffff; + var49.x4[1] = (var46.x4[1] * var48.x4[1]) & 0xffff; + var49.x4[2] = (var46.x4[2] * var48.x4[2]) & 0xffff; + var49.x4[3] = (var46.x4[3] * var48.x4[3]) & 0xffff; + /* 6: div255w */ + var50.x4[0] = ((uint16_t)(((orc_uint16)(var49.x4[0]+128)) + (((orc_uint16)(var49.x4[0]+128))>>8)))>>8; + var50.x4[1] = ((uint16_t)(((orc_uint16)(var49.x4[1]+128)) + (((orc_uint16)(var49.x4[1]+128))>>8)))>>8; + var50.x4[2] = ((uint16_t)(((orc_uint16)(var49.x4[2]+128)) + (((orc_uint16)(var49.x4[2]+128))>>8)))>>8; + var50.x4[3] = ((uint16_t)(((orc_uint16)(var49.x4[3]+128)) + (((orc_uint16)(var49.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var52.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 10: mullw */ + var53.x4[0] = (var50.x4[0] * var52.x4[0]) & 0xffff; + var53.x4[1] = (var50.x4[1] * var52.x4[1]) & 0xffff; + var53.x4[2] = (var50.x4[2] * var52.x4[2]) & 0xffff; + var53.x4[3] = (var50.x4[3] * var52.x4[3]) & 0xffff; + /* 11: div255w */ + var54.x4[0] = ((uint16_t)(((orc_uint16)(var53.x4[0]+128)) + (((orc_uint16)(var53.x4[0]+128))>>8)))>>8; + var54.x4[1] = ((uint16_t)(((orc_uint16)(var53.x4[1]+128)) + (((orc_uint16)(var53.x4[1]+128))>>8)))>>8; + var54.x4[2] = ((uint16_t)(((orc_uint16)(var53.x4[2]+128)) + (((orc_uint16)(var53.x4[2]+128))>>8)))>>8; + var54.x4[3] = ((uint16_t)(((orc_uint16)(var53.x4[3]+128)) + (((orc_uint16)(var53.x4[3]+128))>>8)))>>8; + /* 12: convwb */ + var55.x4[0] = var54.x4[0]; + var55.x4[1] = var54.x4[1]; + var55.x4[2] = var54.x4[2]; + var55.x4[3] = var54.x4[3]; + /* 13: loadl */ + var43 = ptr0[i]; + /* 14: convubw */ + var56.x4[0] = (orc_uint8)var43.x4[0]; + var56.x4[1] = (orc_uint8)var43.x4[1]; + var56.x4[2] = (orc_uint8)var43.x4[2]; + var56.x4[3] = (orc_uint8)var43.x4[3]; + /* 15: splatw3q */ + var57.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 17: xorw */ + var58.x4[0] = var57.x4[0] ^ var44.x4[0]; + var58.x4[1] = var57.x4[1] ^ var44.x4[1]; + var58.x4[2] = var57.x4[2] ^ var44.x4[2]; + var58.x4[3] = var57.x4[3] ^ var44.x4[3]; + /* 18: mullw */ + var59.x4[0] = (var56.x4[0] * var58.x4[0]) & 0xffff; + var59.x4[1] = (var56.x4[1] * var58.x4[1]) & 0xffff; + var59.x4[2] = (var56.x4[2] * var58.x4[2]) & 0xffff; + var59.x4[3] = (var56.x4[3] * var58.x4[3]) & 0xffff; + /* 19: div255w */ + var60.x4[0] = ((uint16_t)(((orc_uint16)(var59.x4[0]+128)) + (((orc_uint16)(var59.x4[0]+128))>>8)))>>8; + var60.x4[1] = ((uint16_t)(((orc_uint16)(var59.x4[1]+128)) + (((orc_uint16)(var59.x4[1]+128))>>8)))>>8; + var60.x4[2] = ((uint16_t)(((orc_uint16)(var59.x4[2]+128)) + (((orc_uint16)(var59.x4[2]+128))>>8)))>>8; + var60.x4[3] = ((uint16_t)(((orc_uint16)(var59.x4[3]+128)) + (((orc_uint16)(var59.x4[3]+128))>>8)))>>8; + /* 20: convwb */ + var61.x4[0] = var60.x4[0]; + var61.x4[1] = var60.x4[1]; + var61.x4[2] = var60.x4[2]; + var61.x4[3] = var60.x4[3]; + /* 21: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var55.x4[0] + (orc_uint8)var61.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var55.x4[1] + (orc_uint8)var61.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var55.x4[2] + (orc_uint8)var61.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var55.x4[3] + (orc_uint8)var61.x4[3]); + /* 22: storel */ + ptr0[i] = var45; + } + +} + +void +orc_code_combine_atop_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_atop_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_atop_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 4, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_atop_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_atop_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union32 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union32 var56; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 11: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var45.x4[0] = (orc_uint8)var40.x4[0]; + var45.x4[1] = (orc_uint8)var40.x4[1]; + var45.x4[2] = (orc_uint8)var40.x4[2]; + var45.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var46.x4[0] = (orc_uint8)var41.x4[0]; + var46.x4[1] = (orc_uint8)var41.x4[1]; + var46.x4[2] = (orc_uint8)var41.x4[2]; + var46.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 5: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 6: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var50.x4[0] = var49.x4[0]; + var50.x4[1] = var49.x4[1]; + var50.x4[2] = var49.x4[2]; + var50.x4[3] = var49.x4[3]; + /* 8: loadl */ + var42 = ptr0[i]; + /* 9: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 10: splatw3q */ + var52.i = ((((orc_uint64)var45.i)>>48) << 48) | ((((orc_uint64)var45.i)>>48)<<32) | ((((orc_uint64)var45.i)>>48) << 16) | ((((orc_uint64)var45.i)>>48)); + /* 12: xorw */ + var53.x4[0] = var52.x4[0] ^ var43.x4[0]; + var53.x4[1] = var52.x4[1] ^ var43.x4[1]; + var53.x4[2] = var52.x4[2] ^ var43.x4[2]; + var53.x4[3] = var52.x4[3] ^ var43.x4[3]; + /* 13: mullw */ + var54.x4[0] = (var51.x4[0] * var53.x4[0]) & 0xffff; + var54.x4[1] = (var51.x4[1] * var53.x4[1]) & 0xffff; + var54.x4[2] = (var51.x4[2] * var53.x4[2]) & 0xffff; + var54.x4[3] = (var51.x4[3] * var53.x4[3]) & 0xffff; + /* 14: div255w */ + var55.x4[0] = ((uint16_t)(((orc_uint16)(var54.x4[0]+128)) + (((orc_uint16)(var54.x4[0]+128))>>8)))>>8; + var55.x4[1] = ((uint16_t)(((orc_uint16)(var54.x4[1]+128)) + (((orc_uint16)(var54.x4[1]+128))>>8)))>>8; + var55.x4[2] = ((uint16_t)(((orc_uint16)(var54.x4[2]+128)) + (((orc_uint16)(var54.x4[2]+128))>>8)))>>8; + var55.x4[3] = ((uint16_t)(((orc_uint16)(var54.x4[3]+128)) + (((orc_uint16)(var54.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var56.x4[0] = var55.x4[0]; + var56.x4[1] = var55.x4[1]; + var56.x4[2] = var55.x4[2]; + var56.x4[3] = var55.x4[3]; + /* 16: addusb */ + var44.x4[0] = ORC_CLAMP_UB((orc_uint8)var50.x4[0] + (orc_uint8)var56.x4[0]); + var44.x4[1] = ORC_CLAMP_UB((orc_uint8)var50.x4[1] + (orc_uint8)var56.x4[1]); + var44.x4[2] = ORC_CLAMP_UB((orc_uint8)var50.x4[2] + (orc_uint8)var56.x4[2]); + var44.x4[3] = ORC_CLAMP_UB((orc_uint8)var50.x4[3] + (orc_uint8)var56.x4[3]); + /* 17: storel */ + ptr0[i] = var44; + } + +} + +#else +static void +_backup_orc_code_combine_atop_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union32 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union32 var56; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 11: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var45.x4[0] = (orc_uint8)var40.x4[0]; + var45.x4[1] = (orc_uint8)var40.x4[1]; + var45.x4[2] = (orc_uint8)var40.x4[2]; + var45.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var46.x4[0] = (orc_uint8)var41.x4[0]; + var46.x4[1] = (orc_uint8)var41.x4[1]; + var46.x4[2] = (orc_uint8)var41.x4[2]; + var46.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 5: mullw */ + var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff; + var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff; + var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff; + var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff; + /* 6: div255w */ + var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8; + var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8; + var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8; + var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var50.x4[0] = var49.x4[0]; + var50.x4[1] = var49.x4[1]; + var50.x4[2] = var49.x4[2]; + var50.x4[3] = var49.x4[3]; + /* 8: loadl */ + var42 = ptr0[i]; + /* 9: convubw */ + var51.x4[0] = (orc_uint8)var42.x4[0]; + var51.x4[1] = (orc_uint8)var42.x4[1]; + var51.x4[2] = (orc_uint8)var42.x4[2]; + var51.x4[3] = (orc_uint8)var42.x4[3]; + /* 10: splatw3q */ + var52.i = ((((orc_uint64)var45.i)>>48) << 48) | ((((orc_uint64)var45.i)>>48)<<32) | ((((orc_uint64)var45.i)>>48) << 16) | ((((orc_uint64)var45.i)>>48)); + /* 12: xorw */ + var53.x4[0] = var52.x4[0] ^ var43.x4[0]; + var53.x4[1] = var52.x4[1] ^ var43.x4[1]; + var53.x4[2] = var52.x4[2] ^ var43.x4[2]; + var53.x4[3] = var52.x4[3] ^ var43.x4[3]; + /* 13: mullw */ + var54.x4[0] = (var51.x4[0] * var53.x4[0]) & 0xffff; + var54.x4[1] = (var51.x4[1] * var53.x4[1]) & 0xffff; + var54.x4[2] = (var51.x4[2] * var53.x4[2]) & 0xffff; + var54.x4[3] = (var51.x4[3] * var53.x4[3]) & 0xffff; + /* 14: div255w */ + var55.x4[0] = ((uint16_t)(((orc_uint16)(var54.x4[0]+128)) + (((orc_uint16)(var54.x4[0]+128))>>8)))>>8; + var55.x4[1] = ((uint16_t)(((orc_uint16)(var54.x4[1]+128)) + (((orc_uint16)(var54.x4[1]+128))>>8)))>>8; + var55.x4[2] = ((uint16_t)(((orc_uint16)(var54.x4[2]+128)) + (((orc_uint16)(var54.x4[2]+128))>>8)))>>8; + var55.x4[3] = ((uint16_t)(((orc_uint16)(var54.x4[3]+128)) + (((orc_uint16)(var54.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var56.x4[0] = var55.x4[0]; + var56.x4[1] = var55.x4[1]; + var56.x4[2] = var55.x4[2]; + var56.x4[3] = var55.x4[3]; + /* 16: addusb */ + var44.x4[0] = ORC_CLAMP_UB((orc_uint8)var50.x4[0] + (orc_uint8)var56.x4[0]); + var44.x4[1] = ORC_CLAMP_UB((orc_uint8)var50.x4[1] + (orc_uint8)var56.x4[1]); + var44.x4[2] = ORC_CLAMP_UB((orc_uint8)var50.x4[2] + (orc_uint8)var56.x4[2]); + var44.x4[3] = ORC_CLAMP_UB((orc_uint8)var50.x4[3] + (orc_uint8)var56.x4[3]); + /* 17: storel */ + ptr0[i] = var44; + } + +} + +void +orc_code_combine_atop_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_atop_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_atop_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 4, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_xor_u */ +#ifdef DISABLE_ORC +void +orc_code_combine_xor_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union32 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union64 var61; + orc_union64 var62; + orc_union32 var63; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + /* 10: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 18: loadpw */ + var45.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var47.x4[0] = (orc_uint8)var40.x4[0]; + var47.x4[1] = (orc_uint8)var40.x4[1]; + var47.x4[2] = (orc_uint8)var40.x4[2]; + var47.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var48.x4[0] = (orc_uint8)var41.x4[0]; + var48.x4[1] = (orc_uint8)var41.x4[1]; + var48.x4[2] = (orc_uint8)var41.x4[2]; + var48.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var49.i = ((((orc_uint64)var48.i)>>48) << 48) | ((((orc_uint64)var48.i)>>48)<<32) | ((((orc_uint64)var48.i)>>48) << 16) | ((((orc_uint64)var48.i)>>48)); + /* 5: mullw */ + var50.x4[0] = (var47.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var47.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var47.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var47.x4[3] * var49.x4[3]) & 0xffff; + /* 6: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var52.x4[0] = (orc_uint8)var42.x4[0]; + var52.x4[1] = (orc_uint8)var42.x4[1]; + var52.x4[2] = (orc_uint8)var42.x4[2]; + var52.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var53.i = ((((orc_uint64)var52.i)>>48) << 48) | ((((orc_uint64)var52.i)>>48)<<32) | ((((orc_uint64)var52.i)>>48) << 16) | ((((orc_uint64)var52.i)>>48)); + /* 11: xorw */ + var54.x4[0] = var53.x4[0] ^ var43.x4[0]; + var54.x4[1] = var53.x4[1] ^ var43.x4[1]; + var54.x4[2] = var53.x4[2] ^ var43.x4[2]; + var54.x4[3] = var53.x4[3] ^ var43.x4[3]; + /* 12: mullw */ + var55.x4[0] = (var51.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var51.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var51.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var51.x4[3] * var54.x4[3]) & 0xffff; + /* 13: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 15: loadl */ + var44 = ptr0[i]; + /* 16: convubw */ + var58.x4[0] = (orc_uint8)var44.x4[0]; + var58.x4[1] = (orc_uint8)var44.x4[1]; + var58.x4[2] = (orc_uint8)var44.x4[2]; + var58.x4[3] = (orc_uint8)var44.x4[3]; + /* 17: splatw3q */ + var59.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 19: xorw */ + var60.x4[0] = var59.x4[0] ^ var45.x4[0]; + var60.x4[1] = var59.x4[1] ^ var45.x4[1]; + var60.x4[2] = var59.x4[2] ^ var45.x4[2]; + var60.x4[3] = var59.x4[3] ^ var45.x4[3]; + /* 20: mullw */ + var61.x4[0] = (var58.x4[0] * var60.x4[0]) & 0xffff; + var61.x4[1] = (var58.x4[1] * var60.x4[1]) & 0xffff; + var61.x4[2] = (var58.x4[2] * var60.x4[2]) & 0xffff; + var61.x4[3] = (var58.x4[3] * var60.x4[3]) & 0xffff; + /* 21: div255w */ + var62.x4[0] = ((uint16_t)(((orc_uint16)(var61.x4[0]+128)) + (((orc_uint16)(var61.x4[0]+128))>>8)))>>8; + var62.x4[1] = ((uint16_t)(((orc_uint16)(var61.x4[1]+128)) + (((orc_uint16)(var61.x4[1]+128))>>8)))>>8; + var62.x4[2] = ((uint16_t)(((orc_uint16)(var61.x4[2]+128)) + (((orc_uint16)(var61.x4[2]+128))>>8)))>>8; + var62.x4[3] = ((uint16_t)(((orc_uint16)(var61.x4[3]+128)) + (((orc_uint16)(var61.x4[3]+128))>>8)))>>8; + /* 22: convwb */ + var63.x4[0] = var62.x4[0]; + var63.x4[1] = var62.x4[1]; + var63.x4[2] = var62.x4[2]; + var63.x4[3] = var62.x4[3]; + /* 23: addusb */ + var46.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var63.x4[0]); + var46.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var63.x4[1]); + var46.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var63.x4[2]); + var46.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var63.x4[3]); + /* 24: storel */ + ptr0[i] = var46; + } + +} + +#else +static void +_backup_orc_code_combine_xor_u (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union32 var42; + orc_union64 var43; + orc_union32 var44; + orc_union64 var45; + orc_union32 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + orc_union64 var58; + orc_union64 var59; + orc_union64 var60; + orc_union64 var61; + orc_union64 var62; + orc_union32 var63; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 10: loadpw */ + var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 18: loadpw */ + var45.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var45.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var47.x4[0] = (orc_uint8)var40.x4[0]; + var47.x4[1] = (orc_uint8)var40.x4[1]; + var47.x4[2] = (orc_uint8)var40.x4[2]; + var47.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var48.x4[0] = (orc_uint8)var41.x4[0]; + var48.x4[1] = (orc_uint8)var41.x4[1]; + var48.x4[2] = (orc_uint8)var41.x4[2]; + var48.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var49.i = ((((orc_uint64)var48.i)>>48) << 48) | ((((orc_uint64)var48.i)>>48)<<32) | ((((orc_uint64)var48.i)>>48) << 16) | ((((orc_uint64)var48.i)>>48)); + /* 5: mullw */ + var50.x4[0] = (var47.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var47.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var47.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var47.x4[3] * var49.x4[3]) & 0xffff; + /* 6: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 7: loadl */ + var42 = ptr0[i]; + /* 8: convubw */ + var52.x4[0] = (orc_uint8)var42.x4[0]; + var52.x4[1] = (orc_uint8)var42.x4[1]; + var52.x4[2] = (orc_uint8)var42.x4[2]; + var52.x4[3] = (orc_uint8)var42.x4[3]; + /* 9: splatw3q */ + var53.i = ((((orc_uint64)var52.i)>>48) << 48) | ((((orc_uint64)var52.i)>>48)<<32) | ((((orc_uint64)var52.i)>>48) << 16) | ((((orc_uint64)var52.i)>>48)); + /* 11: xorw */ + var54.x4[0] = var53.x4[0] ^ var43.x4[0]; + var54.x4[1] = var53.x4[1] ^ var43.x4[1]; + var54.x4[2] = var53.x4[2] ^ var43.x4[2]; + var54.x4[3] = var53.x4[3] ^ var43.x4[3]; + /* 12: mullw */ + var55.x4[0] = (var51.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var51.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var51.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var51.x4[3] * var54.x4[3]) & 0xffff; + /* 13: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 14: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 15: loadl */ + var44 = ptr0[i]; + /* 16: convubw */ + var58.x4[0] = (orc_uint8)var44.x4[0]; + var58.x4[1] = (orc_uint8)var44.x4[1]; + var58.x4[2] = (orc_uint8)var44.x4[2]; + var58.x4[3] = (orc_uint8)var44.x4[3]; + /* 17: splatw3q */ + var59.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48)); + /* 19: xorw */ + var60.x4[0] = var59.x4[0] ^ var45.x4[0]; + var60.x4[1] = var59.x4[1] ^ var45.x4[1]; + var60.x4[2] = var59.x4[2] ^ var45.x4[2]; + var60.x4[3] = var59.x4[3] ^ var45.x4[3]; + /* 20: mullw */ + var61.x4[0] = (var58.x4[0] * var60.x4[0]) & 0xffff; + var61.x4[1] = (var58.x4[1] * var60.x4[1]) & 0xffff; + var61.x4[2] = (var58.x4[2] * var60.x4[2]) & 0xffff; + var61.x4[3] = (var58.x4[3] * var60.x4[3]) & 0xffff; + /* 21: div255w */ + var62.x4[0] = ((uint16_t)(((orc_uint16)(var61.x4[0]+128)) + (((orc_uint16)(var61.x4[0]+128))>>8)))>>8; + var62.x4[1] = ((uint16_t)(((orc_uint16)(var61.x4[1]+128)) + (((orc_uint16)(var61.x4[1]+128))>>8)))>>8; + var62.x4[2] = ((uint16_t)(((orc_uint16)(var61.x4[2]+128)) + (((orc_uint16)(var61.x4[2]+128))>>8)))>>8; + var62.x4[3] = ((uint16_t)(((orc_uint16)(var61.x4[3]+128)) + (((orc_uint16)(var61.x4[3]+128))>>8)))>>8; + /* 22: convwb */ + var63.x4[0] = var62.x4[0]; + var63.x4[1] = var62.x4[1]; + var63.x4[2] = var62.x4[2]; + var63.x4[3] = var62.x4[3]; + /* 23: addusb */ + var46.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var63.x4[0]); + var46.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var63.x4[1]); + var46.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var63.x4[2]); + var46.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var63.x4[3]); + /* 24: storel */ + ptr0[i] = var46; + } + +} + +void +orc_code_combine_xor_u (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_xor_u"); + orc_program_set_backup_function (p, _backup_orc_code_combine_xor_u); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 4, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_xor_u_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_xor_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union64 var57; + orc_union32 var58; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 5: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 13: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 6: xorw */ + var49.x4[0] = var48.x4[0] ^ var42.x4[0]; + var49.x4[1] = var48.x4[1] ^ var42.x4[1]; + var49.x4[2] = var48.x4[2] ^ var42.x4[2]; + var49.x4[3] = var48.x4[3] ^ var42.x4[3]; + /* 7: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 8: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 10: loadl */ + var43 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var43.x4[0]; + var53.x4[1] = (orc_uint8)var43.x4[1]; + var53.x4[2] = (orc_uint8)var43.x4[2]; + var53.x4[3] = (orc_uint8)var43.x4[3]; + /* 12: splatw3q */ + var54.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 14: xorw */ + var55.x4[0] = var54.x4[0] ^ var44.x4[0]; + var55.x4[1] = var54.x4[1] ^ var44.x4[1]; + var55.x4[2] = var54.x4[2] ^ var44.x4[2]; + var55.x4[3] = var54.x4[3] ^ var44.x4[3]; + /* 15: mullw */ + var56.x4[0] = (var53.x4[0] * var55.x4[0]) & 0xffff; + var56.x4[1] = (var53.x4[1] * var55.x4[1]) & 0xffff; + var56.x4[2] = (var53.x4[2] * var55.x4[2]) & 0xffff; + var56.x4[3] = (var53.x4[3] * var55.x4[3]) & 0xffff; + /* 16: div255w */ + var57.x4[0] = ((uint16_t)(((orc_uint16)(var56.x4[0]+128)) + (((orc_uint16)(var56.x4[0]+128))>>8)))>>8; + var57.x4[1] = ((uint16_t)(((orc_uint16)(var56.x4[1]+128)) + (((orc_uint16)(var56.x4[1]+128))>>8)))>>8; + var57.x4[2] = ((uint16_t)(((orc_uint16)(var56.x4[2]+128)) + (((orc_uint16)(var56.x4[2]+128))>>8)))>>8; + var57.x4[3] = ((uint16_t)(((orc_uint16)(var56.x4[3]+128)) + (((orc_uint16)(var56.x4[3]+128))>>8)))>>8; + /* 17: convwb */ + var58.x4[0] = var57.x4[0]; + var58.x4[1] = var57.x4[1]; + var58.x4[2] = var57.x4[2]; + var58.x4[3] = var57.x4[3]; + /* 18: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var58.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var58.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var58.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var58.x4[3]); + /* 19: storel */ + ptr0[i] = var45; + } + +} + +#else +static void +_backup_orc_code_combine_xor_u_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union64 var57; + orc_union32 var58; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 5: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + /* 13: loadpw */ + var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var46.x4[0] = (orc_uint8)var40.x4[0]; + var46.x4[1] = (orc_uint8)var40.x4[1]; + var46.x4[2] = (orc_uint8)var40.x4[2]; + var46.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr0[i]; + /* 3: convubw */ + var47.x4[0] = (orc_uint8)var41.x4[0]; + var47.x4[1] = (orc_uint8)var41.x4[1]; + var47.x4[2] = (orc_uint8)var41.x4[2]; + var47.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48)); + /* 6: xorw */ + var49.x4[0] = var48.x4[0] ^ var42.x4[0]; + var49.x4[1] = var48.x4[1] ^ var42.x4[1]; + var49.x4[2] = var48.x4[2] ^ var42.x4[2]; + var49.x4[3] = var48.x4[3] ^ var42.x4[3]; + /* 7: mullw */ + var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff; + /* 8: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 9: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 10: loadl */ + var43 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var43.x4[0]; + var53.x4[1] = (orc_uint8)var43.x4[1]; + var53.x4[2] = (orc_uint8)var43.x4[2]; + var53.x4[3] = (orc_uint8)var43.x4[3]; + /* 12: splatw3q */ + var54.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48)); + /* 14: xorw */ + var55.x4[0] = var54.x4[0] ^ var44.x4[0]; + var55.x4[1] = var54.x4[1] ^ var44.x4[1]; + var55.x4[2] = var54.x4[2] ^ var44.x4[2]; + var55.x4[3] = var54.x4[3] ^ var44.x4[3]; + /* 15: mullw */ + var56.x4[0] = (var53.x4[0] * var55.x4[0]) & 0xffff; + var56.x4[1] = (var53.x4[1] * var55.x4[1]) & 0xffff; + var56.x4[2] = (var53.x4[2] * var55.x4[2]) & 0xffff; + var56.x4[3] = (var53.x4[3] * var55.x4[3]) & 0xffff; + /* 16: div255w */ + var57.x4[0] = ((uint16_t)(((orc_uint16)(var56.x4[0]+128)) + (((orc_uint16)(var56.x4[0]+128))>>8)))>>8; + var57.x4[1] = ((uint16_t)(((orc_uint16)(var56.x4[1]+128)) + (((orc_uint16)(var56.x4[1]+128))>>8)))>>8; + var57.x4[2] = ((uint16_t)(((orc_uint16)(var56.x4[2]+128)) + (((orc_uint16)(var56.x4[2]+128))>>8)))>>8; + var57.x4[3] = ((uint16_t)(((orc_uint16)(var56.x4[3]+128)) + (((orc_uint16)(var56.x4[3]+128))>>8)))>>8; + /* 17: convwb */ + var58.x4[0] = var57.x4[0]; + var58.x4[1] = var57.x4[1]; + var58.x4[2] = var57.x4[2]; + var58.x4[3] = var57.x4[3]; + /* 18: addusb */ + var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var58.x4[0]); + var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var58.x4[1]); + var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var58.x4[2]); + var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var58.x4[3]); + /* 19: storel */ + ptr0[i] = var45; + } + +} + +void +orc_code_combine_xor_u_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_xor_u_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_xor_u_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 4, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_add_ca */ +#ifdef DISABLE_ORC +void +orc_code_combine_add_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union32 var43; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: mullw */ + var41.x4[0] = (var39.x4[0] * var40.x4[0]) & 0xffff; + var41.x4[1] = (var39.x4[1] * var40.x4[1]) & 0xffff; + var41.x4[2] = (var39.x4[2] * var40.x4[2]) & 0xffff; + var41.x4[3] = (var39.x4[3] * var40.x4[3]) & 0xffff; + /* 5: div255w */ + var42.x4[0] = ((uint16_t)(((orc_uint16)(var41.x4[0]+128)) + (((orc_uint16)(var41.x4[0]+128))>>8)))>>8; + var42.x4[1] = ((uint16_t)(((orc_uint16)(var41.x4[1]+128)) + (((orc_uint16)(var41.x4[1]+128))>>8)))>>8; + var42.x4[2] = ((uint16_t)(((orc_uint16)(var41.x4[2]+128)) + (((orc_uint16)(var41.x4[2]+128))>>8)))>>8; + var42.x4[3] = ((uint16_t)(((orc_uint16)(var41.x4[3]+128)) + (((orc_uint16)(var41.x4[3]+128))>>8)))>>8; + /* 6: convwb */ + var43.x4[0] = var42.x4[0]; + var43.x4[1] = var42.x4[1]; + var43.x4[2] = var42.x4[2]; + var43.x4[3] = var42.x4[3]; + /* 7: loadl */ + var37 = ptr0[i]; + /* 8: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var43.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var43.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var43.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var43.x4[3]); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +#else +static void +_backup_orc_code_combine_add_ca (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var35; + orc_union32 var36; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union64 var40; + orc_union64 var41; + orc_union64 var42; + orc_union32 var43; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var35 = ptr4[i]; + /* 1: convubw */ + var39.x4[0] = (orc_uint8)var35.x4[0]; + var39.x4[1] = (orc_uint8)var35.x4[1]; + var39.x4[2] = (orc_uint8)var35.x4[2]; + var39.x4[3] = (orc_uint8)var35.x4[3]; + /* 2: loadl */ + var36 = ptr5[i]; + /* 3: convubw */ + var40.x4[0] = (orc_uint8)var36.x4[0]; + var40.x4[1] = (orc_uint8)var36.x4[1]; + var40.x4[2] = (orc_uint8)var36.x4[2]; + var40.x4[3] = (orc_uint8)var36.x4[3]; + /* 4: mullw */ + var41.x4[0] = (var39.x4[0] * var40.x4[0]) & 0xffff; + var41.x4[1] = (var39.x4[1] * var40.x4[1]) & 0xffff; + var41.x4[2] = (var39.x4[2] * var40.x4[2]) & 0xffff; + var41.x4[3] = (var39.x4[3] * var40.x4[3]) & 0xffff; + /* 5: div255w */ + var42.x4[0] = ((uint16_t)(((orc_uint16)(var41.x4[0]+128)) + (((orc_uint16)(var41.x4[0]+128))>>8)))>>8; + var42.x4[1] = ((uint16_t)(((orc_uint16)(var41.x4[1]+128)) + (((orc_uint16)(var41.x4[1]+128))>>8)))>>8; + var42.x4[2] = ((uint16_t)(((orc_uint16)(var41.x4[2]+128)) + (((orc_uint16)(var41.x4[2]+128))>>8)))>>8; + var42.x4[3] = ((uint16_t)(((orc_uint16)(var41.x4[3]+128)) + (((orc_uint16)(var41.x4[3]+128))>>8)))>>8; + /* 6: convwb */ + var43.x4[0] = var42.x4[0]; + var43.x4[1] = var42.x4[1]; + var43.x4[2] = var42.x4[2]; + var43.x4[3] = var42.x4[3]; + /* 7: loadl */ + var37 = ptr0[i]; + /* 8: addusb */ + var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var43.x4[0]); + var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var43.x4[1]); + var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var43.x4[2]); + var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var43.x4[3]); + /* 9: storel */ + ptr0[i] = var38; + } + +} + +void +orc_code_combine_add_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_add_ca"); + orc_program_set_backup_function (p, _backup_orc_code_combine_add_ca); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_add_ca_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_add_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +#else +static void +_backup_orc_code_combine_add_ca_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var32; + orc_union32 var33; + orc_union32 var34; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var32 = ptr0[i]; + /* 1: loadl */ + var33 = ptr4[i]; + /* 2: addusb */ + var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]); + var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]); + var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]); + var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]); + /* 3: storel */ + ptr0[i] = var34; + } + +} + +void +orc_code_combine_add_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_add_ca_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_add_ca_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_over_ca */ +#ifdef DISABLE_ORC +void +orc_code_combine_over_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_union32 *)s2; + + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_code_combine_over_ca (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_union32 * ORC_RESTRICT ptr5; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_union32 *)ex->arrays[5]; + + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr5[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +void +orc_code_combine_over_ca (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint32 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_over_ca"); + orc_program_set_backup_function (p, _backup_orc_code_combine_over_ca); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 4, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 8, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_code_combine_over_ca_n */ +#ifdef DISABLE_ORC +void +orc_code_combine_over_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union64 var41; + orc_union32 var42; + orc_union64 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 7: loadpw */ + var41.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var43.x4[0] = (orc_uint8)var40.x4[0]; + var43.x4[1] = (orc_uint8)var40.x4[1]; + var43.x4[2] = (orc_uint8)var40.x4[2]; + var43.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 3: convwb */ + var45.x4[0] = var43.x4[0]; + var45.x4[1] = var43.x4[1]; + var45.x4[2] = var43.x4[2]; + var45.x4[3] = var43.x4[3]; + /* 4: copyw */ + var46.x4[0] = var44.x4[0]; + var46.x4[1] = var44.x4[1]; + var46.x4[2] = var44.x4[2]; + var46.x4[3] = var44.x4[3]; + /* 5: loadl */ + var47 = ptr0[i]; + /* 6: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 8: xorw */ + var49.x4[0] = var46.x4[0] ^ var41.x4[0]; + var49.x4[1] = var46.x4[1] ^ var41.x4[1]; + var49.x4[2] = var46.x4[2] ^ var41.x4[2]; + var49.x4[3] = var46.x4[3] ^ var41.x4[3]; + /* 9: mullw */ + var50.x4[0] = (var48.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var48.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var48.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var48.x4[3] * var49.x4[3]) & 0xffff; + /* 10: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 11: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 12: addusb */ + var42.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var45.x4[0]); + var42.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var45.x4[1]); + var42.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var45.x4[2]); + var42.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var45.x4[3]); + /* 13: storel */ + ptr0[i] = var42; + } + +} + +#else +static void +_backup_orc_code_combine_over_ca_n (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union64 var41; + orc_union32 var42; + orc_union64 var43; + orc_union64 var44; + orc_union32 var45; + orc_union64 var46; + orc_union32 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 7: loadpw */ + var41.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var41.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var40 = ptr4[i]; + /* 1: convubw */ + var43.x4[0] = (orc_uint8)var40.x4[0]; + var43.x4[1] = (orc_uint8)var40.x4[1]; + var43.x4[2] = (orc_uint8)var40.x4[2]; + var43.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: splatw3q */ + var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48)); + /* 3: convwb */ + var45.x4[0] = var43.x4[0]; + var45.x4[1] = var43.x4[1]; + var45.x4[2] = var43.x4[2]; + var45.x4[3] = var43.x4[3]; + /* 4: copyw */ + var46.x4[0] = var44.x4[0]; + var46.x4[1] = var44.x4[1]; + var46.x4[2] = var44.x4[2]; + var46.x4[3] = var44.x4[3]; + /* 5: loadl */ + var47 = ptr0[i]; + /* 6: convubw */ + var48.x4[0] = (orc_uint8)var47.x4[0]; + var48.x4[1] = (orc_uint8)var47.x4[1]; + var48.x4[2] = (orc_uint8)var47.x4[2]; + var48.x4[3] = (orc_uint8)var47.x4[3]; + /* 8: xorw */ + var49.x4[0] = var46.x4[0] ^ var41.x4[0]; + var49.x4[1] = var46.x4[1] ^ var41.x4[1]; + var49.x4[2] = var46.x4[2] ^ var41.x4[2]; + var49.x4[3] = var46.x4[3] ^ var41.x4[3]; + /* 9: mullw */ + var50.x4[0] = (var48.x4[0] * var49.x4[0]) & 0xffff; + var50.x4[1] = (var48.x4[1] * var49.x4[1]) & 0xffff; + var50.x4[2] = (var48.x4[2] * var49.x4[2]) & 0xffff; + var50.x4[3] = (var48.x4[3] * var49.x4[3]) & 0xffff; + /* 10: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 11: convwb */ + var52.x4[0] = var51.x4[0]; + var52.x4[1] = var51.x4[1]; + var52.x4[2] = var51.x4[2]; + var52.x4[3] = var51.x4[3]; + /* 12: addusb */ + var42.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var45.x4[0]); + var42.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var45.x4[1]); + var42.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var45.x4[2]); + var42.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var45.x4[3]); + /* 13: storel */ + ptr0[i] = var42; + } + +} + +void +orc_code_combine_over_ca_n (orc_uint32 * d1, const orc_uint32 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_code_combine_over_ca_n"); + orc_program_set_backup_function (p, _backup_orc_code_combine_over_ca_n); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 8, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "copyw", 2, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_composite_over_8888_8_8888_line */ +#ifdef DISABLE_ORC +void +orc_composite_over_8888_8_8888_line (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint8 * s2, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var38; + orc_int8 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + orc_union32 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union32 var54; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + ptr5 = (orc_int8 *)s2; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var38 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 2: loadb */ + var39 = ptr5[i]; + /* 3: splatbl */ + var43.i = ((var39&0xff) << 24) | ((var39&0xff)<<16) | ((var39&0xff) << 8) | (var39&0xff); + /* 4: convubw */ + var44.x4[0] = (orc_uint8)var43.x4[0]; + var44.x4[1] = (orc_uint8)var43.x4[1]; + var44.x4[2] = (orc_uint8)var43.x4[2]; + var44.x4[3] = (orc_uint8)var43.x4[3]; + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 8: loadl */ + var48 = ptr0[i]; + /* 9: convubw */ + var49.x4[0] = (orc_uint8)var48.x4[0]; + var49.x4[1] = (orc_uint8)var48.x4[1]; + var49.x4[2] = (orc_uint8)var48.x4[2]; + var49.x4[3] = (orc_uint8)var48.x4[3]; + /* 11: xorw */ + var50.x4[0] = var46.x4[0] ^ var40.x4[0]; + var50.x4[1] = var46.x4[1] ^ var40.x4[1]; + var50.x4[2] = var46.x4[2] ^ var40.x4[2]; + var50.x4[3] = var46.x4[3] ^ var40.x4[3]; + /* 12: splatw3q */ + var51.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 13: mullw */ + var52.x4[0] = (var49.x4[0] * var51.x4[0]) & 0xffff; + var52.x4[1] = (var49.x4[1] * var51.x4[1]) & 0xffff; + var52.x4[2] = (var49.x4[2] * var51.x4[2]) & 0xffff; + var52.x4[3] = (var49.x4[3] * var51.x4[3]) & 0xffff; + /* 14: div255w */ + var53.x4[0] = ((uint16_t)(((orc_uint16)(var52.x4[0]+128)) + (((orc_uint16)(var52.x4[0]+128))>>8)))>>8; + var53.x4[1] = ((uint16_t)(((orc_uint16)(var52.x4[1]+128)) + (((orc_uint16)(var52.x4[1]+128))>>8)))>>8; + var53.x4[2] = ((uint16_t)(((orc_uint16)(var52.x4[2]+128)) + (((orc_uint16)(var52.x4[2]+128))>>8)))>>8; + var53.x4[3] = ((uint16_t)(((orc_uint16)(var52.x4[3]+128)) + (((orc_uint16)(var52.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var54.x4[0] = var53.x4[0]; + var54.x4[1] = var53.x4[1]; + var54.x4[2] = var53.x4[2]; + var54.x4[3] = var53.x4[3]; + /* 16: addusb */ + var41.x4[0] = ORC_CLAMP_UB((orc_uint8)var54.x4[0] + (orc_uint8)var47.x4[0]); + var41.x4[1] = ORC_CLAMP_UB((orc_uint8)var54.x4[1] + (orc_uint8)var47.x4[1]); + var41.x4[2] = ORC_CLAMP_UB((orc_uint8)var54.x4[2] + (orc_uint8)var47.x4[2]); + var41.x4[3] = ORC_CLAMP_UB((orc_uint8)var54.x4[3] + (orc_uint8)var47.x4[3]); + /* 17: storel */ + ptr0[i] = var41; + } + +} + +#else +static void +_backup_orc_composite_over_8888_8_8888_line (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + const orc_int8 * ORC_RESTRICT ptr5; + orc_union32 var38; + orc_int8 var39; + orc_union64 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union32 var47; + orc_union32 var48; + orc_union64 var49; + orc_union64 var50; + orc_union64 var51; + orc_union64 var52; + orc_union64 var53; + orc_union32 var54; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + ptr5 = (orc_int8 *)ex->arrays[5]; + + /* 10: loadpw */ + var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 0: loadl */ + var38 = ptr4[i]; + /* 1: convubw */ + var42.x4[0] = (orc_uint8)var38.x4[0]; + var42.x4[1] = (orc_uint8)var38.x4[1]; + var42.x4[2] = (orc_uint8)var38.x4[2]; + var42.x4[3] = (orc_uint8)var38.x4[3]; + /* 2: loadb */ + var39 = ptr5[i]; + /* 3: splatbl */ + var43.i = ((var39&0xff) << 24) | ((var39&0xff)<<16) | ((var39&0xff) << 8) | (var39&0xff); + /* 4: convubw */ + var44.x4[0] = (orc_uint8)var43.x4[0]; + var44.x4[1] = (orc_uint8)var43.x4[1]; + var44.x4[2] = (orc_uint8)var43.x4[2]; + var44.x4[3] = (orc_uint8)var43.x4[3]; + /* 5: mullw */ + var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff; + var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff; + var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff; + var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff; + /* 6: div255w */ + var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8; + var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8; + var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8; + var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var47.x4[0] = var46.x4[0]; + var47.x4[1] = var46.x4[1]; + var47.x4[2] = var46.x4[2]; + var47.x4[3] = var46.x4[3]; + /* 8: loadl */ + var48 = ptr0[i]; + /* 9: convubw */ + var49.x4[0] = (orc_uint8)var48.x4[0]; + var49.x4[1] = (orc_uint8)var48.x4[1]; + var49.x4[2] = (orc_uint8)var48.x4[2]; + var49.x4[3] = (orc_uint8)var48.x4[3]; + /* 11: xorw */ + var50.x4[0] = var46.x4[0] ^ var40.x4[0]; + var50.x4[1] = var46.x4[1] ^ var40.x4[1]; + var50.x4[2] = var46.x4[2] ^ var40.x4[2]; + var50.x4[3] = var46.x4[3] ^ var40.x4[3]; + /* 12: splatw3q */ + var51.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48)); + /* 13: mullw */ + var52.x4[0] = (var49.x4[0] * var51.x4[0]) & 0xffff; + var52.x4[1] = (var49.x4[1] * var51.x4[1]) & 0xffff; + var52.x4[2] = (var49.x4[2] * var51.x4[2]) & 0xffff; + var52.x4[3] = (var49.x4[3] * var51.x4[3]) & 0xffff; + /* 14: div255w */ + var53.x4[0] = ((uint16_t)(((orc_uint16)(var52.x4[0]+128)) + (((orc_uint16)(var52.x4[0]+128))>>8)))>>8; + var53.x4[1] = ((uint16_t)(((orc_uint16)(var52.x4[1]+128)) + (((orc_uint16)(var52.x4[1]+128))>>8)))>>8; + var53.x4[2] = ((uint16_t)(((orc_uint16)(var52.x4[2]+128)) + (((orc_uint16)(var52.x4[2]+128))>>8)))>>8; + var53.x4[3] = ((uint16_t)(((orc_uint16)(var52.x4[3]+128)) + (((orc_uint16)(var52.x4[3]+128))>>8)))>>8; + /* 15: convwb */ + var54.x4[0] = var53.x4[0]; + var54.x4[1] = var53.x4[1]; + var54.x4[2] = var53.x4[2]; + var54.x4[3] = var53.x4[3]; + /* 16: addusb */ + var41.x4[0] = ORC_CLAMP_UB((orc_uint8)var54.x4[0] + (orc_uint8)var47.x4[0]); + var41.x4[1] = ORC_CLAMP_UB((orc_uint8)var54.x4[1] + (orc_uint8)var47.x4[1]); + var41.x4[2] = ORC_CLAMP_UB((orc_uint8)var54.x4[2] + (orc_uint8)var47.x4[2]); + var41.x4[3] = ORC_CLAMP_UB((orc_uint8)var54.x4[3] + (orc_uint8)var47.x4[3]); + /* 17: storel */ + ptr0[i] = var41; + } + +} + +void +orc_composite_over_8888_8_8888_line (orc_uint32 * d1, const orc_uint32 * s1, const orc_uint8 * s2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_composite_over_8888_8_8888_line"); + orc_program_set_backup_function (p, _backup_orc_composite_over_8888_8_8888_line); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_source (p, 1, "s2"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 4, "t4"); + orc_program_add_temporary (p, 4, "t5"); + orc_program_add_temporary (p, 8, "t6"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T6, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->arrays[ORC_VAR_S2] = (void *)s2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* orc_composite_over_n_8888_8888_ca_2d */ +#ifdef DISABLE_ORC +void +orc_composite_over_n_8888_8888_ca_2d (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union32 *)s1; + + /* 0: loadpb */ + var40.x4[0] = p1; + var40.x4[1] = p1; + var40.x4[2] = p1; + var40.x4[3] = p1; + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr4[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +#else +static void +_backup_orc_composite_over_n_8888_8888_ca_2d (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union32 * ORC_RESTRICT ptr4; + orc_union32 var40; + orc_union32 var41; + orc_union64 var42; + orc_union32 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union32 var49; + orc_union64 var50; + orc_union64 var51; + orc_union32 var52; + orc_union64 var53; + orc_union64 var54; + orc_union64 var55; + orc_union64 var56; + orc_union32 var57; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union32 *)ex->arrays[4]; + + /* 0: loadpb */ + var40.x4[0] = ex->params[24]; + var40.x4[1] = ex->params[24]; + var40.x4[2] = ex->params[24]; + var40.x4[3] = ex->params[24]; + /* 12: loadpw */ + var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */ + var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */ + + for (i = 0; i < n; i++) { + /* 1: convubw */ + var44.x4[0] = (orc_uint8)var40.x4[0]; + var44.x4[1] = (orc_uint8)var40.x4[1]; + var44.x4[2] = (orc_uint8)var40.x4[2]; + var44.x4[3] = (orc_uint8)var40.x4[3]; + /* 2: loadl */ + var41 = ptr4[i]; + /* 3: convubw */ + var45.x4[0] = (orc_uint8)var41.x4[0]; + var45.x4[1] = (orc_uint8)var41.x4[1]; + var45.x4[2] = (orc_uint8)var41.x4[2]; + var45.x4[3] = (orc_uint8)var41.x4[3]; + /* 4: splatw3q */ + var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48)); + /* 5: mullw */ + var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff; + var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff; + var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff; + var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff; + /* 6: div255w */ + var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8; + var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8; + var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8; + var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8; + /* 7: convwb */ + var49.x4[0] = var48.x4[0]; + var49.x4[1] = var48.x4[1]; + var49.x4[2] = var48.x4[2]; + var49.x4[3] = var48.x4[3]; + /* 8: mullw */ + var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff; + var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff; + var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff; + var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff; + /* 9: div255w */ + var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8; + var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8; + var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8; + var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8; + /* 10: loadl */ + var52 = ptr0[i]; + /* 11: convubw */ + var53.x4[0] = (orc_uint8)var52.x4[0]; + var53.x4[1] = (orc_uint8)var52.x4[1]; + var53.x4[2] = (orc_uint8)var52.x4[2]; + var53.x4[3] = (orc_uint8)var52.x4[3]; + /* 13: xorw */ + var54.x4[0] = var51.x4[0] ^ var42.x4[0]; + var54.x4[1] = var51.x4[1] ^ var42.x4[1]; + var54.x4[2] = var51.x4[2] ^ var42.x4[2]; + var54.x4[3] = var51.x4[3] ^ var42.x4[3]; + /* 14: mullw */ + var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff; + var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff; + var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff; + var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff; + /* 15: div255w */ + var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8; + var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8; + var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8; + var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8; + /* 16: convwb */ + var57.x4[0] = var56.x4[0]; + var57.x4[1] = var56.x4[1]; + var57.x4[2] = var56.x4[2]; + var57.x4[3] = var56.x4[3]; + /* 17: addusb */ + var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]); + var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]); + var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]); + var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]); + /* 18: storel */ + ptr0[i] = var43; + } + +} + +void +orc_composite_over_n_8888_8888_ca_2d (orc_uint32 * d1, const orc_uint32 * s1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "orc_composite_over_n_8888_8888_ca_2d"); + orc_program_set_backup_function (p, _backup_orc_composite_over_n_8888_8888_ca_2d); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 4, "s1"); + orc_program_add_constant (p, 4, 0x000000ff, "c1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 4, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + orc_program_add_temporary (p, 8, "t6"); + orc_program_add_temporary (p, 8, "t7"); + orc_program_add_temporary (p, 4, "t8"); + + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* cogorc_resample_horiz_1tap */ +#ifdef DISABLE_ORC +void +cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: ldresnearb */ + var32 = ptr4[(p1 + i*p2)>>16]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +#else +static void +_backup_cogorc_resample_horiz_1tap (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: ldresnearb */ + var32 = ptr4[(ex->params[24] + i*ex->params[25])>>16]; + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "cogorc_resample_horiz_1tap"); + orc_program_set_backup_function (p, _backup_cogorc_resample_horiz_1tap); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + + orc_program_append_2 (p, "ldresnearb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_P2); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* cogorc_resample_horiz_2tap */ +#ifdef DISABLE_ORC +void +cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n){ + int i; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)d1; + ptr4 = (orc_int8 *)s1; + + + for (i = 0; i < n; i++) { + /* 0: ldreslinb */ + { + int tmp = p1 + i * p2; + var32 = ((orc_uint8)ptr4[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr4[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8; + } + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +#else +static void +_backup_cogorc_resample_horiz_2tap (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_int8 * ORC_RESTRICT ptr0; + const orc_int8 * ORC_RESTRICT ptr4; + orc_int8 var32; + + ptr0 = (orc_int8 *)ex->arrays[0]; + ptr4 = (orc_int8 *)ex->arrays[4]; + + + for (i = 0; i < n; i++) { + /* 0: ldreslinb */ + { + int tmp = ex->params[24] + i * ex->params[25]; + var32 = ((orc_uint8)ptr4[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr4[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8; + } + /* 1: storeb */ + ptr0[i] = var32; + } + +} + +void +cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "cogorc_resample_horiz_2tap"); + orc_program_set_backup_function (p, _backup_cogorc_resample_horiz_2tap); + orc_program_add_destination (p, 1, "d1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_parameter (p, 4, "p1"); + orc_program_add_parameter (p, 4, "p2"); + + orc_program_append_2 (p, "ldreslinb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_P2); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + ex->params[ORC_VAR_P1] = p1; + ex->params[ORC_VAR_P2] = p2; + + func = p->code_exec; + func (ex); +} +#endif + + +/* test_float_constant_1 */ +#ifdef DISABLE_ORC +void +test_float_constant_1 (orc_uint32 * d1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)d1; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_test_float_constant_1 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +test_float_constant_1 (orc_uint32 * d1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "test_float_constant_1"); + orc_program_set_backup_function (p, _backup_test_float_constant_1); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_constant (p, 4, 0x40000000, "c1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* test_float_constant_2 */ +#ifdef DISABLE_ORC +void +test_float_constant_2 (orc_uint32 * d1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)d1; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_test_float_constant_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var32; + orc_union32 var33; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpl */ + var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */ + + for (i = 0; i < n; i++) { + /* 1: copyl */ + var33.i = var32.i; + /* 2: storel */ + ptr0[i] = var33; + } + +} + +void +test_float_constant_2 (orc_uint32 * d1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "test_float_constant_2"); + orc_program_set_backup_function (p, _backup_test_float_constant_2); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_constant (p, 4, 0x40000000, "c1"); + + orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* convert_fc32_to_int32 */ +#ifdef DISABLE_ORC +void +convert_fc32_to_int32 (orc_uint32 * d1, const orc_uint64 * s1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var34; + orc_union64 var35; + orc_union32 var36; + orc_union64 var37; + orc_union64 var38; + + ptr0 = (orc_union32 *)d1; + ptr4 = (orc_union64 *)s1; + + /* 1: loadpl */ + var35.x2[0] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + var35.x2[1] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var34 = ptr4[i]; + /* 2: mulf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[0]); + _src2.i = ORC_DENORMAL(var35.x2[0]); + _dest1.f = _src1.f * _src2.f; + var37.x2[0] = ORC_DENORMAL(_dest1.i); + } + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[1]); + _src2.i = ORC_DENORMAL(var35.x2[1]); + _dest1.f = _src1.f * _src2.f; + var37.x2[1] = ORC_DENORMAL(_dest1.i); + } + /* 3: convfl */ + { + int tmp; + tmp = (int)var37.x2f[0]; + if (tmp == 0x80000000 && !(var37.x2[0]&0x80000000)) tmp = 0x7fffffff; + var38.x2[0] = tmp; + } + { + int tmp; + tmp = (int)var37.x2f[1]; + if (tmp == 0x80000000 && !(var37.x2[1]&0x80000000)) tmp = 0x7fffffff; + var38.x2[1] = tmp; + } + /* 4: convlw */ + var36.x2[0] = var38.x2[0]; + var36.x2[1] = var38.x2[1]; + /* 5: storel */ + ptr0[i] = var36; + } + +} + +#else +static void +_backup_convert_fc32_to_int32 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + const orc_union64 * ORC_RESTRICT ptr4; + orc_union64 var34; + orc_union64 var35; + orc_union32 var36; + orc_union64 var37; + orc_union64 var38; + + ptr0 = (orc_union32 *)ex->arrays[0]; + ptr4 = (orc_union64 *)ex->arrays[4]; + + /* 1: loadpl */ + var35.x2[0] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + var35.x2[1] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */ + + for (i = 0; i < n; i++) { + /* 0: loadq */ + var34 = ptr4[i]; + /* 2: mulf */ + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[0]); + _src2.i = ORC_DENORMAL(var35.x2[0]); + _dest1.f = _src1.f * _src2.f; + var37.x2[0] = ORC_DENORMAL(_dest1.i); + } + { + orc_union32 _src1; + orc_union32 _src2; + orc_union32 _dest1; + _src1.i = ORC_DENORMAL(var34.x2[1]); + _src2.i = ORC_DENORMAL(var35.x2[1]); + _dest1.f = _src1.f * _src2.f; + var37.x2[1] = ORC_DENORMAL(_dest1.i); + } + /* 3: convfl */ + { + int tmp; + tmp = (int)var37.x2f[0]; + if (tmp == 0x80000000 && !(var37.x2[0]&0x80000000)) tmp = 0x7fffffff; + var38.x2[0] = tmp; + } + { + int tmp; + tmp = (int)var37.x2f[1]; + if (tmp == 0x80000000 && !(var37.x2[1]&0x80000000)) tmp = 0x7fffffff; + var38.x2[1] = tmp; + } + /* 4: convlw */ + var36.x2[0] = var38.x2[0]; + var36.x2[1] = var38.x2[1]; + /* 5: storel */ + ptr0[i] = var36; + } + +} + +void +convert_fc32_to_int32 (orc_uint32 * d1, const orc_uint64 * s1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "convert_fc32_to_int32"); + orc_program_set_backup_function (p, _backup_convert_fc32_to_int32); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_source (p, 8, "s1"); + orc_program_add_constant (p, 4, 0x46fffe00, "c1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + + orc_program_append_2 (p, "mulf", 1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1); + orc_program_append_2 (p, "convfl", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convlw", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->arrays[ORC_VAR_S1] = (void *)s1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* param64 */ +#ifdef DISABLE_ORC +void +param64 (orc_uint64 * d1, int p1, int n){ + int i; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)d1; + + /* 0: loadpq */ + var32.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_param64 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var32.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +param64 (orc_uint64 * d1, int p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "param64"); + orc_program_set_backup_function (p, _backup_param64); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_parameter (p, 8, "p1"); + + orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + ex->params[ORC_VAR_P1] = p1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* const64 */ +#ifdef DISABLE_ORC +void +const64 (orc_uint64 * d1, int n){ + int i; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)d1; + + /* 0: loadpq */ + var32.i = ORC_UINT64_C(0x0123456789abcdef); /* 3.5127e-303f */ + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_const64 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var32; + orc_union64 var33; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var32.i = ORC_UINT64_C(0x0123456789abcdef); /* 3.5127e-303f */ + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var32.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +const64 (orc_uint64 * d1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "const64"); + orc_program_set_backup_function (p, _backup_const64); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_constant_int64 (p, 8, 0x0123456789abcdefULL, "c1"); + + orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + + func = p->code_exec; + func (ex); +} +#endif + + +/* param64_2 */ +#ifdef DISABLE_ORC +void +param64_2 (orc_uint64 * d1, orc_int64 p1, int n){ + int i; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)d1; + + /* 0: loadpq */ + var34.i = p1; + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var34.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +#else +static void +_backup_param64_2 (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union64 * ORC_RESTRICT ptr0; + orc_union64 var33; + orc_union64 var34; + + ptr0 = (orc_union64 *)ex->arrays[0]; + + /* 0: loadpq */ + var34.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + + for (i = 0; i < n; i++) { + /* 1: copyq */ + var33.i = var34.i; + /* 2: storeq */ + ptr0[i] = var33; + } + +} + +void +param64_2 (orc_uint64 * d1, orc_int64 p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "param64_2"); + orc_program_set_backup_function (p, _backup_param64_2); + orc_program_add_destination (p, 8, "d1"); + orc_program_add_parameter_int64 (p, 8, "p1"); + orc_program_add_temporary (p, 8, "t1"); + + orc_program_append_2 (p, "loadpq", 0, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + { + orc_union64 tmp; + tmp.i = p1; + ex->params[ORC_VAR_P1] = tmp.x2[0]; + ex->params[ORC_VAR_T1] = tmp.x2[1]; + } + + func = p->code_exec; + func (ex); +} +#endif + + +/* pa_volume_s16ne_orc_2ch */ +#ifdef DISABLE_ORC +void +pa_volume_s16ne_orc_2ch (int16_t * d1, orc_int64 p1, int n){ + int i; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + + ptr0 = (orc_union32 *)d1; + + /* 0: loadpq */ + var41.i = p1; + /* 5: loadpw */ + var39.x4[0] = 0x00000000; /* 0 or 0f */ + var39.x4[1] = 0x00000000; /* 0 or 0f */ + var39.x4[2] = 0x00000000; /* 0 or 0f */ + var39.x4[3] = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 1: loadl */ + var37 = ptr0[i]; + /* 2: convuwl */ + var42.x2[0] = (orc_uint16)var37.x2[0]; + var42.x2[1] = (orc_uint16)var37.x2[1]; + /* 3: loadl */ + var38 = ptr0[i]; + /* 4: convswl */ + var43.x2[0] = var38.x2[0]; + var43.x2[1] = var38.x2[1]; + /* 6: cmpgtsw */ + var44.x4[0] = (var39.x4[0] > var42.x4[0]) ? (~0) : 0; + var44.x4[1] = (var39.x4[1] > var42.x4[1]) ? (~0) : 0; + var44.x4[2] = (var39.x4[2] > var42.x4[2]) ? (~0) : 0; + var44.x4[3] = (var39.x4[3] > var42.x4[3]) ? (~0) : 0; + /* 7: andw */ + var45.x4[0] = var44.x4[0] & var41.x4[0]; + var45.x4[1] = var44.x4[1] & var41.x4[1]; + var45.x4[2] = var44.x4[2] & var41.x4[2]; + var45.x4[3] = var44.x4[3] & var41.x4[3]; + /* 8: mulhuw */ + var46.x4[0] = ((orc_uint32)((orc_uint16)var42.x4[0]) * (orc_uint32)((orc_uint16)var41.x4[0])) >> 16; + var46.x4[1] = ((orc_uint32)((orc_uint16)var42.x4[1]) * (orc_uint32)((orc_uint16)var41.x4[1])) >> 16; + var46.x4[2] = ((orc_uint32)((orc_uint16)var42.x4[2]) * (orc_uint32)((orc_uint16)var41.x4[2])) >> 16; + var46.x4[3] = ((orc_uint32)((orc_uint16)var42.x4[3]) * (orc_uint32)((orc_uint16)var41.x4[3])) >> 16; + /* 9: subl */ + var47.x2[0] = var46.x2[0] - var45.x2[0]; + var47.x2[1] = var46.x2[1] - var45.x2[1]; + /* 10: shrul */ + var48.x2[0] = ((orc_uint32)var41.x2[0]) >> 16; + var48.x2[1] = ((orc_uint32)var41.x2[1]) >> 16; + /* 11: mulll */ + var49.x2[0] = (var43.x2[0] * var48.x2[0]) & 0xffffffff; + var49.x2[1] = (var43.x2[1] * var48.x2[1]) & 0xffffffff; + /* 12: addl */ + var50.x2[0] = var47.x2[0] + var49.x2[0]; + var50.x2[1] = var47.x2[1] + var49.x2[1]; + /* 13: convssslw */ + var40.x2[0] = ORC_CLAMP_SW(var50.x2[0]); + var40.x2[1] = ORC_CLAMP_SW(var50.x2[1]); + /* 14: storel */ + ptr0[i] = var40; + } + +} + +#else +static void +_backup_pa_volume_s16ne_orc_2ch (OrcExecutor * ORC_RESTRICT ex) +{ + int i; + int n = ex->n; + orc_union32 * ORC_RESTRICT ptr0; + orc_union32 var37; + orc_union32 var38; + orc_union64 var39; + orc_union32 var40; + orc_union64 var41; + orc_union64 var42; + orc_union64 var43; + orc_union64 var44; + orc_union64 var45; + orc_union64 var46; + orc_union64 var47; + orc_union64 var48; + orc_union64 var49; + orc_union64 var50; + + ptr0 = (orc_union32 *)ex->arrays[0]; + + /* 0: loadpq */ + var41.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32); + /* 5: loadpw */ + var39.x4[0] = 0x00000000; /* 0 or 0f */ + var39.x4[1] = 0x00000000; /* 0 or 0f */ + var39.x4[2] = 0x00000000; /* 0 or 0f */ + var39.x4[3] = 0x00000000; /* 0 or 0f */ + + for (i = 0; i < n; i++) { + /* 1: loadl */ + var37 = ptr0[i]; + /* 2: convuwl */ + var42.x2[0] = (orc_uint16)var37.x2[0]; + var42.x2[1] = (orc_uint16)var37.x2[1]; + /* 3: loadl */ + var38 = ptr0[i]; + /* 4: convswl */ + var43.x2[0] = var38.x2[0]; + var43.x2[1] = var38.x2[1]; + /* 6: cmpgtsw */ + var44.x4[0] = (var39.x4[0] > var42.x4[0]) ? (~0) : 0; + var44.x4[1] = (var39.x4[1] > var42.x4[1]) ? (~0) : 0; + var44.x4[2] = (var39.x4[2] > var42.x4[2]) ? (~0) : 0; + var44.x4[3] = (var39.x4[3] > var42.x4[3]) ? (~0) : 0; + /* 7: andw */ + var45.x4[0] = var44.x4[0] & var41.x4[0]; + var45.x4[1] = var44.x4[1] & var41.x4[1]; + var45.x4[2] = var44.x4[2] & var41.x4[2]; + var45.x4[3] = var44.x4[3] & var41.x4[3]; + /* 8: mulhuw */ + var46.x4[0] = ((orc_uint32)((orc_uint16)var42.x4[0]) * (orc_uint32)((orc_uint16)var41.x4[0])) >> 16; + var46.x4[1] = ((orc_uint32)((orc_uint16)var42.x4[1]) * (orc_uint32)((orc_uint16)var41.x4[1])) >> 16; + var46.x4[2] = ((orc_uint32)((orc_uint16)var42.x4[2]) * (orc_uint32)((orc_uint16)var41.x4[2])) >> 16; + var46.x4[3] = ((orc_uint32)((orc_uint16)var42.x4[3]) * (orc_uint32)((orc_uint16)var41.x4[3])) >> 16; + /* 9: subl */ + var47.x2[0] = var46.x2[0] - var45.x2[0]; + var47.x2[1] = var46.x2[1] - var45.x2[1]; + /* 10: shrul */ + var48.x2[0] = ((orc_uint32)var41.x2[0]) >> 16; + var48.x2[1] = ((orc_uint32)var41.x2[1]) >> 16; + /* 11: mulll */ + var49.x2[0] = (var43.x2[0] * var48.x2[0]) & 0xffffffff; + var49.x2[1] = (var43.x2[1] * var48.x2[1]) & 0xffffffff; + /* 12: addl */ + var50.x2[0] = var47.x2[0] + var49.x2[0]; + var50.x2[1] = var47.x2[1] + var49.x2[1]; + /* 13: convssslw */ + var40.x2[0] = ORC_CLAMP_SW(var50.x2[0]); + var40.x2[1] = ORC_CLAMP_SW(var50.x2[1]); + /* 14: storel */ + ptr0[i] = var40; + } + +} + +void +pa_volume_s16ne_orc_2ch (int16_t * d1, orc_int64 p1, int n) +{ + OrcExecutor _ex, *ex = &_ex; + static int p_inited = 0; + static OrcProgram *p = 0; + void (*func) (OrcExecutor *); + + if (!p_inited) { + orc_once_mutex_lock (); + if (!p_inited) { + OrcCompileResult result; + + p = orc_program_new (); + orc_program_set_name (p, "pa_volume_s16ne_orc_2ch"); + orc_program_set_backup_function (p, _backup_pa_volume_s16ne_orc_2ch); + orc_program_add_destination (p, 4, "d1"); + orc_program_add_constant (p, 4, 0x00000000, "c1"); + orc_program_add_constant (p, 4, 0x00000010, "c2"); + orc_program_add_parameter_int64 (p, 8, "p1"); + orc_program_add_temporary (p, 8, "t1"); + orc_program_add_temporary (p, 8, "t2"); + orc_program_add_temporary (p, 8, "t3"); + orc_program_add_temporary (p, 8, "t4"); + orc_program_add_temporary (p, 8, "t5"); + + orc_program_append_2 (p, "loadpq", 0, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "convswl", 1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1); + orc_program_append_2 (p, "cmpgtsw", 2, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_T2, ORC_VAR_D1); + orc_program_append_2 (p, "andw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "mulhuw", 2, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "subl", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1); + orc_program_append_2 (p, "shrul", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1); + orc_program_append_2 (p, "mulll", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1); + orc_program_append_2 (p, "addl", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1); + orc_program_append_2 (p, "convssslw", 1, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1); + + result = orc_program_compile (p); + } + p_inited = TRUE; + orc_once_mutex_unlock (); + } + ex->program = p; + + ex->n = n; + ex->arrays[ORC_VAR_D1] = d1; + { + orc_union64 tmp; + tmp.i = p1; + ex->params[ORC_VAR_P1] = tmp.x2[0]; + ex->params[ORC_VAR_T1] = tmp.x2[1]; + } + + func = p->code_exec; + func (ex); +} +#endif + + diff --git a/testsuite/perf_opcodes_sys.c b/testsuite/perf_opcodes_sys.c new file mode 100644 index 0000000..d077289 --- /dev/null +++ b/testsuite/perf_opcodes_sys.c @@ -0,0 +1,46 @@ + +#include "config.h" + +#include + +#include +#include + + +int error = FALSE; + +void test_opcode_src (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_test_init(); + orc_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + printf("opcode_%-20s ", opcode_set->opcodes[i].name); + test_opcode_src (opcode_set->opcodes + i); + } + + if (error) return 1; + return 0; +} + +void +test_opcode_src (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + int flags = 0; + + p = orc_test_get_program_for_opcode (opcode); + + printf("%g\n", orc_test_performance_full (p, flags, NULL)); + + orc_program_free (p); +} + diff --git a/testsuite/perf_opcodes_sys_compare.c b/testsuite/perf_opcodes_sys_compare.c new file mode 100644 index 0000000..1fdf76f --- /dev/null +++ b/testsuite/perf_opcodes_sys_compare.c @@ -0,0 +1,81 @@ + +#include "config.h" + +#include + +#include +#include + + +int error = FALSE; + +void test_opcode_src (OrcStaticOpcode *opcode); + +int +main (int argc, char *argv[]) +{ + int i; + OrcOpcodeSet *opcode_set; + + orc_test_init(); + orc_init(); + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + //printf("opcode_%-20s ", opcode_set->opcodes[i].name); + test_opcode_src (opcode_set->opcodes + i); + } + + if (error) return 1; + return 0; +} + +void +test_opcode_src (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int flags = 0; + double perf_mmx, perf_sse; + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + orc_program_add_constant (p, opcode->src_size[1], 1, "s2"); + } else { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s ", opcode->name); + orc_program_set_name (p, s); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + perf_mmx = orc_test_performance_full (p, flags, "mmx"); + perf_sse = orc_test_performance_full (p, flags, "sse"); + + printf("%g %g\n", perf_mmx, perf_sse); + + orc_program_free (p); +} + diff --git a/testsuite/perf_parse.c b/testsuite/perf_parse.c new file mode 100644 index 0000000..731c142 --- /dev/null +++ b/testsuite/perf_parse.c @@ -0,0 +1,91 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + if (filename == NULL) { + filename = getenv ("testfile"); + } + if (filename == NULL) { + filename = "test.orc"; + } + code = read_file (filename); + if (!code) { + printf("perf_parse \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;iname, + orc_test_performance_full (programs[i], 0, NULL)); + } + + if (error) return 1; + return 0; +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + diff --git a/testsuite/perf_parse_compare.c b/testsuite/perf_parse_compare.c new file mode 100644 index 0000000..c0d4d76 --- /dev/null +++ b/testsuite/perf_parse_compare.c @@ -0,0 +1,94 @@ + +#include +#include +#include + +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + if (argc >= 2) { + filename = argv[1]; + } + if (filename == NULL) { + filename = getenv ("testfile"); + } + if (filename == NULL) { + filename = "test.orc"; + } + code = read_file (filename); + if (!code) { + printf("perf_parse \n"); + exit(1); + } + + n = orc_parse (code, &programs); + + for(i=0;i +#include +#include +#include + +#include +#include +#include +#include + +#ifdef _MSC_VER +#define isnan(x) _isnan(x) +#endif + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); + +void show (OrcProgram *p); + +int error = FALSE; + +enum { + FORMAT_SIGNED, + FORMAT_UNSIGNED, + FORMAT_HEX, + FORMAT_FLOAT +}; + +int format = FORMAT_SIGNED; +int array_n = 10; + +int +main (int argc, char *argv[]) +{ + char *code; + int n = 0; + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + for(i=1;i|opcode)\n"); + exit(1); + } + } + + for(i=0;idata, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %4d", *(orc_int8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %5d", *(orc_int16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %10d", *(orc_int32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} + +int +print_array_val_unsigned (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %4u", *(orc_uint8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %5u", *(orc_uint16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %10u", *(orc_uint32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} + +int +print_array_val_hex (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 1: + printf(" %02x", *(orc_uint8 *)ptr); + return *(orc_int8 *)ptr; + case 2: + printf(" %04x", *(orc_uint16 *)ptr); + return *(orc_int16 *)ptr; + case 4: + printf(" %08x", *(orc_uint32 *)ptr); + return *(orc_int32 *)ptr; + case 8: + printf(" 0x%08x%08x", (orc_uint32)((*(orc_uint64 *)ptr)>>32), + (orc_uint32)((*(orc_uint64 *)ptr))); + return *(orc_int64 *)ptr; + default: + return -1; + } +} + +int +print_array_val_float (OrcArray *array, int i, int j) +{ + void *ptr = ORC_PTR_OFFSET (array->data, + i*array->element_size + j*array->stride); + + switch (array->element_size) { + case 4: + if (isnan(*(float *)ptr)) { + printf(" nan %08x", *(orc_uint32 *)ptr); + /* This is to get around signaling/non-signaling nans in the output */ + return (*(orc_uint32 *)ptr) & 0xffbfffff; + } else { + printf(" %12.5g", *(float *)ptr); + return *(orc_int32 *)ptr; + } + case 8: + printf(" %12.5g", *(double *)ptr); + return *(orc_int64 *)ptr; + default: + printf(" ERROR"); + return -1; + } +} + + +void +show (OrcProgram *program) +{ + OrcCompileResult result; + OrcTarget *target; + const char *target_name; + unsigned int target_flags; + int n, m; + OrcExecutor *ex; + OrcArray *dest[4] = { NULL, NULL, NULL, NULL }; + OrcArray *src[8] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + int i,j; + OrcRandomContext rand_context = { 0 }; + + + target_name = NULL; + target = orc_target_get_by_name (target_name); + + target_flags = orc_target_get_default_flags (target); + + result = orc_program_compile_full (program, target, target_flags); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + printf("%s: compile failed\n", program->name); + return; + } + + printf("%s:\n", program->name); + + if (program->constant_n > 0) { + n = program->constant_n; + } else { + n = array_n; + } + + ex = orc_executor_new (program); + orc_executor_set_n (ex, n); + if (program->is_2d) { + if (program->constant_m > 0) { + m = program->constant_m; + } else { + m = 2; + } + } else { + m = 1; + } + orc_executor_set_m (ex, m); + + for(i=0;ivars[i].name == NULL) continue; + + if (program->vars[i].vartype == ORC_VAR_TYPE_SRC) { + src[i-ORC_VAR_S1] = orc_array_new (n, m, program->vars[i].size, 0); + orc_array_set_random (src[i-ORC_VAR_S1], &rand_context); + } else if (program->vars[i].vartype == ORC_VAR_TYPE_DEST) { + dest[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size, 0); + orc_array_set_pattern (dest[i], ORC_OOB_VALUE); + } else if (program->vars[i].vartype == ORC_VAR_TYPE_PARAM) { + switch (program->vars[i].param_type) { + case ORC_PARAM_TYPE_INT: + orc_executor_set_param (ex, i, 2); + break; + case ORC_PARAM_TYPE_FLOAT: + orc_executor_set_param_float (ex, i, 2.0); + break; + case ORC_PARAM_TYPE_INT64: + orc_executor_set_param_int64 (ex, i, 2); + break; + case ORC_PARAM_TYPE_DOUBLE: + orc_executor_set_param_double (ex, i, 2.0); + break; + default: + ORC_ASSERT(0); + } + } + } + + orc_executor_set_n (ex, n); + orc_executor_set_m (ex, m); + for(j=0;jvars[j].vartype == ORC_VAR_TYPE_DEST) { + orc_executor_set_array (ex, j, dest[j-ORC_VAR_D1]->data); + orc_executor_set_stride (ex, j, dest[j-ORC_VAR_D1]->stride); + } + if (program->vars[j].vartype == ORC_VAR_TYPE_SRC) { + orc_executor_set_array (ex, j, src[j-ORC_VAR_S1]->data); + orc_executor_set_stride (ex, j, src[j-ORC_VAR_S1]->stride); + } + } + + orc_executor_run (ex); + + { + int i,j; + + for(j=0;jvars[l].size > 0) { + switch (format) { + case FORMAT_FLOAT: + print_array_val_float (src[l-ORC_VAR_S1], i, j); + break; + case FORMAT_HEX: + print_array_val_hex (src[l-ORC_VAR_S1], i, j); + break; + case FORMAT_SIGNED: + print_array_val_signed (src[l-ORC_VAR_S1], i, j); + break; + case FORMAT_UNSIGNED: + print_array_val_unsigned (src[l-ORC_VAR_S1], i, j); + break; + } + } + } + + printf(" ->"); + for(l=ORC_VAR_D1;lvars[l].size > 0) { + switch (format) { + case FORMAT_FLOAT: + print_array_val_float (dest[l-ORC_VAR_D1], i, j); + break; + case FORMAT_HEX: + print_array_val_hex (dest[l-ORC_VAR_D1], i, j); + break; + case FORMAT_SIGNED: + print_array_val_signed (dest[l-ORC_VAR_D1], i, j); + break; + case FORMAT_UNSIGNED: + print_array_val_unsigned (dest[l-ORC_VAR_D1], i, j); + break; + } + } + } + + printf("\n"); + } + } + } + + + + for(i=0;i<4;i++){ + if (dest[i]) orc_array_free (dest[i]); + } + for(i=0;i<8;i++){ + if (src[i]) orc_array_free (src[i]); + } + + orc_executor_free (ex); + +} + diff --git a/testsuite/test-schro.c b/testsuite/test-schro.c new file mode 100644 index 0000000..148b53d --- /dev/null +++ b/testsuite/test-schro.c @@ -0,0 +1,246 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + + +int error = FALSE; + + +OrcProgram * +get_program (int type) +{ + OrcProgram *p; + + switch (type) { + case 0: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 2, 2, "c1"); + orc_program_add_constant (p, 2, 2, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_str (p, "addw", "t1", "s1", "s2"); + orc_program_append_str (p, "addw", "t1", "t1", "c1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "c2"); + orc_program_append_str (p, "addw", "d1", "d1", "t1"); + break; + case 1: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 2, 2, "c1"); + orc_program_add_constant (p, 2, 2, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_str (p, "addw", "t1", "s1", "s2"); + orc_program_append_str (p, "addw", "t1", "t1", "c1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "c2"); + orc_program_append_str (p, "subw", "d1", "d1", "t1"); + break; + case 2: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 2, 1, "c1"); + orc_program_add_constant (p, 2, 1, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_str (p, "addw", "t1", "s1", "s2"); + orc_program_append_str (p, "addw", "t1", "t1", "c1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "c2"); + orc_program_append_str (p, "addw", "d1", "d1", "t1"); + break; + case 3: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s1"); + orc_program_add_source (p, 2, "s2"); + orc_program_add_constant (p, 2, 1, "c1"); + orc_program_add_constant (p, 2, 1, "c2"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_str (p, "addw", "t1", "s1", "s2"); + orc_program_append_str (p, "addw", "t1", "t1", "c1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "c2"); + orc_program_append_str (p, "subw", "d1", "d1", "t1"); + break; + case 4: + p = orc_program_new_dss (2,2,2); + orc_program_add_constant (p, 2, 1, "c1"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_str (p, "addw", "t1", "s1", "c1"); + orc_program_append_str (p, "shrsw", "d1", "t1", "c1"); + break; + case 5: + p = orc_program_new_dss (2,2,2); + + orc_program_append_str (p, "addw", "d1", "s1", "s2"); + break; + case 6: + p = orc_program_new_ds (2,2); + orc_program_add_constant (p, 2, 1, "c1"); + + orc_program_append_str (p, "shlw", "d1", "s1", "c1"); + break; + case 7: + p = orc_program_new_ds (2,2); + orc_program_add_constant (p, 2, 2, "c1"); + + orc_program_append_str (p, "shlw", "d1", "s1", "c1"); + break; + case 8: + p = orc_program_new_dss (2,2,2); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 4, "t2"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 4, "p2"); + orc_program_add_parameter (p, 4, "p3"); + + orc_program_append_str (p, "addw", "t1", "s1", "s2"); + orc_program_append_str (p, "mulswl", "t2", "t1", "p1"); + orc_program_append_str (p, "addl", "t2", "t2", "p2"); + orc_program_append_str (p, "shll", "t2", "t2", "p3"); + orc_program_append_ds_str (p, "convlw", "t1", "t2"); + orc_program_append_str (p, "addw", "d1", "d1", "t1"); + break; + case 9: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s20"); + orc_program_add_source (p, 2, "s21"); + orc_program_add_source (p, 2, "s22"); + orc_program_add_source (p, 2, "s23"); + orc_program_add_constant (p, 2, 9, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_str (p, "addw", "t1", "s21", "s22"); + orc_program_append_str (p, "mullw", "t1", "t1", "c1"); + orc_program_append_str (p, "addw", "t2", "s20", "s23"); + orc_program_append_str (p, "subw", "t1", "t1", "t2"); + orc_program_append_str (p, "addw", "t1", "t1", "p1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "p2"); + orc_program_append_str (p, "addw", "d1", "d1", "t1"); + break; + case 10: + p = orc_program_new (); + orc_program_add_destination (p, 2, "d1"); + orc_program_add_source (p, 2, "s20"); + orc_program_add_source (p, 2, "s21"); + orc_program_add_source (p, 2, "s22"); + orc_program_add_source (p, 2, "s23"); + orc_program_add_constant (p, 2, 9, "c1"); + orc_program_add_parameter (p, 2, "p1"); + orc_program_add_parameter (p, 2, "p2"); + orc_program_add_temporary (p, 2, "t1"); + orc_program_add_temporary (p, 2, "t2"); + + orc_program_append_str (p, "addw", "t1", "s21", "s22"); + orc_program_append_str (p, "mullw", "t1", "t1", "c1"); + orc_program_append_str (p, "addw", "t2", "s20", "s23"); + orc_program_append_str (p, "subw", "t1", "t1", "t2"); + orc_program_append_str (p, "addw", "t1", "t1", "p1"); + orc_program_append_str (p, "shrsw", "t1", "t1", "p2"); + orc_program_append_str (p, "subw", "d1", "d1", "t1"); + break; + case 11: + p = orc_program_new_dss (2,2,2); + + orc_program_append_str (p, "subw", "d1", "s1", "s2"); + break; + case 12: + p = orc_program_new_ds (1,1); + orc_program_append_ds_str (p, "copyb", "d1", "s1"); + break; + case 13: + p = orc_program_new_dss (2,2,1); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_ds_str (p, "convubw", "t1", "s2"); + orc_program_append_str (p, "addw", "d1", "t1", "s1"); + break; + case 14: + p = orc_program_new_ds (2,1); + + orc_program_append_ds_str (p, "convubw", "d1", "s1"); + break; + case 15: + p = orc_program_new_ds (1,2); + + orc_program_append_ds_str (p, "convsuswb", "d1", "s1"); + break; + case 16: + p = orc_program_new_dss (2,2,1); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_ds_str (p, "convubw", "t1", "s2"); + orc_program_append_str (p, "subw", "d1", "s1", "t1"); + break; + case 17: + p = orc_program_new_dss (2,2,2); + orc_program_add_source (p, 1, "s3"); + orc_program_add_temporary (p, 2, "t1"); + + orc_program_append_ds_str (p, "convubw", "t1", "s3"); + orc_program_append_str (p, "mullw", "t1", "t1", "s2"); + orc_program_append_str (p, "addw", "d1", "s1", "t1"); + break; + default: + return NULL; + } + + return p; +} + + + +void +test_program (int type) +{ + OrcProgram *p; + char s[40]; + OrcTestResult ret; + + p = get_program(type); + + sprintf(s, "test_schro_%d", type); + orc_program_set_name (p, s); + + ret = orc_test_compare_output (p); + if (!ret) { + error = TRUE; + } +} + + +int +main (int argc, char *argv[]) +{ + int i; + + orc_init(); + orc_test_init(); + + for(i=0;i<18;i++){ + //printf("/* %d */\n", i); + test_program (i); + } + + if (error) return 1; + return 0; +} + diff --git a/testsuite/test.orc b/testsuite/test.orc new file mode 100644 index 0000000..ca30e21 --- /dev/null +++ b/testsuite/test.orc @@ -0,0 +1,2299 @@ + +.function orc_add2_rshift_add_s16_22_op +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.temp 2 t1 + +addw t1, s2, s3 +addw t1, t1, 2 +shrsw t1, t1, 2 +addw d1, s1, t1 + + +.function orc_add2_rshift_add_s16_22 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 2 +shrsw t1, t1, 2 +addw d1, d1, t1 + + +.function orc_add2_rshift_sub_s16_22_op +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.temp 2 t1 + +addw t1, s2, s3 +addw t1, t1, 2 +shrsw t1, t1, 2 +subw d1, s1, t1 + + +.function orc_add2_rshift_sub_s16_22 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 2 +shrsw t1, t1, 2 +subw d1, d1, t1 + + +.function orc_add2_rshift_add_s16_11_op +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.temp 2 t1 + +avgsw t1, s2, s3 +addw d1, s1, t1 + + +.function orc_add2_rshift_add_s16_11 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +avgsw t1, s1, s2 +addw d1, d1, t1 + + +.function orc_add2_rshift_sub_s16_11_op +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.temp 2 t1 + +avgsw t1, s2, s3 +subw d1, s1, t1 + + +.function orc_add2_rshift_sub_s16_11 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +avgsw t1, s1, s2 +subw d1, d1, t1 + + +.function orc_add_const_rshift_s16_11 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.temp 2 t1 + +addw t1, s1, 1 +shrsw d1, t1, 1 + + +.function orc_add_const_rshift_s16 +.dest 2 d1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 + +addw t1, d1, p1 +shrsw d1, t1, p2 + + +.function orc_add_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t + +addw d1, s1, s2 + + +.function orc_add_s16_2d +.flags 2d +.dest 2 d1 int16_t +.source 2 s1 int16_t + +addw d1, d1, s1 + + +.function orc_addc_rshift_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.param 2 p1 + +addw t1, s1, s2 +shrsw d1, t1, p1 + + +.function orc_lshift1_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t + +shlw d1, s1, 1 + + +.function orc_lshift2_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t + +shlw d1, s1, 2 + + +.function orc_lshift_s16_ip +.dest 2 d1 int16_t +.param 2 p1 + +shlw d1, d1, p1 + + +.function orc_mas2_add_s16_op +.dest 2 d1 int16_t +.source 2 s0 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 4 t2 +.param 2 p1 +.param 4 p2 +.param 4 p3 + +addw t1, s1, s2 +mulswl t2, t1, p1 +addl t2, t2, p2 +shrsl t2, t2, p3 +convlw t1, t2 +addw d1, s0, t1 + + +.function orc_mas2_add_s16_ip +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 4 t2 +.param 2 p1 +.param 4 p2 +.param 4 p3 + +addw t1, s1, s2 +mulswl t2, t1, p1 +addl t2, t2, p2 +shrsl t2, t2, p3 +convlw t1, t2 +addw d1, d1, t1 + + +.function orc_mas2_sub_s16_op +.dest 2 d1 int16_t +.source 2 s0 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 4 t2 +.param 2 p1 +.param 4 p2 +.param 4 p3 + +addw t1, s1, s2 +mulswl t2, t1, p1 +addl t2, t2, p2 +shrsl t2, t2, p3 +convlw t1, t2 +subw d1, s0, t1 + + +.function orc_mas2_sub_s16_ip +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 4 t2 +.param 2 p1 +.param 4 p2 +.param 4 p3 + +addw t1, s1, s2 +mulswl t2, t1, p1 +addl t2, t2, p2 +shrsl t2, t2, p3 +convlw t1, t2 +subw d1, d1, t1 + + +.function orc_mas4_across_add_s16_1991_op +.dest 2 d1 int16_t +.source 2 s0 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.source 2 s4 int16_t +.param 4 p1 +.param 4 p2 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 +.temp 4 t4 + +addw t1, s2, s3 +mulswl t3, t1, 9 +addw t2, s1, s4 +convswl t4, t2 +subl t3, t3, t4 +addl t3, t3, p1 +shrsl t3, t3, p2 +convlw t1, t3 +addw d1, s0, t1 + + +.function orc_mas4_across_add_s16_1991_ip +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.source 2 s4 int16_t +.param 4 p1 +.param 4 p2 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 +.temp 4 t4 + +addw t1, s2, s3 +mulswl t3, t1, 9 +addw t2, s1, s4 +convswl t4, t2 +subl t3, t3, t4 +addl t3, t3, p1 +shrsl t3, t3, p2 +convlw t1, t3 +addw d1, d1, t1 + + +.function orc_mas4_across_sub_s16_1991_op +.dest 2 d1 int16_t +.source 2 s0 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.source 2 s4 int16_t +.param 4 p1 +.param 4 p2 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 +.temp 4 t4 + +addw t1, s2, s3 +mulswl t3, t1, 9 +addw t2, s1, s4 +convswl t4, t2 +subl t3, t3, t4 +addl t3, t3, p1 +shrsl t3, t3, p2 +convlw t1, t3 +subw d1, s0, t1 + + +.function orc_mas4_across_sub_s16_1991_ip +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.source 2 s3 int16_t +.source 2 s4 int16_t +.param 4 p1 +.param 4 p2 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 +.temp 4 t4 + +addw t1, s2, s3 +mulswl t3, t1, 9 +addw t2, s1, s4 +convswl t4, t2 +subl t3, t3, t4 +addl t3, t3, p1 +shrsl t3, t3, p2 +convlw t1, t3 +subw d1, d1, t1 + + +.function orc_subtract_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t + +subw d1, s1, s2 + + +.function orc_add_s16_u8 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 1 s2 +.temp 2 t1 + +convubw t1, s2 +addw d1, t1, s1 + + +.function orc_add_s16_u8_2d +.flags 2d +.dest 2 d1 int16_t +.source 1 s1 +.temp 2 t1 + +convubw t1, s1 +addw d1, d1, t1 + + +.function orc_convert_s16_u8 +.dest 2 d1 +.source 1 s1 + +convubw d1, s1 + + +.function orc_convert_u8_s16 +.dest 1 d1 +.source 2 s1 int16_t + +convsuswb d1, s1 + + +.function orc_offsetconvert_u8_s16 +.dest 1 d1 +.source 2 s1 int16_t +.temp 2 t1 + +addw t1, s1, 128 +convsuswb d1, t1 + + +.function orc_offsetconvert_s16_u8 +.dest 2 d1 int16_t +.source 1 s1 +.temp 2 t1 + +convubw t1, s1 +subw d1, t1, 128 + + +.function orc_subtract_s16_u8 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 1 s2 +.temp 2 t1 + +convubw t1, s2 +subw d1, s1, t1 + + +.function orc_multiply_and_add_s16_u8 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 1 s2 +.temp 2 t1 + +convubw t1, s2 +mullw t1, t1, s1 +addw d1, d1, t1 + + +.function orc_splat_s16_ns +.dest 2 d1 int16_t +.param 2 p1 + +copyw d1, p1 + + +.function orc_splat_s16_2d_4xn +.n 4 +.flags 2d +.dest 2 d1 int16_t +.param 2 p1 + +copyw d1, p1 + + +.function orc_splat_s16_2d_8xn +.n 8 +.flags 2d +.dest 2 d1 int16_t +.param 2 p1 + +copyw d1, p1 + + +.function orc_splat_s16_2d +.flags 2d +.dest 2 d1 int16_t +.param 2 p1 + +copyw d1, p1 + + +.function orc_splat_u8_ns +.dest 1 d1 +.param 1 p1 + +copyb d1, p1 + + +.function orc_splat_u8_2d +.flags 2d +.dest 1 d1 +.param 1 p1 + +copyb d1, p1 + + +.function orc_average_u8 +.dest 1 d1 +.source 1 s1 +.source 1 s2 + +avgub d1, s1, s2 + + +.function orc_rrshift6_add_s16_2d +.flags 2d +.dest 1 d1 uint8_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +addw t1, s2, 32 +shrsw t1, t1, 6 +addw t1, s1, t1 +convsuswb d1, t1 + + +.function orc_rrshift6_sub_s16_2d +.flags 2d +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.temp 2 t1 + +subw t1, d2, 8160 +shrsw t1, t1, 6 +copyw d2, t1 +subw d1, d1, t1 + + +.function orc_rrshift6_s16_ip_2d +.flags 2d +.dest 2 d1 int16_t +.temp 2 t1 + +subw t1, d1, 8160 +shrsw d1, t1, 6 + + +.function orc_rrshift6_s16_ip +.dest 2 d1 int16_t +.temp 2 t1 + +subw t1, d1, 8160 +shrsw d1, t1, 6 + + +.function orc_unpack_yuyv_y +.dest 1 d1 +.source 2 s1 + +select0wb d1, s1 + + +.function orc_unpack_yuyv_u +.dest 1 d1 +.source 4 s1 +.temp 2 t1 + +select0lw t1, s1 +select1wb d1, t1 + + +.function orc_unpack_yuyv_v +.dest 1 d1 +.source 4 s1 +.temp 2 t1 + +select1lw t1, s1 +select1wb d1, t1 + + +.function orc_packyuyv +.dest 4 d1 +.source 2 s1 uint8_t +.source 1 s2 +.source 1 s3 +.temp 1 t1 +.temp 1 t2 +.temp 2 t3 +.temp 2 t4 +.temp 2 t5 + +copyw t5, s1 +select0wb t1, t5 +select1wb t2, t5 +mergebw t3, t1, s2 +mergebw t4, t2, s3 +mergewl d1, t3, t4 + + +.function orc_unpack_uyvy_y +.dest 1 d1 +.source 2 s1 + +select1wb d1, s1 + + +.function orc_unpack_uyvy_u +.dest 1 d1 +.source 4 s1 +.temp 2 t1 + +select0lw t1, s1 +select0wb d1, t1 + + +.function orc_unpack_uyvy_v +.dest 1 d1 +.source 4 s1 +.temp 2 t1 + +select1lw t1, s1 +select0wb d1, t1 + + +.function orc_interleave2_s16 +.dest 4 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t + +mergewl d1, s1, s2 + + +.function orc_interleave2_rrshift1_s16 +.dest 4 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +addw t1, s1, 1 +shrsw t1, t1, 1 +addw t2, s2, 1 +shrsw t2, t2, 1 +mergewl d1, t1, t2 + + +.function orc_deinterleave2_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 4 s1 int16_t +.temp 4 t1 + +copyl t1, s1 +select0lw d1, t1 +select1lw d2, t1 + + +.function orc_deinterleave2_lshift1_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 4 s1 int16_t +.temp 4 t1 +.temp 2 t2 +.temp 2 t3 + +copyl t1, s1 +select0lw t2, t1 +shlw d1, t2, 1 +select1lw t3, t1 +shlw d2, t3, 1 + + +.function orc_haar_deint_lshift1_split_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 4 s1 int16_t +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 + +copyl t3, s1 +select0lw t1, t3 +select1lw t2, t3 +shlw t1, t1, 1 +shlw t2, t2, 1 +subw t2, t2, t1 +copyw d2, t2 +avgsw t2, t2, 0 +addw d1, t1, t2 + + +.function orc_haar_deint_split_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 4 s1 int16_t +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 + +copyl t3, s1 +select0lw t1, t3 +select1lw t2, t3 +subw t2, t2, t1 +copyw d2, t2 +avgsw t2, t2, 0 +addw d1, t1, t2 + + +.function orc_haar_split_s16_lo +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +subw t2, s2, t1 +avgsw t2, t2, 0 +addw d1, t1, t2 + + +.function orc_haar_split_s16_hi +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t + +subw d1, s2, s1 + + +.function orc_haar_split_s16_op +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +subw t2, s2, t1 +copyw d2, t2 +avgsw t2, t2, 0 +addw d1, t1, t2 + + +.function orc_haar_split_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t1, d1 +copyw t2, d2 +subw t2, t2, t1 +copyw d2, t2 +avgsw t2, t2, 0 +addw d1, t1, t2 + + +.function orc_haar_synth_s16_lo +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 + +avgsw t1, s2, 0 +subw d1, s1, t1 + + +.function orc_haar_synth_s16_hi +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 +.temp 2 t3 + +copyw t2, s2 +avgsw t3, t2, 0 +subw t1, s1, t3 +addw d1, t2, t1 + + +.function orc_haar_synth_s16_op +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 +.temp 2 t3 + +copyw t2, s2 +avgsw t3, t2, 0 +subw t1, s1, t3 +copyw d1, t1 +addw d2, t2, t1 + + +.function orc_haar_synth_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.temp 2 t1 +.temp 2 t2 +.temp 2 t3 + +copyw t1, d1 +copyw t2, d2 +avgsw t3, t2, 0 +subw t1, t1, t3 +copyw d1, t1 +addw d2, t2, t1 + + +.function orc_haar_synth_rrshift1_int_s16 +.dest 4 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t2, s2 +avgsw t1, t2, 0 +subw t1, s1, t1 +addw t2, t2, t1 +avgsw t1, t1, 0 +avgsw t2, t2, 0 +mergewl d1, t1, t2 + + +.function orc_haar_synth_int_s16 +.dest 4 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t2, s2 +avgsw t1, t2, 0 +subw t1, s1, t1 +addw t2, t2, t1 +mergewl d1, t1, t2 + + +.function orc_haar_sub_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t + +subw d1, d1, s1 + + +.function orc_haar_add_half_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.temp 2 t1 + +avgsw t1, s1, 0 +addw d1, d1, t1 + + +.function orc_haar_add_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t + +addw d1, d1, s1 + + +.function orc_haar_sub_half_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.temp 2 t1 + +avgsw t1, s1, 0 +subw d1, d1, t1 + + +.function orc_sum_u8 +.accumulator 4 a1 int32_t +.source 1 s1 +.temp 2 t1 +.temp 4 t2 + +convubw t1, s1 +convuwl t2, t1 +accl a1, t2 + + +.function orc_sum_s16 +.accumulator 4 a1 int32_t +.source 2 s1 int16_t +.temp 4 t1 + +convswl t1, s1 +accl a1, t1 + + +.function orc_sum_square_diff_u8 +.accumulator 4 a1 int32_t +.source 1 s1 +.source 1 s2 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 + +convubw t1, s1 +convubw t2, s2 +subw t1, t1, t2 +mullw t1, t1, t1 +convuwl t3, t1 +accl a1, t3 + + +.function orc_dequantise_s16_2d_4xn +.n 4 +.flags 2d +.dest 2 d1 int16_t +.source 2 s1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_s16_2d_8xn +.n 8 +.flags 2d +.dest 2 d1 int16_t +.source 2 s1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_s16_ip_2d_8xn +.n 8 +.flags 2d +.dest 2 d1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, d1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_s16_ip_2d +.flags 2d +.dest 2 d1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, d1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_s16_ip +.dest 2 d1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, d1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, p1 +addw t1, t1, p2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +.function orc_dequantise_var_s16_ip +.dest 2 d1 int16_t +.source 2 s1 int16_t +.source 2 s2 int16_t +.temp 2 t1 +.temp 2 t2 + +copyw t1, d1 +signw t2, t1 +absw t1, t1 +mullw t1, t1, s1 +addw t1, t1, s2 +shrsw t1, t1, 2 +mullw d1, t1, t2 + + +# only works for values between -16384 and 16384 +.function orc_quantise1_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +signw t2, t1 +absw t1, t1 +shlw t1, t1, 2 +subw t1, t1, p2 +mulhuw t1, t1, p1 +shruw t1, t1, p3 +mullw d1, t1, t2 + + +# only works for values between -16384 and 16384 +.function orc_quantise2_s16 +.dest 2 d1 int16_t +.source 2 s1 int16_t +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +copyw t1, s1 +signw t2, t1 +absw t1, t1 +shlw t1, t1, 2 +subw t1, t1, p2 +shruw t1, t1, p1 +mullw d1, t1, t2 + + +# only works for values between -16384 and 16384 +.function orc_quantdequant1_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.param 2 p5 +.temp 2 t1 +.temp 2 t2 + +copyw t1, d2 +signw t2, t1 +absw t1, t1 +shlw t1, t1, 2 +subw t1, t1, p2 +mulhuw t1, t1, p1 +shruw t1, t1, p3 +mullw t2, t1, t2 +copyw d1, t2 +signw t2, t2 +mullw t1, t1, p4 +addw t1, t1, p5 +shrsw t1, t1, 2 +mullw d2, t1, t2 + + +# only works for values between -16384 and 16384 +.function orc_quantdequant3_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.param 2 p5 +.param 4 p6 +.temp 2 t1 +.temp 2 t2 +.temp 4 t3 + +copyw t1, d2 +signw t2, t1 +absw t1, t1 +shlw t1, t1, 2 +subw t1, t1, p2 +muluwl t3, t1, p1 +addl t3, t3, p6 +shrul t3, t3, p3 +convlw t1, t3 +mullw t2, t1, t2 +copyw d1, t2 +signw t2, t2 +mullw t1, t1, p4 +addw t1, t1, p5 +shrsw t1, t1, 2 +mullw d2, t1, t2 + + +# only works for values between -16384 and 16384 +.function orc_quantdequant2_s16 +.dest 2 d1 int16_t +.dest 2 d2 int16_t +.param 2 p1 +.param 2 p2 +.param 2 p4 +.param 2 p5 +.temp 2 t1 +.temp 2 t2 + +copyw t1, d2 +signw t2, t1 +absw t1, t1 +shlw t1, t1, 2 +subw t1, t1, p2 +shruw t1, t1, p1 +mullw t2, t1, t2 +copyw d1, t2 +signw t2, t2 +mullw t1, t1, p4 +addw t1, t1, p5 +shrsw t1, t1, 2 +mullw d2, t1, t2 + + + +.function orc_downsample_vert_u8 +.dest 1 d1 +.source 1 s1 +.source 1 s2 +.source 1 s3 +.source 1 s4 +.temp 2 t1 +.temp 2 t2 +.temp 2 t3 + +convubw t1, s1 +convubw t2, s4 +addw t1, t1, t2 +mullw t1, t1, 6 +convubw t2, s2 +convubw t3, s3 +addw t2, t2, t3 +mullw t2, t2, 26 +addw t2, t2, t1 +addw t2, t2, 32 +shruw t2, t2, 6 +convwb d1, t2 + + +.function orc_downsample_horiz_u8 +.dest 1 d1 +.source 2 s1 uint8_t +.source 2 s2 uint8_t +.temp 2 t1 +.temp 2 t2 +.temp 1 t3 +.temp 2 t4 +.temp 2 t5 +.temp 2 t6 + +copyw t1, s1 +copyw t2, s2 +select0wb t3, t1 +convubw t4, t3 +select1wb t3, t2 +convubw t5, t3 +addw t4, t4, t5 +mullw t4, t4, 6 +select1wb t3, t1 +convubw t5, t3 +select0wb t3, t2 +convubw t6, t3 +addw t5, t5, t6 +mullw t5, t5, 26 +addw t4, t4, t5 +addw t4, t4, 32 +shruw t4, t4, 6 +convwb d1, t4 + + +.function orc_stats_moment_s16 +.source 2 s1 int16_t +.accumulator 4 a1 int32_t +.temp 2 t1 +.temp 4 t2 + +absw t1, s1 +subw t1, t1, 2 +maxsw t1, t1, 0 +convuwl t2, t1 +accl a1, t2 + + +.function orc_stats_above_s16 +.source 2 s1 int16_t +.accumulator 4 a1 int32_t +.temp 2 t1 +.temp 4 t2 + +absw t1, s1 +subw t1, t1, 1 +maxsw t1, t1, 0 +minsw t1, t1, 1 +convuwl t2, t1 +accl a1, t2 + + +.function orc_accw +.accumulator 2 a1 int +.source 2 s1 int16_t +.temp 2 t1 + +absw t1, s1 +accw a1, t1 + + +.function orc_avg2_8xn_u8 +.flags 2d +.n 8 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +avgub d1, s1, s2 + + +.function orc_avg2_12xn_u8 +.flags 2d +.n 12 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +avgub d1, s1, s2 + + +.function orc_avg2_16xn_u8 +.flags 2d +.n 16 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +avgub d1, s1, s2 + + +.function orc_avg2_32xn_u8 +.flags 2d +.n 32 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +avgub d1, s1, s2 + + +.function orc_avg2_nxm_u8 +.flags 2d +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +avgub d1, s1, s2 + + +.function orc_combine4_8xn_u8 +.flags 2d +.n 8 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +convsuswb d1, t2 + + +.function orc_combine4_12xn_u8 +.flags 2d +.n 12 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +convsuswb d1, t2 + + +.function orc_combine4_16xn_u8 +.flags 2d +.n 16 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +convsuswb d1, t2 + + +.function orc_combine4_24xn_u8 +.flags 2d +.n 24 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +convsuswb d1, t2 + + +.function orc_combine4_32xn_u8 +.flags 2d +.n 32 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +convsuswb d1, t2 + + +.function orc_combine4_nxm_u8 +.flags 2d +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.source 1 s3 uint8_t +.source 1 s4 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +mullw t2, t1, p1 +convubw t1, s2 +mullw t1, t1, p2 +addw t2, t2, t1 +convubw t1, s3 +mullw t1, t1, p3 +addw t2, t2, t1 +convubw t1, s4 +mullw t1, t1, p4 +addw t2, t2, t1 +addw t2, t2, 8 +shrsw t2, t2, 4 +convsuswb d1, t2 + + +.function orc_combine2_8xn_u8 +.flags 2d +.n 8 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +convubw t2, s2 +mullw t1, t1, p1 +mullw t2, t2, p2 +addw t1, t1, t2 +addw t1, t1, p3 +shrsw t1, t1, p4 +convsuswb d1, t1 + + + +.function orc_combine2_12xn_u8 +.flags 2d +.n 12 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +convubw t2, s2 +mullw t1, t1, p1 +mullw t2, t2, p2 +addw t1, t1, t2 +addw t1, t1, p3 +shrsw t1, t1, p4 +convsuswb d1, t1 + + + +.function orc_combine2_16xn_u8 +.flags 2d +.n 16 +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +convubw t2, s2 +mullw t1, t1, p1 +mullw t2, t2, p2 +addw t1, t1, t2 +addw t1, t1, p3 +shrsw t1, t1, p4 +convsuswb d1, t1 + + + +.function orc_combine2_nxm_u8 +.flags 2d +.dest 1 d1 uint8_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t +.param 2 p1 +.param 2 p2 +.param 2 p3 +.param 2 p4 +.temp 2 t1 +.temp 2 t2 + +convubw t1, s1 +convubw t2, s2 +mullw t1, t1, p1 +mullw t2, t2, p2 +addw t1, t1, t2 +addw t1, t1, p3 +shrsw t1, t1, p4 +convsuswb d1, t1 + + + +.function orc_sad_nxm_u8 +.flags 2d +.accumulator 4 a1 uint32_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +accsadubl a1, s1, s2 + + +.function orc_sad_8x8_u8 +.flags 2d +.n 8 +.m 8 +.accumulator 4 a1 uint32_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +accsadubl a1, s1, s2 + + + +.function orc_sad_12x12_u8 +.flags 2d +.n 12 +.m 12 +.accumulator 4 a1 uint32_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +accsadubl a1, s1, s2 + + + +.function orc_sad_16xn_u8 +.flags 2d +.n 16 +.accumulator 4 a1 uint32_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +accsadubl a1, s1, s2 + + + +.function orc_sad_32xn_u8 +.flags 2d +.n 32 +.accumulator 4 a1 uint32_t +.source 1 s1 uint8_t +.source 1 s2 uint8_t + +accsadubl a1, s1, s2 + + +.function convert_rgb_to_gray +.dest 1 d1 +.source 4 s1 +.temp 1 l_t1 +.temp 2 l_t2 +.temp 2 l_gray2 + +# Red * ((0.299) * (1<<16) + 0.5) +select0lw l_t2, s1 +select0wb l_t1, l_t2 +convubw l_gray2, l_t1 +swapw l_gray2, l_gray2 +mulhuw l_gray2, l_gray2, 19595 + +# Green * ((0.587) * (1<<16) + 0.5) +select0lw l_t2, s1 +select1wb l_t1, l_t2 +convubw l_t2, l_t1 +swapw l_t2, l_t2 +mulhuw l_t2, l_t2, 38470 +addusw l_gray2, l_gray2, l_t2 + +# Blue * ((0.114) * (1<<16) + 0.5) +select1lw l_t2, s1 +select0wb l_t1, l_t2 +convubw l_t2, l_t1 +swapw l_t2, l_t2 +mulhuw l_t2, l_t2, 7471 +addusw l_gray2, l_gray2, l_t2 + +# Add 1/2 => (1 << (8 - 1)) +addusw l_gray2, l_gray2, 128 +select1wb d1, l_gray2 + + + +.function canny_calc_delta_x +.dest 4 d1 int32_t +.source 4 s1 uint8_t +.source 4 s2 uint8_t +.temp 2 t1 +.temp 2 t2 +.temp 1 t3 +.temp 2 t4 +.temp 1 t5 +.temp 2 t6 +.temp 4 t7 +.temp 4 td1 + +select0lw t2, s1 +select1wb t3, t2 +select0lw t4, s2 +select1wb t5, t4 +convubw t4, t3 +convubw t6, t5 +subw t1, t4, t6 +convswl t7, t1 +mulll td1, t7, t7 + +select1lw t2, s1 +select0wb t3, t2 +select1lw t4, s2 +select0wb t5, t4 +convubw t4, t3 +convubw t6, t5 +subw t1, t4, t6 +convswl t7, t1 +mulll t7, t7, t7 +addl td1, td1, t7 + +select1lw t2, s1 +select1wb t3, t2 +select1lw t4, s2 +select1wb t5, t4 +convubw t4, t3 +convubw t6, t5 +subw t1, t4, t6 +convswl t7, t1 +mulll t7, t7, t7 +addl d1, td1, t7 + + +.function i420_to_ayuv +.dest 4 d1 +.source 1 y +.source 1 u +.source 1 v +.param 1 a +.temp 1 tu +.temp 1 tv +.temp 1 ty +.temp 2 t1 +.temp 2 t2 + +loadupdb tu, u +loadupdb tv, v +loadb ty, y +mergebw t1, a, ty +mergebw t2, tu, tv +mergewl d1, t1, t2 + + + +.function test_4x +.dest 4 d1 +.source 4 s1 +.source 4 s2 + +x4 addusb d1, s1, s2 + + +.function test_4x_2 +.dest 4 d1 +.source 4 s1 +.param 4 p1 + +x4 addusb d1, s1, p1 + + +.function orc_splat_u16 +.dest 2 d1 uint16_t +.param 2 p1 + +copyw d1, p1 + + +.function orc_splat_u32 +.dest 4 d1 uint32_t +.param 4 p1 + +copyl d1, p1 + + +.function orc_splat_u16_2d +.dest 2 d1 uint16_t +.param 2 p1 +.flags 2d + +copyw d1, p1 + + +.function orc_splat_u32_2d +.dest 4 d1 uint32_t +.param 4 p1 +.flags 2d + +copyl d1, p1 + + +.function orc_copy_u16_2d +.dest 2 d1 +.source 2 s1 +.flags 2d + +copyw d1, s1 + + +.function orc_copy_u32_2d +.dest 4 d1 +.source 4 s1 +.flags 2d + +copyl d1, s1 + + +.function orc_composite_add_8888_8888_2d +.flags 2d +.dest 4 d1 +.source 4 s1 + +x4 addusb d1, d1, s1 + + +.function orc_composite_add_8_8_line +.dest 1 d1 +.source 1 s1 + +addusb d1, d1, s1 + + +.function orc_composite_add_n_8_8_line +.dest 1 d1 +.source 1 s1 +.param 2 p1 +.temp 2 t1 +.temp 1 t2 + +#compina t1, p1, s1 +convubw t1, s1 +mullw t1, t1, p1 +div255w t1, t1 +convwb t2, t1 +addusb d1, d1, t2 + + +.function orc_code_combine_add_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 t1 +.temp 8 t2 +.temp 4 t3 + +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb t3, t1 +x4 addusb d1, d1, t3 + + +.function orc_code_combine_add_u_n +.dest 4 d1 +.source 4 s1 + +x4 addusb d1, d1, s1 + + +.function orc_code_combine_over_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 t1 +.temp 8 t2 +.temp 4 t3 +.temp 4 d +.temp 8 d_wide + +#compin t1, s1, s2 +#compover d1, d1, t1 +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb t3, t1 +# ((d) + (s) - ORC_MULDIV_255((d),(m))) +loadl d, d1 +x4 convubw d_wide, d +x4 xorw t1, t1, 0x00ff +splatw3q t2, t1 +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, t3 + + +.function orc_code_combine_over_u_n +.dest 4 d1 +.source 4 s1 +.temp 8 t1 +.temp 8 t2 +.temp 4 d +.temp 4 s +.temp 8 d_wide + +loadl s, s1 +x4 convubw t1, s +loadl d, d1 +x4 convubw d_wide, d +x4 xorw t1, t1, 0x00ff +splatw3q t2, t1 +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, s + + +.function orc_code_combine_in_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 + +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +# ORC_MULDIV_255((s),(m)), m is from dest +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb d1, t1 + + + +.function orc_code_combine_in_u_n +.dest 4 d1 +.source 4 s1 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 + +x4 convubw t1, s1 +# ORC_MULDIV_255((s),(m)), m is from dest +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb d1, t1 + + +.function orc_code_combine_out_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 + +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +# ORC_MULDIV_255((s),(m)), m is from dest +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 xorw t2, t2, 0x00ff +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb d1, t1 + + + +.function orc_code_combine_out_u_n +.dest 4 d1 +.source 4 s1 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 + +x4 convubw t1, s1 +# ORC_MULDIV_255((s),(m)), m is from dest +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 xorw t2, t2, 0x00ff +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb d1, t1 + + +# atop: (ORC_DIVIDE_255((s)*(da))+ORC_DIVIDE_255((d)*(255-(sa)))) + +.function orc_code_combine_atop_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 +.temp 8 t3 +.temp 4 t4 +.temp 4 t5 + +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 + +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 mullw t3, t1, t2 +x4 div255w t3, t3 +x4 convwb t4, t3 + +x4 convubw d_wide, d1 +splatw3q t2, t1 +x4 xorw t2, t2, 0x00ff +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb t5, t1 + +x4 addusb d1, t4, t5 + + +.function orc_code_combine_atop_u_n +.dest 4 d1 +.source 4 s1 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 +.temp 8 t3 +.temp 4 t4 +.temp 4 t5 + +x4 convubw t1, s1 + +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 mullw t3, t1, t2 +x4 div255w t3, t3 +x4 convwb t4, t3 + +x4 convubw d_wide, d1 +splatw3q t2, t1 +x4 xorw t2, t2, 0x00ff +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb t5, t1 + +x4 addusb d1, t4, t5 + + + +.function orc_code_combine_xor_u +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 +.temp 8 t3 +.temp 4 t4 +.temp 4 t5 + +x4 convubw t1, s1 +x4 convubw t2, s2 +splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 + +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 xorw t2, t2, 0x00ff +x4 mullw t3, t1, t2 +x4 div255w t3, t3 +x4 convwb t4, t3 + +x4 convubw d_wide, d1 +splatw3q t2, t1 +x4 xorw t2, t2, 0x00ff +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb t5, t1 + +x4 addusb d1, t4, t5 + + +.function orc_code_combine_xor_u_n +.dest 4 d1 +.source 4 s1 +.temp 8 d_wide +.temp 8 s_wide +.temp 8 m_wide +.temp 8 t1 +.temp 8 t2 +.temp 8 t3 +.temp 4 t4 +.temp 4 t5 + +x4 convubw t1, s1 +x4 convubw d_wide, d1 +splatw3q t2, d_wide +x4 xorw t2, t2, 0x00ff +x4 mullw t3, t1, t2 +x4 div255w t3, t3 +x4 convwb t4, t3 + +x4 convubw d_wide, d1 +splatw3q t2, t1 +x4 xorw t2, t2, 0x00ff +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb t5, t1 + +x4 addusb d1, t4, t5 + + + +.function orc_code_combine_add_ca +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 t1 +.temp 8 t2 +.temp 4 t3 + +x4 convubw t1, s1 +x4 convubw t2, s2 +#splatw3q t2, t2 +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb t3, t1 +x4 addusb d1, d1, t3 + + +.function orc_code_combine_add_ca_n +.dest 4 d1 +.source 4 s1 + +x4 addusb d1, d1, s1 + + +.function orc_code_combine_over_ca +.dest 4 d1 +.source 4 s1 +.source 4 s2 +.temp 8 t1 +.temp 8 t2 +.temp 4 d +.temp 8 d_wide +.temp 8 m_wide +.temp 8 s_wide +.temp 8 xa +.temp 4 s + +x4 convubw s_wide, s1 +x4 convubw m_wide, s2 +splatw3q xa, s_wide +x4 mullw s_wide, s_wide, m_wide +x4 div255w s_wide, s_wide +x4 convwb s, s_wide +x4 mullw m_wide, m_wide, xa +x4 div255w m_wide, m_wide +loadl d, d1 +x4 convubw d_wide, d +x4 xorw m_wide, m_wide, 0x00ff +x4 mullw t1, d_wide, m_wide +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, s + + + +.function orc_code_combine_over_ca_n +.dest 4 d1 +.source 4 s1 +.temp 8 t1 +.temp 8 t2 +.temp 4 d +.temp 8 d_wide +.temp 8 m_wide +.temp 8 s_wide +.temp 8 xa +.temp 4 s + +x4 convubw s_wide, s1 +splatw3q xa, s_wide +x4 convwb s, s_wide +x4 copyw m_wide, xa +loadl d, d1 +x4 convubw d_wide, d +x4 xorw m_wide, m_wide, 0x00ff +x4 mullw t1, d_wide, m_wide +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, s + + + +.function orc_composite_over_8888_8_8888_line +.dest 4 d1 +.source 4 s1 +.source 1 s2 +.temp 8 t1 +.temp 8 t2 +.temp 4 t3 +.temp 4 d +.temp 4 mask +.temp 8 d_wide + +x4 convubw t1, s1 +splatbl mask, s2 +x4 convubw t2, mask +x4 mullw t1, t1, t2 +x4 div255w t1, t1 +x4 convwb t3, t1 +loadl d, d1 +x4 convubw d_wide, d +x4 xorw t1, t1, 0x00ff +splatw3q t2, t1 +x4 mullw t1, d_wide, t2 +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, t3 + + + +.function orc_composite_over_n_8888_8888_ca_2d +#.flags 2d +.dest 4 d1 +.source 4 s1 +.param 4 p1 +.temp 8 t1 +.temp 8 t2 +.temp 4 d +.temp 8 d_wide +.temp 8 m_wide +.temp 8 s_wide +.temp 8 xa +.temp 4 s + +x4 convubw s_wide, p1 +x4 convubw m_wide, s1 +splatw3q xa, s_wide +x4 mullw s_wide, s_wide, m_wide +x4 div255w s_wide, s_wide +x4 convwb s, s_wide +x4 mullw m_wide, m_wide, xa +x4 div255w m_wide, m_wide +loadl d, d1 +x4 convubw d_wide, d +x4 xorw m_wide, m_wide, 0x00ff +x4 mullw t1, d_wide, m_wide +x4 div255w t1, t1 +x4 convwb d, t1 +x4 addusb d1, d, s + + +.function cogorc_resample_horiz_1tap +.dest 1 d1 +.source 1 s1 +.param 2 p1 +.param 2 p2 + +ldresnearb d1, s1, p1, p2 + + +.function cogorc_resample_horiz_2tap +.dest 1 d1 +.source 1 s1 +.param 4 p1 +.param 4 p2 + +ldreslinb d1, s1, p1, p2 + + +.function test_float_constant_1 +.dest 4 d1 +.const 4 c1 2.0 + +copyl d1, c1 + + +.function test_float_constant_2 +.dest 4 d1 + +copyl d1, 2.0 + + +.function convert_fc32_to_int32 +.source 8 src #one complex float +.dest 4 dst #one complex short +.temp 8 scaled +x2 mulf scaled, src, 32767.0 +.temp 8 lscaled +x2 convfl lscaled, scaled +x2 convlw dst, lscaled + + +.function param64 +.dest 8 d +.param 8 s + +copyq d, s + + +.function const64 +.dest 8 d +.const 8 s 0x0123456789abcdef + +copyq d, s + + +.function param64_2 +.dest 8 d +.longparam 8 p +.temp 8 t + +loadpq t, p +copyq d, t + + +.function pa_volume_s16ne_orc_2ch +.dest 4 samples int16_t +.longparam 8 vols +.temp 8 v +.temp 8 s +.temp 8 ss +.temp 8 m +.temp 8 signc + +loadpq v, vols +x2 convuwl s, samples +x2 convswl ss, samples +x4 cmpgtsw signc, 0, s +x4 andw signc, signc, v +x4 mulhuw m, s, v +x2 subl m, m, signc +x2 shrul v, v, 16 +x2 mulll ss, ss, v +x2 addl m, m, ss +x2 convssslw samples, m + + diff --git a/testsuite/test_accsadubl.c b/testsuite/test_accsadubl.c new file mode 100644 index 0000000..1388045 --- /dev/null +++ b/testsuite/test_accsadubl.c @@ -0,0 +1,91 @@ + +#include "config.h" + +#include +#include + +#include +#include + + +int error = FALSE; + +void test_opcode (OrcStaticOpcode *opcode); + +orc_uint8 array1[100]; +orc_uint8 array2[100]; + +int orc_sad_u8 (orc_uint8 *s1, orc_uint8 *s2, int n); + +int +main (int argc, char *argv[]) +{ + int i; + int n; + int sum; + + orc_init(); + + for(n=0;n<20;n++){ + sum = 0; + for(i=0;i %d\n", i, array1[i], array2[i], + abs(array1[i] - array2[i])); + } + + printf("sum %d %d\n", sum, orc_sad_u8 (array1, array2, n)); + error = TRUE; + } + } + + if (error) return 1; + return 0; +} + + +int +orc_sad_u8 (orc_uint8 *s1, orc_uint8 *s2, int n) +{ + static OrcProgram *p = NULL; + OrcExecutor *ex; + int sum; + OrcCompileResult result; + + if (p == NULL) { + p = orc_program_new (); + orc_program_add_accumulator (p, 4, "a1"); + orc_program_add_source (p, 1, "s1"); + orc_program_add_source (p, 1, "s2"); + + orc_program_append_str (p, "accsadubl", "a1", "s1", "s2"); + + result = orc_program_compile (p); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return 0; + } + + //printf("%s\n", orc_program_get_asm_code (p)); + } + + ex = orc_executor_new (p); + orc_executor_set_n (ex, n); + orc_executor_set_array_str (ex, "s1", s1); + orc_executor_set_array_str (ex, "s2", s2); + + orc_executor_run (ex); + + //sum = orc_executor_get_accumulator (ex, "a1"); + sum = ex->accumulators[0]; + + orc_executor_free (ex); + + return sum; +} + + diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..fd303be --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,9 @@ + +bin_PROGRAMS = orcc orc-bugreport + +AM_CFLAGS = $(ORC_CFLAGS) +LDADD = $(ORC_LIBS) +orc_bugreport_LDADD = $(ORC_LIBS) ../orc-test/liborc-test-@ORC_MAJORMINOR@.la + +EXTRA_DIST = test.orc + diff --git a/tools/Makefile.in b/tools/Makefile.in new file mode 100644 index 0000000..c49943f --- /dev/null +++ b/tools/Makefile.in @@ -0,0 +1,542 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = orcc$(EXEEXT) orc-bugreport$(EXEEXT) +subdir = tools +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ + $(top_srcdir)/m4/as-compiler-flag.m4 \ + $(top_srcdir)/m4/as-host-defines.m4 \ + $(top_srcdir)/m4/as-nano.m4 \ + $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +orc_bugreport_SOURCES = orc-bugreport.c +orc_bugreport_OBJECTS = orc-bugreport.$(OBJEXT) +am__DEPENDENCIES_1 = +orc_bugreport_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + ../orc-test/liborc-test-@ORC_MAJORMINOR@.la +orcc_SOURCES = orcc.c +orcc_OBJECTS = orcc.$(OBJEXT) +orcc_LDADD = $(LDADD) +orcc_DEPENDENCIES = $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = orc-bugreport.c orcc.c +DIST_SOURCES = orc-bugreport.c orcc.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRT = @LIBRT@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NANO = @NANO@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORC_CFLAGS = @ORC_CFLAGS@ +ORC_LIBS = @ORC_LIBS@ +ORC_LIBVERSION = @ORC_LIBVERSION@ +ORC_MAJORMINOR = @ORC_MAJORMINOR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = $(ORC_CFLAGS) +LDADD = $(ORC_LIBS) +orc_bugreport_LDADD = $(ORC_LIBS) ../orc-test/liborc-test-@ORC_MAJORMINOR@.la +EXTRA_DIST = test.orc +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +orc-bugreport$(EXEEXT): $(orc_bugreport_OBJECTS) $(orc_bugreport_DEPENDENCIES) + @rm -f orc-bugreport$(EXEEXT) + $(LINK) $(orc_bugreport_OBJECTS) $(orc_bugreport_LDADD) $(LIBS) +orcc$(EXEEXT): $(orcc_OBJECTS) $(orcc_DEPENDENCIES) + @rm -f orcc$(EXEEXT) + $(LINK) $(orcc_OBJECTS) $(orcc_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orc-bugreport.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orcc.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tools/orc-bugreport.c b/tools/orc-bugreport.c new file mode 100644 index 0000000..359b3d9 --- /dev/null +++ b/tools/orc-bugreport.c @@ -0,0 +1,557 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include +#include +#include + +static char * read_file (const char *filename); + +void test_opcodes (void); + +int error = FALSE; + +int +main (int argc, char *argv[]) +{ + int i; + OrcProgram **programs; + const char *filename = NULL; + + orc_init (); + orc_test_init (); + + for(i=1;i Set debugging level\n"); + printf(" ORC_CODE=[KEYWORDS,...] Modify code generation\n"); + printf(" General keywords:\n"); + printf(" backup Always use backup function\n"); + printf(" debug Generate debuggable code (useful for backtraces on i386)\n"); + printf(" SSE keywords:\n"); + printf(" -sse2 Disable SSE2\n"); + printf(" -sse3 Disable SSE3\n"); + printf(" -ssse3 Disable SSEE3\n"); + printf(" -sse41 Disable SSE4.1\n"); + printf(" -sse42 Disable SSE4.2\n"); + printf(" -sse4a Disable SSE4a\n"); + printf(" -sse5 Disable SSE5\n"); + printf("\n"); + exit (0); + } + + filename = argv[i]; + } + + printf("Orc " VERSION " - integrated testing tool\n"); + + printf("Active backend: %s\n", + orc_target_get_name(orc_target_get_default())); + + { + int level1, level2, level3; + orc_get_data_cache_sizes(&level1, &level2, &level3); + printf("L1 cache: %d\n", level1); + printf("L2 cache: %d\n", level2); + printf("L3 cache: %d\n", level3); + } + + { + int family, model, stepping; + orc_get_cpu_family_model_stepping (&family, &model, &stepping); + printf("Family/Model/Stepping: %d/%d/%d\n", family, model, stepping); + printf("CPU name: %s\n", orc_get_cpu_name ()); + } + + { + int i; + int flags = orc_target_get_default_flags (orc_target_get_default()); + + printf("Compiler options: "); + for(i=0;i<32;i++){ + if (flags & (1<name); + error = TRUE; + } + } + } else { + printf("Opcode test:\n"); + test_opcodes(); + } + + if (error) { + printf("Errors detected. Please send entire output to ds@schleef.org.\n"); + return 1; + } else { + printf("No errors detected.\n"); + return 0; + } +} + + +static char * +read_file (const char *filename) +{ + FILE *file = NULL; + char *contents = NULL; + long size; + int ret; + + file = fopen (filename, "r"); + if (file == NULL) return NULL; + + ret = fseek (file, 0, SEEK_END); + if (ret < 0) goto bail; + + size = ftell (file); + if (size < 0) goto bail; + + ret = fseek (file, 0, SEEK_SET); + if (ret < 0) goto bail; + + contents = malloc (size + 1); + if (contents == NULL) goto bail; + + ret = fread (contents, size, 1, file); + if (ret < 0) goto bail; + + contents[size] = 0; + + return contents; +bail: + /* something failed */ + if (file) fclose (file); + if (contents) free (contents); + + return NULL; +} + + +void test_opcode_src (OrcStaticOpcode *opcode); +void test_opcode_const (OrcStaticOpcode *opcode); +void test_opcode_param (OrcStaticOpcode *opcode); +void test_opcode_inplace (OrcStaticOpcode *opcode); +void test_opcode_src_2d (OrcStaticOpcode *opcode); +void test_opcode_src_const_n (OrcStaticOpcode *opcode); +void test_opcode_src_const_n_2d (OrcStaticOpcode *opcode); + +void +test_opcodes (void) +{ + int i; + OrcOpcodeSet *opcode_set; + + opcode_set = orc_opcode_set_get ("sys"); + + for(i=0;in_opcodes;i++){ + test_opcode_src (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_const (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_param (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_inplace (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_src_2d (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_src_const_n (opcode_set->opcodes + i); + } + for(i=0;in_opcodes;i++){ + test_opcode_src_const_n_2d (opcode_set->opcodes + i); + } +} + +void +test_opcode_src (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s src\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_const (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + if (opcode->src_size[1] == 0) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[1], 1, "c1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_constant (p, opcode->src_size[2], 1, "c2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_const_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s const\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_param (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + int args[4] = { -1, -1, -1, -1 }; + int n_args = 0; + + if (opcode->src_size[1] == 0) { + return; + } + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + args[n_args++] = + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + args[n_args++] = + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + args[n_args++] = + orc_program_add_source (p, opcode->src_size[0], "s1"); + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[1], "p1"); + if (opcode->src_size[2]) { + args[n_args++] = + orc_program_add_parameter (p, opcode->src_size[2], "p2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_p_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_2 (p, opcode->name, 0, args[0], args[1], + args[2], args[3]); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s param\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_inplace (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->dest_size[0] != opcode->src_size[0]) return; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR || + opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + return; + } + + p = orc_program_new (); + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[0], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_inplace_%s", opcode->name); + orc_program_set_name (p, s); + + orc_program_append_str (p, opcode->name, "d1", "d1", "s2"); + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s inplace\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_2d (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_2d (p); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s src_2d\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_const_n (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_constant_n (p, 8); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s src_const_n\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + +void +test_opcode_src_const_n_2d (OrcStaticOpcode *opcode) +{ + OrcProgram *p; + char s[40]; + int ret; + int flags = 0; + + if (opcode->flags & ORC_STATIC_OPCODE_SCALAR) { + return; + } + + p = orc_program_new (); + if (opcode->flags & ORC_STATIC_OPCODE_ACCUMULATOR) { + orc_program_add_accumulator (p, opcode->dest_size[0], "d1"); + } else { + orc_program_add_destination (p, opcode->dest_size[0], "d1"); + } + if (opcode->dest_size[1] != 0) { + orc_program_add_destination (p, opcode->dest_size[1], "d2"); + } + orc_program_add_source (p, opcode->src_size[0], "s1"); + if (opcode->src_size[1] != 0) { + orc_program_add_source (p, opcode->src_size[1], "s2"); + } + + if ((opcode->flags & ORC_STATIC_OPCODE_FLOAT_SRC) || + (opcode->flags & ORC_STATIC_OPCODE_FLOAT_DEST)) { + flags = ORC_TEST_FLAGS_FLOAT; + } + + sprintf(s, "test_s_%s", opcode->name); + orc_program_set_name (p, s); + orc_program_set_2d (p); + orc_program_set_constant_n (p, 8); + + if (opcode->dest_size[1] != 0) { + orc_program_append_dds_str (p, opcode->name, "d1", "d2", "s1"); + } else { + orc_program_append_str (p, opcode->name, "d1", "s1", "s2"); + } + + ret = orc_test_compare_output_full (p, flags); + if (!ret) { + printf("FAIL: %s src_const_n_2d\n", opcode->name); + error = TRUE; + } + + orc_program_free (p); +} + diff --git a/tools/orcc.c b/tools/orcc.c new file mode 100644 index 0000000..f6a3f3a --- /dev/null +++ b/tools/orcc.c @@ -0,0 +1,1183 @@ + +#include "config.h" + +#include +#include + +#include +#include +#include +#include + +static char * read_file (const char *filename); +void output_code (OrcProgram *p, FILE *output); +void output_code_header (OrcProgram *p, FILE *output); +void output_code_test (OrcProgram *p, FILE *output); +void output_code_backup (OrcProgram *p, FILE *output); +void output_code_no_orc (OrcProgram *p, FILE *output); +void output_code_assembly (OrcProgram *p, FILE *output); +void output_code_execute (OrcProgram *p, FILE *output, int is_inline); +void output_program_generation (OrcProgram *p, FILE *output, int is_inline); +void output_init_function (FILE *output); +static char * get_barrier (const char *s); +static const char * my_basename (const char *s); + +int verbose = 0; +int error = 0; +int compat; +int n_programs; +OrcProgram **programs; + +int use_inline = FALSE; + +const char *init_function = NULL; + +char *target = "sse"; + +#define ORC_VERSION(a,b,c,d) ((a)*1000000 + (b)*10000 + (c)*100 + (d)) +#define REQUIRE(a,b,c,d) do { \ + if (ORC_VERSION((a),(b),(c),(d)) > compat) { \ + fprintf(stderr, "Feature used that is incompatible with --compat\n"); \ + exit (1); \ + } \ +} while (0) + +enum { + MODE_IMPL, + MODE_HEADER, + MODE_TEST, + MODE_ASSEMBLY +}; +int mode = MODE_IMPL; + +void help (void) +{ + printf("Usage:\n"); + printf(" orcc [OPTION...] INPUT_FILE\n"); + printf("\n"); + printf("Help Options:\n"); + printf(" -h, --help Show help options\n"); + printf("\n"); + printf("Application Options:\n"); + printf(" -v, --verbose Output more information\n"); + printf(" -o, --output FILE Write output to FILE\n"); + printf(" --implementation Produce C code implementing functions\n"); + printf(" --header Produce C header for functions\n"); + printf(" --test Produce test code for functions\n"); + printf(" --assembly Produce assembly code for functions\n"); + printf(" --include FILE Add #include to code\n"); + printf(" --target TARGET Generate assembly for TARGET\n"); + printf(" --compat VERSION Generate code compatible with Orc version VERSION\n"); + printf(" --inline Generate inline functions in header\n"); + printf(" --no-inline Do not generate inline functions in header\n"); + printf(" --init-function FUNCTION Generate initialization function\n"); + printf("\n"); + + exit (0); +} + +int +main (int argc, char *argv[]) +{ + char *code; + int n; + int i; + char *output_file = NULL; + char *input_file = NULL; + char *include_file = NULL; + char *compat_version = VERSION; + FILE *output; + char *log = NULL; + + orc_init (); + + for(i=1;i\n"); + fprintf(output, "#endif\n"); + if (include_file) { + fprintf(output, "#include <%s>\n", include_file); + } + fprintf(output, "\n"); + fprintf(output, "%s", orc_target_c_get_typedefs ()); + fprintf(output, "\n"); + for(i=0;i\n", include_file); + } + fprintf(output, "\n"); + fprintf(output, "#ifdef __cplusplus\n"); + fprintf(output, "extern \"C\" {\n"); + fprintf(output, "#endif\n"); + fprintf(output, "\n"); + if (init_function) { + fprintf(output, "void %s (void);\n", init_function); + fprintf(output, "\n"); + } + fprintf(output, "\n"); + if (!use_inline) { + fprintf(output, "\n"); + fprintf(output, "%s", orc_target_c_get_typedefs ()); + for(i=0;i\n"); + fprintf(output, "\n"); + for(i=0;i\n"); + fprintf(output, "#include \n"); + fprintf(output, "#include \n"); + fprintf(output, "#include \n"); + fprintf(output, "#include \n"); + fprintf(output, "#include \n"); + if (include_file) { + fprintf(output, "#include <%s>\n", include_file); + } + fprintf(output, "\n"); + fprintf(output, "%s", orc_target_c_get_typedefs ()); + fprintf(output, "%s", orc_target_get_asm_preamble ("c")); + fprintf(output, "\n"); + for(i=0;iname); + output_code_backup (programs[i], output); + } + fprintf(output, "\n"); + fprintf(output, "static int quiet = 0;\n"); + fprintf(output, "static int benchmark = 0;\n"); + fprintf(output, "\n"); + fprintf(output, "static void help (const char *argv0)\n"); + fprintf(output, "{\n"); + fprintf(output, " printf(\"Usage:\\n\");\n"); + fprintf(output, " printf(\" %%s [OPTION]\\n\", argv0);\n"); + fprintf(output, " printf(\"Help Options:\\n\");\n"); + fprintf(output, " printf(\" -h, --help Show help options\\n\");\n"); + fprintf(output, " printf(\"Application Options:\\n\");\n"); + fprintf(output, " printf(\" -b, --benchmark Run benchmark and show results\\n\");\n"); + fprintf(output, " printf(\" -q, --quiet Don't output anything except on failures\\n\");\n"); + fprintf(output, "\n"); + fprintf(output, " exit(0);\n"); + fprintf(output, "}\n"); + fprintf(output, "\n"); + fprintf(output, "int\n"); + fprintf(output, "main (int argc, char *argv[])\n"); + fprintf(output, "{\n"); + fprintf(output, " int error = FALSE;\n"); + fprintf(output, " int i;\n"); + fprintf(output, "\n"); + fprintf(output, " orc_test_init ();\n"); + fprintf(output, "\n"); + fprintf(output, " for(i=1;iname); + need_comma = FALSE; + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "%s * %s", var->type_name, + varnames[ORC_VAR_D1 + i]); + } else { + fprintf(output, "orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_D1 + i]); + } + if (p->is_2d) { + fprintf(output, ", int %s_stride", varnames[ORC_VAR_D1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "%s * %s", var->type_name, + varnames[ORC_VAR_A1 + i]); + } else { + fprintf(output, "orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_A1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + if (var->type_name) { + fprintf(output, "const %s * %s", var->type_name, + varnames[ORC_VAR_S1 + i]); + } else { + fprintf(output, "const orc_uint%d * %s", var->size*8, + varnames[ORC_VAR_S1 + i]); + } + if (p->is_2d) { + fprintf(output, ", int %s_stride", varnames[ORC_VAR_S1 + i]); + } + need_comma = TRUE; + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + if (need_comma) fprintf(output, ", "); + switch (var->param_type) { + case ORC_PARAM_TYPE_INT: + fprintf(output, "int %s", varnames[ORC_VAR_P1 + i]); + break; + case ORC_PARAM_TYPE_FLOAT: + REQUIRE(0,4,5,1); + fprintf(output, "float %s", varnames[ORC_VAR_P1 + i]); + break; + case ORC_PARAM_TYPE_INT64: + REQUIRE(0,4,7,1); + fprintf(output, "orc_int64 %s", varnames[ORC_VAR_P1 + i]); + break; + case ORC_PARAM_TYPE_DOUBLE: + REQUIRE(0,4,7,1); + fprintf(output, "double %s", varnames[ORC_VAR_P1 + i]); + break; + default: + ORC_ASSERT(0); + } + need_comma = TRUE; + } + } + if (p->constant_n == 0) { + if (need_comma) fprintf(output, ", "); + fprintf(output, "int n"); + need_comma = TRUE; + } + if (p->is_2d && p->constant_m == 0) { + if (need_comma) fprintf(output, ", "); + fprintf(output, "int m"); + } + fprintf(output, ")"); +} + +void +output_code_header (OrcProgram *p, FILE *output) +{ + fprintf(output, "void "); + output_prototype (p, output); + fprintf(output, ";\n"); +} + +void +output_code_backup (OrcProgram *p, FILE *output) +{ + + fprintf(output, "static void\n"); + if (compat < ORC_VERSION(0,4,7,1)) { + fprintf(output, "_backup_%s (OrcExecutor * ex)\n", p->name); + } else { + fprintf(output, "_backup_%s (OrcExecutor * ORC_RESTRICT ex)\n", p->name); + } + fprintf(output, "{\n"); + { + OrcCompileResult result; + + result = orc_program_compile_full (p, orc_target_get_by_name("c"), + ORC_TARGET_C_BARE); + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + fprintf(output, "%s\n", orc_program_get_asm_code (p)); + } else { + printf("Failed to compile %s\n", p->name); + error = TRUE; + } + } + fprintf(output, "}\n"); + fprintf(output, "\n"); + +} + +void +output_code_no_orc (OrcProgram *p, FILE *output) +{ + + fprintf(output, "void\n"); + output_prototype (p, output); + fprintf(output, "{\n"); + { + OrcCompileResult result; + + result = orc_program_compile_full (p, orc_target_get_by_name("c"), + ORC_TARGET_C_BARE | ORC_TARGET_C_NOEXEC); + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + fprintf(output, "%s\n", orc_program_get_asm_code (p)); + } else { + printf("Failed to compile %s\n", p->name); + error = TRUE; + } + } + fprintf(output, "}\n"); + fprintf(output, "\n"); + +} + +void +output_code (OrcProgram *p, FILE *output) +{ + fprintf(output, "\n"); + fprintf(output, "/* %s */\n", p->name); + fprintf(output, "#ifdef DISABLE_ORC\n"); + output_code_no_orc (p, output); + fprintf(output, "#else\n"); + output_code_backup (p, output); + output_code_execute (p, output, FALSE); + fprintf(output, "#endif\n"); + fprintf(output, "\n"); +} + +void +output_code_execute (OrcProgram *p, FILE *output, int is_inline) +{ + OrcVariable *var; + int i; + + if (init_function) { + if (is_inline) { + fprintf(output, "extern OrcProgram *_orc_program_%s;\n", p->name); + } else { + if (use_inline) { + fprintf(output, "OrcProgram *_orc_program_%s;\n", p->name); + } else { + fprintf(output, "static OrcProgram *_orc_program_%s;\n", p->name); + } + } + } + if (is_inline) { + fprintf(output, "static inline void\n"); + } else { + fprintf(output, "void\n"); + } + output_prototype (p, output); + fprintf(output, "\n"); + fprintf(output, "{\n"); + fprintf(output, " OrcExecutor _ex, *ex = &_ex;\n"); + if (init_function) { + fprintf(output, " OrcProgram *p = _orc_program_%s;\n", p->name); + } else { + fprintf(output, " static int p_inited = 0;\n"); + fprintf(output, " static OrcProgram *p = 0;\n"); + } + fprintf(output, " void (*func) (OrcExecutor *);\n"); + fprintf(output, "\n"); + if (init_function == NULL) { + fprintf(output, " if (!p_inited) {\n"); + fprintf(output, " orc_once_mutex_lock ();\n"); + fprintf(output, " if (!p_inited) {\n"); + fprintf(output, " OrcCompileResult result;\n"); + fprintf(output, "\n"); + output_program_generation (p, output, is_inline); + fprintf(output, "\n"); + fprintf(output, " result = orc_program_compile (p);\n"); + fprintf(output, " }\n"); + fprintf(output, " p_inited = TRUE;\n"); + fprintf(output, " orc_once_mutex_unlock ();\n"); + fprintf(output, " }\n"); + } + fprintf(output, " ex->program = p;\n"); + fprintf(output, "\n"); + if (p->constant_n) { + fprintf(output, " ex->n = %d;\n", p->constant_n); + } else { + fprintf(output, " ex->n = n;\n"); + } + if (p->is_2d) { + if (p->constant_m) { + fprintf(output, " ORC_EXECUTOR_M(ex) = %d;\n", p->constant_m); + } else { + fprintf(output, " ORC_EXECUTOR_M(ex) = m;\n"); + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + fprintf(output, " ex->arrays[%s] = %s;\n", + enumnames[ORC_VAR_D1 + i], varnames[ORC_VAR_D1 + i]); + if (p->is_2d) { + fprintf(output, " ex->params[%s] = %s_stride;\n", + enumnames[ORC_VAR_D1 + i], varnames[ORC_VAR_D1 + i]); + } + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + fprintf(output, " ex->arrays[%s] = (void *)%s;\n", + enumnames[ORC_VAR_S1 + i], varnames[ORC_VAR_S1 + i]); + if (p->is_2d) { + fprintf(output, " ex->params[%s] = %s_stride;\n", + enumnames[ORC_VAR_S1 + i], varnames[ORC_VAR_S1 + i]); + } + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + switch (var->param_type) { + case ORC_PARAM_TYPE_INT: + fprintf(output, " ex->params[%s] = %s;\n", + enumnames[ORC_VAR_P1 + i], varnames[ORC_VAR_P1 + i]); + break; + case ORC_PARAM_TYPE_FLOAT: + REQUIRE(0,4,5,1); + fprintf(output, " {\n"); + fprintf(output, " orc_union32 tmp;\n"); + fprintf(output, " tmp.f = %s;\n", varnames[ORC_VAR_P1 + i]); + fprintf(output, " ex->params[%s] = tmp.i;\n", + enumnames[ORC_VAR_P1 + i]); + fprintf(output, " }\n"); + break; + case ORC_PARAM_TYPE_INT64: + REQUIRE(0,4,7,1); + fprintf(output, " {\n"); + fprintf(output, " orc_union64 tmp;\n"); + fprintf(output, " tmp.i = %s;\n", varnames[ORC_VAR_P1 + i]); + fprintf(output, " ex->params[%s] = tmp.x2[0];\n", + enumnames[ORC_VAR_P1 + i]); + fprintf(output, " ex->params[%s] = tmp.x2[1];\n", + enumnames[ORC_VAR_T1 + i]); + fprintf(output, " }\n"); + break; + case ORC_PARAM_TYPE_DOUBLE: + REQUIRE(0,4,5,1); + fprintf(output, " {\n"); + fprintf(output, " orc_union64 tmp;\n"); + fprintf(output, " tmp.f = %s;\n", varnames[ORC_VAR_P1 + i]); + fprintf(output, " ex->params[%s] = tmp.x2[0];\n", + enumnames[ORC_VAR_P1 + i]); + fprintf(output, " ex->params[%s] = tmp.x2[1];\n", + enumnames[ORC_VAR_T1 + i]); + fprintf(output, " }\n"); + break; + default: + ORC_ASSERT(0); + } + } + } + fprintf(output, "\n"); + fprintf(output, " func = p->code_exec;\n"); + fprintf(output, " func (ex);\n"); + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + fprintf(output, " *%s = orc_executor_get_accumulator (ex, %s);\n", + varnames[ORC_VAR_A1 + i], enumnames[ORC_VAR_A1 + i]); + } + } + fprintf(output, "}\n"); + +} + +void +output_program_generation (OrcProgram *p, FILE *output, int is_inline) +{ + OrcVariable *var; + int i; + + fprintf(output, " p = orc_program_new ();\n"); + if (p->constant_n != 0) { + fprintf(output, " orc_program_set_constant_n (p, %d);\n", + p->constant_n); + } + if (p->is_2d) { + fprintf(output, " orc_program_set_2d (p);\n"); + if (p->constant_m != 0) { + fprintf(output, " orc_program_set_constant_m (p, %d);\n", + p->constant_m); + } + } + fprintf(output, " orc_program_set_name (p, \"%s\");\n", p->name); + if (!is_inline) { + fprintf(output, " orc_program_set_backup_function (p, _backup_%s);\n", + p->name); + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_destination (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_D1 + i]); + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_source (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_S1 + i]); + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_accumulator (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_A1 + i]); + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_C1 + i]; + if (var->size == 0) continue; + if (var->size <= 4) { + fprintf(output, " orc_program_add_constant (p, %d, 0x%08x, \"%s\");\n", + var->size, (int)var->value.i, varnames[ORC_VAR_C1 + i]); + } else if (var->size > 4) { + REQUIRE(0,4,8,1); + fprintf(output, " orc_program_add_constant_int64 (p, %d, 0x%08x%08xULL, \"%s\");\n", + var->size, (orc_uint32)(((orc_uint64)var->value.i)>>32), + (orc_uint32)(var->value.i), varnames[ORC_VAR_C1 + i]); + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + const char *suffix = NULL; + switch (var->param_type) { + case ORC_PARAM_TYPE_INT: + suffix=""; + break; + case ORC_PARAM_TYPE_FLOAT: + REQUIRE(0,4,5,1); + suffix="_float"; + break; + case ORC_PARAM_TYPE_INT64: + REQUIRE(0,4,7,1); + suffix="_int64"; + break; + case ORC_PARAM_TYPE_DOUBLE: + REQUIRE(0,4,7,1); + suffix="_double"; + break; + default: + ORC_ASSERT(0); + } + fprintf(output, " orc_program_add_parameter%s (p, %d, \"%s\");\n", + suffix, var->size, varnames[ORC_VAR_P1 + i]); + } + } + for(i=0;i<16;i++){ + var = &p->vars[ORC_VAR_T1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_temporary (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_T1 + i]); + } + } + fprintf(output, "\n"); + + for(i=0;in_insns;i++){ + OrcInstruction *insn = p->insns + i; + + if (compat < ORC_VERSION(0,4,6,1)) { + if (insn->flags) { + REQUIRE(0,4,6,1); + } + + if (p->vars[insn->src_args[1]].size != 0) { + fprintf(output, " orc_program_append (p, \"%s\", %s, %s, %s);\n", + insn->opcode->name, enumnames[insn->dest_args[0]], + enumnames[insn->src_args[0]], enumnames[insn->src_args[1]]); + } else { + fprintf(output, " orc_program_append_ds (p, \"%s\", %s, %s);\n", + insn->opcode->name, enumnames[insn->dest_args[0]], + enumnames[insn->src_args[0]]); + } + } else { + int args[4] = { 0, 0, 0, 0 }; + int n_args = 0; + + if (insn->opcode->dest_size[0] != 0) { + args[n_args++] = insn->dest_args[0]; + } + if (insn->opcode->dest_size[1] != 0) { + args[n_args++] = insn->dest_args[1]; + } + if (insn->opcode->src_size[0] != 0) { + args[n_args++] = insn->src_args[0]; + } + if (insn->opcode->src_size[1] != 0) { + args[n_args++] = insn->src_args[1]; + } + if (insn->opcode->src_size[2] != 0) { + args[n_args++] = insn->src_args[2]; + } + + fprintf(output, " orc_program_append_2 (p, \"%s\", %d, %s, %s, %s, %s);\n", + insn->opcode->name, insn->flags, enumnames[args[0]], + enumnames[args[1]], enumnames[args[2]], + enumnames[args[3]]); + } + } +} + +void +output_init_function (FILE *output) +{ + int i; + + fprintf(output, "void\n"); + fprintf(output, "%s (void)\n", init_function); + fprintf(output, "{\n"); + fprintf(output, "#ifndef DISABLE_ORC\n"); + for(i=0;iname); + fprintf(output, " OrcProgram *p;\n"); + fprintf(output, " OrcCompileResult result;\n"); + fprintf(output, " \n"); + output_program_generation (programs[i], output, FALSE); + fprintf(output, "\n"); + fprintf(output, " result = orc_program_compile (p);\n"); + fprintf(output, "\n"); + fprintf(output, " _orc_program_%s = p;\n", programs[i]->name); + fprintf(output, " }\n"); + } + fprintf(output, "#endif\n"); + fprintf(output, "}\n"); + fprintf(output, "\n"); +} + +void +output_code_test (OrcProgram *p, FILE *output) +{ + OrcVariable *var; + int i; + + fprintf(output, " /* %s */\n", p->name); + fprintf(output, " {\n"); + fprintf(output, " OrcProgram *p = NULL;\n"); + fprintf(output, " int ret;\n"); + fprintf(output, "\n"); + fprintf(output, " if (!quiet)"); + fprintf(output, " printf (\"%s:\\n\");\n", p->name); + fprintf(output, " p = orc_program_new ();\n"); + if (p->constant_n != 0) { + fprintf(output, " orc_program_set_constant_n (p, %d);\n", + p->constant_n); + } + if (p->is_2d) { + fprintf(output, " orc_program_set_2d (p);\n"); + if (p->constant_m != 0) { + fprintf(output, " orc_program_set_constant_m (p, %d);\n", + p->constant_m); + } + } + fprintf(output, " orc_program_set_name (p, \"%s\");\n", p->name); + fprintf(output, " orc_program_set_backup_function (p, _backup_%s);\n", + p->name); + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_D1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_destination (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_D1 + i]); + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_S1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_source (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_S1 + i]); + } + } + for(i=0;i<4;i++){ + var = &p->vars[ORC_VAR_A1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_accumulator (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_A1 + i]); + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_C1 + i]; + if (var->size) { + if (var->size < 8) { + if (var->value.i != 0x80000000) { + fprintf(output, " orc_program_add_constant (p, %d, 0x%08x, \"%s\");\n", + var->size, (int)var->value.i, varnames[ORC_VAR_C1 + i]); + } else { + fprintf(output, " orc_program_add_constant (p, %d, 0x%08x, \"%s\");\n", + var->size, (int)var->value.i, varnames[ORC_VAR_C1 + i]); + } + } else { + fprintf(output, " orc_program_add_constant_int64 (p, %d, " + "0x%08x%08xULL, \"%s\");\n", + var->size, (orc_uint32)(((orc_uint64)var->value.i)>>32), + (orc_uint32)(var->value.i), varnames[ORC_VAR_C1 + i]); + } + } + } + for(i=0;i<8;i++){ + var = &p->vars[ORC_VAR_P1 + i]; + if (var->size) { + const char *suffix = NULL; + switch (var->param_type) { + case ORC_PARAM_TYPE_INT: + suffix=""; + break; + case ORC_PARAM_TYPE_FLOAT: + REQUIRE(0,4,5,1); + suffix="_float"; + break; + case ORC_PARAM_TYPE_INT64: + REQUIRE(0,4,7,1); + suffix="_int64"; + break; + case ORC_PARAM_TYPE_DOUBLE: + REQUIRE(0,4,7,1); + suffix="_double"; + break; + default: + ORC_ASSERT(0); + } + fprintf(output, " orc_program_add_parameter%s (p, %d, \"%s\");\n", + suffix, var->size, varnames[ORC_VAR_P1 + i]); + } + } + for(i=0;i<16;i++){ + var = &p->vars[ORC_VAR_T1 + i]; + if (var->size) { + fprintf(output, " orc_program_add_temporary (p, %d, \"%s\");\n", + var->size, varnames[ORC_VAR_T1 + i]); + } + } + fprintf(output, "\n"); + + for(i=0;in_insns;i++){ + OrcInstruction *insn = p->insns + i; + if (compat < ORC_VERSION(0,4,6,1)) { + if (insn->flags) { + REQUIRE(0,4,6,1); + } + + if (p->vars[insn->src_args[1]].size != 0) { + fprintf(output, " orc_program_append (p, \"%s\", %s, %s, %s);\n", + insn->opcode->name, enumnames[insn->dest_args[0]], + enumnames[insn->src_args[0]], enumnames[insn->src_args[1]]); + } else { + fprintf(output, " orc_program_append_ds (p, \"%s\", %s, %s);\n", + insn->opcode->name, enumnames[insn->dest_args[0]], + enumnames[insn->src_args[0]]); + } + } else { + int args[4] = { 0, 0, 0, 0 }; + int n_args = 0; + + if (insn->opcode->dest_size[0] != 0) { + args[n_args++] = insn->dest_args[0]; + } + if (insn->opcode->dest_size[1] != 0) { + args[n_args++] = insn->dest_args[1]; + } + if (insn->opcode->src_size[0] != 0) { + args[n_args++] = insn->src_args[0]; + } + if (insn->opcode->src_size[1] != 0) { + args[n_args++] = insn->src_args[1]; + } + if (insn->opcode->src_size[2] != 0) { + args[n_args++] = insn->src_args[2]; + } + + fprintf(output, " orc_program_append_2 (p, \"%s\", %d, %s, %s, %s, %s);\n", + insn->opcode->name, insn->flags, enumnames[args[0]], + enumnames[args[1]], enumnames[args[2]], + enumnames[args[3]]); + } + } + + fprintf(output, "\n"); + if (compat >= ORC_VERSION(0,4,7,1)) { + fprintf(output, " if (benchmark) {\n"); + fprintf(output, " printf (\" cycles (emulate) : %%g\\n\",\n"); + fprintf(output, " orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + } + fprintf(output, " ret = orc_test_compare_output_backup (p);\n"); + fprintf(output, " if (!ret) {\n"); + fprintf(output, " error = TRUE;\n"); + fprintf(output, " } else if (!quiet) {\n"); + fprintf(output, " printf (\" backup function : PASSED\\n\");\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + fprintf(output, " if (benchmark) {\n"); + fprintf(output, " printf (\" cycles (backup) : %%g\\n\",\n"); + fprintf(output, " orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + fprintf(output, " ret = orc_test_compare_output (p);\n"); + fprintf(output, " if (ret == ORC_TEST_INDETERMINATE && !quiet) {\n"); + fprintf(output, " printf (\" compiled function: COMPILE FAILED\\n\");\n"); + fprintf(output, " } else if (!ret) {\n"); + fprintf(output, " error = TRUE;\n"); + fprintf(output, " } else if (!quiet) {\n"); + fprintf(output, " printf (\" compiled function: PASSED\\n\");\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + fprintf(output, " if (benchmark) {\n"); + fprintf(output, " printf (\" cycles (compiled): %%g\\n\",\n"); + fprintf(output, " orc_test_performance_full (p, 0, NULL));\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + fprintf(output, " orc_program_free (p);\n"); + fprintf(output, " }\n"); + fprintf(output, "\n"); + +} + +void +output_code_assembly (OrcProgram *p, FILE *output) +{ + + fprintf(output, "/* %s */\n", p->name); + //output_prototype (p, output); + { + OrcCompileResult result; + OrcTarget *t = orc_target_get_by_name(target); + + result = orc_program_compile_full (p, t, + orc_target_get_default_flags (t)); + if (ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + fprintf(output, "%s\n", orc_program_get_asm_code (p)); + } else { + printf("Failed to compile %s\n", p->name); + error = TRUE; + } + } + fprintf(output, "\n"); + +} + +static const char * +my_basename (const char *s) +{ + const char *ret = s; + const char *t; + + t = s; + while (t[0] != 0) { + if (t[0] == '/') ret = t+1; + t++; + } + + return ret; +} + diff --git a/tools/test.orc b/tools/test.orc new file mode 100644 index 0000000..767c51b --- /dev/null +++ b/tools/test.orc @@ -0,0 +1,196 @@ + +.function orc_add2_rshift_add_s16_22 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 2 +shrsw t1, t1, 2 +addw d1, d1, t1 + +.function orc_add2_rshift_sub_s16_22 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 2 +shrsw t1, t1, 2 +subw d1, d1, t1 + +.function orc_add2_rshift_add_s16_11 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 1 +shrsw t1, t1, 1 +addw d1, d1, t1 + +.function orc_add2_rshift_sub_s16_11 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 + +addw t1, s1, s2 +addw t1, t1, 1 +shrsw t1, t1, 1 +subw d1, d1, t1 + +.function orc_add_const_rshift_s16_11 +.dest 2 d1 +.source 2 s1 +.temp 2 t1 + +addw t1, s1, 1 +shrsw d1, t1, 1 + + +.function orc_add_s16 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 + +addw t1, s1, s2 +shrsw d1, t1, 1 + + +.function orc_lshift1_s16 +.dest 2 d1 +.source 2 s1 + +shlw d1, s1, 1 + +.function orc_lshift2_s16 +.dest 2 d1 +.source 2 s1 + +shlw d1, s1, 2 + + +.function orc_mas2_add_s16 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.temp 2 t1 +.temp 4 t2 +.param 2 p1 +.param 2 p2 +.param 2 p3 + +addw t1, s1, s2 +mulswl t2, t1, p1 +addl t2, t2, p2 +shll t2, t2, p3 +convlw t1, t2 +addw d1, d1, t1 + + +.function orc_mas4_add_s16_1991 +.dest 2 d1 +.source 2 s0 +.source 2 s1 +.source 2 s2 +.source 2 s3 +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +addw t1, s1, s2 +mullw t1, t1, 9 +addw t2, s0, s3 +subw t1, t1, t2 +addw t1, t1, p1 +shrsw t1, t1, p2 +addw d1, d1, t1 + + +.function orc_mas4_sub_s16_1991 +.dest 2 d1 +.source 2 s0 +.source 2 s1 +.source 2 s2 +.source 2 s3 +.param 2 p1 +.param 2 p2 +.temp 2 t1 +.temp 2 t2 + +addw t1, s1, s2 +mullw t1, t1, 9 +addw t2, s0, s3 +subw t1, t1, t2 +addw t1, t1, p1 +shrsw t1, t1, p2 +subw d1, d1, t1 + + +.function orc_subtract_s16 +.dest 2 d1 +.source 2 s1 +.source 2 s2 + +subw d1, s1, s2 + + +.function orc_memcpy +.dest 1 d1 +.source 1 s1 + +copyb d1, s1 + + +.function orc_add_s16_u8 +.dest 2 d1 +.source 2 s1 +.source 1 s2 +.temp 2 t1 + +convubw t1, s2 +addw d1, t1, s1 + + +.function orc_convert_s16_u8 +.dest 2 d1 +.source 1 s1 + +convubw d1, s1 + + +.function orc_convert_u8_s16 +.dest 1 d1 +.source 2 s1 + +convsuswb d1, s1 + + +.function orc_subtract_s16_u8 +.dest 2 d1 +.source 2 s1 +.source 1 s2 +.temp 2 t1 + +convubw t1, s2 +subw d1, s1, t1 + + +.function orc_multiply_and_add_s16_u8 +.dest 2 d1 +.source 2 s1 +.source 2 s2 +.source 1 s3 +.temp 2 t1 + +convubw t1, s3 +mullw t1, t1, s2 +addw d1, s1, t1 + + -- 2.7.4